ATLAS Offline Software
ALFA_RawDataContainerCnv.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
8 
9 // std::cout << " Container, cago bello T->P " << std::endl;
10 
11  MsgStream log(msgSvc(), "ALFA_RawDataContainerCnv");
12 if (log.level()<=MSG::DEBUG) log << MSG::DEBUG << "In ALFA_RawDataContainerCnv::createPersistent" << endmsg;
13 
14 ALFA_RawDataContainerCnv_p1 TPConverter;
15 ALFA_RawDataContainer_PERS* persCont = TPConverter.createPersistent(transCont, log);
16 
17 if (log.level()<=MSG::DEBUG) log << MSG::DEBUG << "Wrote persistent BCM RDO Container with " << persCont->size() << " entries" << endmsg;
18  return persCont;
19 
20 }
21 
23 
24  MsgStream log(msgSvc(), "ALFA_RawDataContainerCnv");
25 if (log.level()<=MSG::DEBUG) log << MSG::DEBUG << "In ALFA_RawDataContainerCnv::createTransient" << endmsg;
26 
27 // std::cout << "Container, bello cago P->T " << std::endl;
28 
29  ALFA_RawDataContainerCnv_p1 TPConverter_p1;
30  ALFA_RawDataContainer* transCont(nullptr);
31 
32 static const pool::Guid p1_guid("0C023583-E3D4-4C7D-9B20-B6B2A1018D2F");
33 
34 if (this->compareClassGuid(p1_guid)) {
35 
36  std::unique_ptr< ALFA_RawDataContainer_p1 > persCont(poolReadObject< ALFA_RawDataContainer_p1 >());
37 
38  transCont = TPConverter_p1.createTransient(persCont.get(), log);
39  }
40  else throw std::runtime_error("Unsupported persistent version of Data container");
41 
42 
43 return transCont;
44 
45 
46 }
47 
48 
49 
TPPolyCnvBase::createTransient
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
ALFA_RawDataContainerCnv.h
ALFA_RawDataContainerCnv::createTransient
virtual ALFA_RawDataContainer * createTransient()
Definition: ALFA_RawDataContainerCnv.cxx:22
TPAbstractPolyCnvBase::createPersistent
virtual PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of a transient object.
pool::Guid
::Guid Guid
Definition: T_AthenaPoolCustCnv.h:19
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
ALFA_RawDataContainerCnv_p1
Definition: ALFA_RawDataContainerCnv_p1.h:21
ALFA_RawDataContainerCnv::createPersistent
virtual ALFA_RawDataContainer_PERS * createPersistent(ALFA_RawDataContainer *transCont)
Definition: ALFA_RawDataContainerCnv.cxx:7
ALFA_RawDataContainer
This container provides acces to the PMF RDOs.
Definition: ALFA_RawDataContainer.h:21
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
T_AthenaPoolCustCnv::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.
ALFA_RawDataContainer_p1
Definition: ALFA_RawDataContainer_p1.h:12