ATLAS Offline Software
TrigPhotonContainerCnv.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
9 
10 //createPersistent
12 {
13  MsgStream mlog(msgSvc(), "TrigPhotonContainerConverter" );
14 
15  mlog << MSG::DEBUG << "TrigPhotonContainerCnv::createPersistent called" << endmsg;
16 
17  TrigPhotonContainer_PERS * p_PhotonCont = m_converter.createPersistent( transObj, mlog );
18 
19  return p_PhotonCont;
20 
21 }//end of create persistent method
22 
23 
24 //createTransient
26 {
27  MsgStream mlog(msgSvc(), "TrigPhotonContainerConverter" );
28 
29  mlog << MSG::DEBUG << "TrigPhotonContainerCnv::createTransient called" << endmsg;
30 
31  static const pool::Guid p3_guid( "40192614-E7C5-4BAF-825F-CB9F3E023315" );
32  static const pool::Guid tlp2_guid( "96487DD7-9CF7-4351-BF33-011E6CA515F0" );
33  static const pool::Guid tlp1_guid( "7F4B4EF4-D7F6-4208-B522-4003A34EC664" );
34  static const pool::Guid p0_guid2( "65F1CCA1-B672-4E26-B74E-397CE6C8F617" );
35  static const pool::Guid p0_guid( "CB04DF3E-C363-49E3-9BE1-AD25230AB1EA" );
36 
37  if( compareClassGuid( p3_guid ) ){
38  std::unique_ptr< TrigPhotonContainer_p3 > col_vect( poolReadObject< TrigPhotonContainer_p3 >() );
39  // std::cout << "Reading IMFC p3" << std::endl;
40  return m_converter.createTransient( col_vect.get(), mlog ) ;
41 
42  } else if( compareClassGuid( tlp2_guid ) )
43  {
44  std::unique_ptr< TrigPhotonContainer_tlp2 > col_vect( poolReadObject< TrigPhotonContainer_tlp2 >() );
45  return m_converter_tlp2.createTransient( col_vect.get(), mlog );
46  }
47  else if( compareClassGuid( tlp1_guid ) )
48  {
49  std::unique_ptr< TrigPhotonContainer_tlp1 > col_vect( poolReadObject< TrigPhotonContainer_tlp1 >() );
50  return m_converter_tlp1.createTransient( col_vect.get(), mlog );
51  }
52  else if( compareClassGuid( p0_guid ) || compareClassGuid( p0_guid2 ) ){
53 
54  return poolReadObject< TrigPhotonContainer >();
55 
56  }
57  else throw std::runtime_error( "Unsupported persistent version of TrigPhotonContainer" );
58 
59 }//end of create transient method
60 
TrigPhotonContainerCnv.h
TrigPhotonContainerCnv::m_converter_tlp1
TrigPhotonContainerCnv_tlp1 m_converter_tlp1
Definition: TrigPhotonContainerCnv.h:35
TrigPhotonContainer_p3.h
TPPolyCnvBase::createTransient
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
TrigPhotonContainerCnv::createTransient
virtual TrigPhotonContainer * createTransient()
Definition: TrigPhotonContainerCnv.cxx:25
TrigPhotonContainerCnv::m_converter_tlp2
TrigPhotonContainerCnv_tlp2 m_converter_tlp2
Definition: TrigPhotonContainerCnv.h:36
TPAbstractPolyCnvBase::createPersistent
virtual PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of a transient object.
TrigPhotonContainer_tlp2.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
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
TrigPhotonContainer_tlp1.h
TrigPhotonContainerCnv::createPersistent
virtual TrigPhotonContainer_PERS * createPersistent(TrigPhotonContainer *transObj)
Definition: TrigPhotonContainerCnv.cxx:11
TrigPhotonContainerCnv::m_converter
TrigPhotonContainerCnv_p3 m_converter
Definition: TrigPhotonContainerCnv.h:37
TrigPhotonContainer_p3
Definition: TrigPhotonContainer_p3.h:23
TrigPhotonContainer
File: TrigPhotonContainer.h.
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhotonContainer.h:32
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.