ATLAS Offline Software
LUCID_RawDataContainerCnv.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
8 
9  MsgStream mlog(msgSvc(), "LUCID_RawDataContainerCnv");
10 
11  mlog << MSG::DEBUG << "In LUCID_RawDataContainerCnv::createPersistent " << endmsg;
12 
14  LUCID_RawDataContainer_PERS* persObj = converter.createPersistent(transCont, mlog);
15 
16  return persObj;
17 }
18 
20 
21  MsgStream mlog(msgSvc(), "LUCID_RawDataContainer");
22 
23  mlog << MSG::DEBUG << "In LUCID_RawDataContainerCnv::createTransient " << endmsg;
24 
25  LUCID_RawDataContainerCnv_p1 converter_p1;
26 
27  LUCID_RawDataContainer* trans_cont(nullptr);
28 
29  static const pool::Guid p0_guid("0C023583-E3D4-4C7D-9B20-B6B2A1018D2F");
30  static const pool::Guid p1_guid("88937AAE-D299-4A80-8608-96EFB3068F9A");
31 
32  if (this->compareClassGuid(p0_guid)) { // Before T/P separation
33  trans_cont = this->poolReadObject<LUCID_RawDataContainer>();
34  }
35  else if (this->compareClassGuid(p1_guid)) { // First persistent version
36 
37  std::unique_ptr< LUCID_RawDataContainer_p1 > col_vect( this->poolReadObject< LUCID_RawDataContainer_p1 >());
38 
39  trans_cont = converter_p1.createTransient(col_vect.get(), mlog);
40  }
41  else {
42  throw std::runtime_error("Unsupported persistent version of Data container");
43  }
44 
45  return trans_cont;
46 }
47 
48 
49 
LUCID_RawDataContainerCnv.h
TPPolyCnvBase::createTransient
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
TPAbstractPolyCnvBase::createPersistent
virtual PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of a transient object.
LUCID_RawDataContainerCnv::createTransient
virtual LUCID_RawDataContainer * createTransient()
Definition: LUCID_RawDataContainerCnv.cxx:19
pool::Guid
::Guid Guid
Definition: T_AthenaPoolCustCnv.h:19
LUCID_RawDataContainer
Definition: LUCID_RawDataContainer.h:12
python.InDetPriVxFinderConfig.mlog
mlog
Definition: InDetPriVxFinderConfig.py:139
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
LUCID_RawDataContainer_p1
Definition: LUCID_RawDataContainer_p1.h:13
LUCID_RawDataContainerCnv::createPersistent
virtual LUCID_RawDataContainer_PERS * createPersistent(LUCID_RawDataContainer *transCont)
Definition: LUCID_RawDataContainerCnv.cxx:7
LUCID_RawDataContainerCnv_p1
Definition: LUCID_RawDataContainerCnv_p1.h:15
DEBUG
#define DEBUG
Definition: page_access.h:11
T_AthenaPoolCustCnv::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.