ATLAS Offline Software
CaloCalibrationHitContainerCnv.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
12 
13 
15  MsgStream mlog(msgSvc(), "CaloCalibrationHitContainerConverter" );
17  CaloCalibrationHitContainer_PERS *persObj = converter.createPersistent( transCont, mlog );
18  return persObj;
19 }
20 
21 
23  MsgStream mlog(msgSvc(), "CaloCalibrationHitContainerConverter" );
28 
29  CaloCalibrationHitContainer *trans_cont(0);
30  static const pool::Guid p1_guid("185FEF89-2350-4D1E-A1A7-9CB5A357232E");
31  static const pool::Guid p2_guid("4942B9D4-F545-4C68-BD2D-A8E5923C29F3");
32  static const pool::Guid p3_guid("D4E51325-2A55-41E4-B163-5224F2FA27CB");
33  static const pool::Guid p4_guid("0191C6F6-90B5-7B57-861D-6865CE3FDF69");
34  static const pool::Guid p0_guid("33CDAED0-F472-47D2-8F28-27C6D6761F35");
35 
36  if( this->compareClassGuid(p4_guid)) {
37  std::unique_ptr< CaloCalibrationHitContainer_p4 > col_vect( this->poolReadObject< CaloCalibrationHitContainer_p4 >() );
38  trans_cont = converter_p4.createTransient( col_vect.get(), mlog );
39  }
40  else if( this->compareClassGuid(p3_guid)) {
41  std::unique_ptr< CaloCalibrationHitContainer_p3 > col_vect( this->poolReadObject< CaloCalibrationHitContainer_p3 >() );
42  trans_cont = converter_p3.createTransient( col_vect.get(), mlog );
43  }
44  else if( this->compareClassGuid(p2_guid)) {
45  std::unique_ptr< CaloCalibrationHitContainer_p2 > col_vect( this->poolReadObject< CaloCalibrationHitContainer_p2 >() );
46  trans_cont = converter_p2.createTransient( col_vect.get(), mlog );
47  }
48  else if( this->compareClassGuid(p1_guid)) {
49  std::unique_ptr< CaloCalibrationHitContainer_p1 > col_vect( this->poolReadObject< CaloCalibrationHitContainer_p1 >() );
50  trans_cont = converter_p1.createTransient( col_vect.get(), mlog );
51  }
52  else if( this->compareClassGuid(p0_guid)) {
53  // old version from before TP separation, just return it
54  trans_cont = this->poolReadObject<CaloCalibrationHitContainer>();
55  } else {
56  throw std::runtime_error("Unsupported persistent version of Data container");
57  }
58  return trans_cont;
59 }
CaloCalibrationHitContainer
Definition: CaloCalibrationHitContainer.h:25
TPPolyCnvBase::createTransient
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
CaloCalibrationHitContainerCnv_p4
Definition: CaloCalibrationHitContainerCnv_p4.h:15
CaloCalibrationHitContainerCnv_p4.h
TPAbstractPolyCnvBase::createPersistent
virtual PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of a transient object.
CaloCalibrationHitContainerCnv.h
pool::Guid
::Guid Guid
Definition: T_AthenaPoolCustCnv.h:19
python.InDetPriVxFinderConfig.mlog
mlog
Definition: InDetPriVxFinderConfig.py:139
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
CaloCalibrationHitContainerCnv_p3
Definition: CaloCalibrationHitContainerCnv_p3.h:15
CaloCalibrationHitContainerCnv::createPersistent
CaloCalibrationHitContainer_PERS * createPersistent(CaloCalibrationHitContainer *transCont)
Definition: CaloCalibrationHitContainerCnv.cxx:14
CaloCalibrationHitContainerCnv_p3.h
CaloCalibrationHitContainerCnv_p2.h
CaloCalibrationHitContainerCnv_p1.h
CaloCalibrationHitContainerCnv_p2
Definition: CaloCalibrationHitContainerCnv_p2.h:15
T_AthenaHitsVectorCnv
Definition: TPConverter.h:1216
CaloCalibrationHitContainerCnv::createTransient
CaloCalibrationHitContainer * createTransient()
Definition: CaloCalibrationHitContainerCnv.cxx:22
CaloCalibrationHit_p2.h
T_AthenaPoolCustCnv< CaloCalibrationHitContainer, CaloCalibrationHitContainer_PERS >::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.
CaloCalibrationHitContainer_p3
Persistent represenation of a CaloCalibrationContainer,.
Definition: CaloCalibrationHitContainer_p3.h:16
CaloCalibrationHit_p1.h