ATLAS Offline Software
TrigTrtHitCountsCollectionCnv.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
7 
9 
10 //createPersistent
12 {
13  MsgStream mlog(msgSvc(), "TrigTrtHitCountsCollectionConverter" );
14 
15  mlog << MSG::DEBUG << "TrigTrtHitCountsCollectionCnv::createPersistent" << endmsg;
16 
18 
19  return persObj;
20 
21 }//end of create persistent method
22 
23 //createTransient
25 {
26  MsgStream mlog(msgSvc(), "TrigTrtHitCountsCollectionConverter" );
27 
28  mlog << MSG::DEBUG << "TrigTrtHitCountsCollectionCnv::createTransient" << endmsg;
29 
30  static const pool::Guid p2_guid( "47CBB4D9-381C-423E-A560-A7B5C325A5DD" );
31  static const pool::Guid tlp1_guid( "A0763CCA-553C-4365-8091-04CA2036FD97" );
32  static const pool::Guid p1_guid( "0CC00AC1-FB95-4E69-8C6E-29B6BB713AAE" );
33  static const pool::Guid trans_guid( "7631C2C2-612F-4245-8C8B-D40F59222E1E" );
34 
35  if( compareClassGuid( p2_guid ) ){
36  std::unique_ptr< TrigTrtHitCountsCollection_p2 > col_vect( poolReadObject< TrigTrtHitCountsCollection_p2 >() );
37  // std::cout << "Reading IMFC p2" << std::endl;
38  return m_converter.createTransient( col_vect.get(), mlog ) ;
39 
40  } else if(compareClassGuid(tlp1_guid)) {
41 
42  std::unique_ptr< TrigTrtHitCountsCollection_tlp1 > col_vect( poolReadObject< TrigTrtHitCountsCollection_tlp1 >() );
43  // std::cout << "Reading IMFC tlp1" << std::endl;
44  return m_converter_tlp1.createTransient( col_vect.get(), mlog );
45 
46  } else if(compareClassGuid(p1_guid)) {
47  std::unique_ptr< TrigTrtHitCountsCollection_p1 > col_vect( poolReadObject< TrigTrtHitCountsCollection_p1 >() );
48  return m_converter_p1.createTransient( col_vect.get(), mlog );
49 
50  } else if(compareClassGuid(trans_guid)) {
51  return poolReadObject<TrigTrtHitCountsCollection>();
52 
53  } else {
54 
55  throw std::runtime_error( "Unsupported persistent version of TrigTrtHitCountsCollection" );
56 
57  }
58 
59 }//end of create transient method
60 
TrigTrtHitCountsCollectionCnv::createTransient
virtual TrigTrtHitCountsCollection * createTransient()
Definition: TrigTrtHitCountsCollectionCnv.cxx:24
TrigTrtHitCountsCollection_p2
Definition: TrigTrtHitCountsCollection_p2.h:10
TrigTrtHitCountsCollectionCnv::m_converter_p1
TrigTrtHitCountsCollectionCnv_p1 m_converter_p1
Definition: TrigTrtHitCountsCollectionCnv.h:36
TPPolyCnvBase::createTransient
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
TrigTrtHitCountsCollectionCnv.h
TPAbstractPolyCnvBase::createPersistent
virtual PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of a transient object.
TrigTrtHitCountsCollection_p1.h
pool::Guid
::Guid Guid
Definition: T_AthenaPoolCustCnv.h:19
TopLevelTPConverter::createTransient
TRANS * createTransient(MsgStream &log)
Create transient representation of the persistent object known to this converter.
Definition: TopLevelTPConverter.h:62
python.InDetPriVxFinderConfig.mlog
mlog
Definition: InDetPriVxFinderConfig.py:134
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
TrigTrtHitCountsCollection_p2.h
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
TrigTrtHitCountsCollectionCnv::m_converter
TrigTrtHitCountsCollectionCnv_p2 m_converter
Definition: TrigTrtHitCountsCollectionCnv.h:37
DEBUG
#define DEBUG
Definition: page_access.h:11
TrigTrtHitCountsCollection
Container class needed for EDM. Should normally only contain 1 TrigTrtHitCounts object.
Definition: TrigTrtHitCountsCollection.h:21
T_AthenaPoolCustCnv::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.
TrigTrtHitCountsCollectionCnv::m_converter_tlp1
TrigTrtHitCountsCollectionCnv_tlp1 m_converter_tlp1
Definition: TrigTrtHitCountsCollectionCnv.h:35
TrigTrtHitCountsCollectionCnv::createPersistent
virtual TrigTrtHitCountsCollection_PERS * createPersistent(TrigTrtHitCountsCollection *transObj)
Definition: TrigTrtHitCountsCollectionCnv.cxx:11