ATLAS Offline Software
ALFA_RawDataContainerCnv_charge.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  MsgStream log(msgSvc(), "ALFA_RawDataContainerCnv_charge");
10 if (log.level()<=MSG::DEBUG) log << MSG::DEBUG << "In ALFA_RawDataContainerCnv_charge::createPersistent" << endmsg;
11 
13 ALFA_RawDataContainer_charge_PERS* persCont = TPConverter.createPersistent(transCont, log);
14 
15 if (log.level()<=MSG::DEBUG) log << MSG::DEBUG << "Wrote persistent BCM RDO Container with " << persCont->size() << " entries" << endmsg;
16  return persCont;
17 
18 }
19 
21 
22  MsgStream log(msgSvc(), "ALFA_RawDataContainerCnv_charge");
23 if (log.level()<=MSG::DEBUG) log << MSG::DEBUG << "In ALFA_RawDataContainerCnv_charge::createTransient" << endmsg;
24 
26  ALFA_RawDataContainer_charge* transCont(nullptr);
27 
28 static const pool::Guid p1_guid("0C023583-E3D4-4C7D-9B20-B6B2A1018D2F");
29 
30 if (this->compareClassGuid(p1_guid)) {
31 
32  std::unique_ptr< ALFA_RawDataContainer_charge_p1 > persCont(poolReadObject< ALFA_RawDataContainer_charge_p1 >());
33 
34  transCont = TPConverter_p1.createTransient(persCont.get(), log);
35  }
36  else throw std::runtime_error("Unsupported persistent version of Data container");
37 
38 
39 return transCont;
40 
41 
42 }
43 
44 
45 
ALFA_RawDataContainerCnv_charge.h
TPPolyCnvBase::createTransient
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
ALFA_RawDataContainerCnv_charge_p1
Definition: ALFA_RawDataContainerCnv_charge_p1.h:21
TPAbstractPolyCnvBase::createPersistent
virtual PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of a transient object.
ALFA_RawDataContainer_charge_p1
Definition: ALFA_RawDataContainer_charge_p1.h:11
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_charge::createTransient
virtual ALFA_RawDataContainer_charge * createTransient()
Definition: ALFA_RawDataContainerCnv_charge.cxx:20
ALFA_RawDataContainer_charge
This container provides acces to the PMF RDOs.
Definition: ALFA_RawDataContainer_charge.h:21
ALFA_RawDataContainerCnv_charge::createPersistent
virtual ALFA_RawDataContainer_charge_PERS * createPersistent(ALFA_RawDataContainer_charge *transCont)
Definition: ALFA_RawDataContainerCnv_charge.cxx:7
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.