ATLAS Offline Software
TrigEMClusterContainerCnv.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 
7 
8 //createPersistent
10 {
11  MsgStream mlog(msgSvc(), "TrigEMClusterContainerConverter" );
12 
13  mlog << MSG::DEBUG << "TrigEMClusterContainerCnv::createPersistent called" << endmsg;
14 
15  TrigEMClusterContainer_PERS * p_EMClusterCont = m_converter.createPersistent( transObj, mlog );
16 
17  return p_EMClusterCont;
18 
19 }//end of create persistent method
20 
21 //createTransient
23 {
24  MsgStream mlog(msgSvc(), "TrigEMClusterContainerConverter" );
25 
26  mlog << MSG::DEBUG << "TrigEMClusterContainerCnv::createTransient called" << endmsg;
27 
28  static const pool::Guid p3_guid( "0BF627E6-52A0-4F10-9FFD-A513DF2DBC31" );
29  static const pool::Guid p4_guid( "7B430CA8-5D16-4E26-B0A4-461F983610EB" );
30  static const pool::Guid tlp1_guid( "CAA8145E-F382-4727-A114-26E137D4B27E" );
31 
32  if( compareClassGuid( p4_guid ) ){
33  std::unique_ptr< TrigEMClusterContainer_p4 > col_vect( poolReadObject< TrigEMClusterContainer_p4 >() );
34  // std::cout << "Reading IMFC p4" << std::endl;
35  return m_converter.createTransient( col_vect.get(), mlog ) ;
36  } else if( compareClassGuid( p3_guid ) ){
37  std::unique_ptr< TrigEMClusterContainer_p3 > col_vect( poolReadObject< TrigEMClusterContainer_p3 >() );
38  return m_converter_p3.createTransient( col_vect.get(), mlog ) ;
39  } else if( compareClassGuid( tlp1_guid ) ) {
40  std::unique_ptr< TrigEMClusterContainer_tlp1 > col_vect( poolReadObject< TrigEMClusterContainer_tlp1 >() );
41  return m_converter_tlp1.createTransient( col_vect.get(), mlog );
42  } else { throw std::runtime_error( "Unsupported persistent version of TrigEMClusterContainer" ); }
43 
44 }//end of create transient method
45 
TrigEMClusterContainerCnv::m_converter_tlp1
TrigEMClusterContainerCnv_tlp1 m_converter_tlp1
Definition: TrigEMClusterContainerCnv.h:36
TPPolyCnvBase::createTransient
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
TrigEMClusterContainerCnv::m_converter_p3
TrigEMClusterContainerCnv_p3 m_converter_p3
Definition: TrigEMClusterContainerCnv.h:38
TrigEMClusterContainer
Container from TrigEMCluster type objects.
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigEMClusterContainer.h:32
TPAbstractPolyCnvBase::createPersistent
virtual PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of a transient object.
TrigEMClusterContainerCnv::createPersistent
virtual TrigEMClusterContainer_PERS * createPersistent(TrigEMClusterContainer *transObj)
Definition: TrigEMClusterContainerCnv.cxx:9
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
TrigEMClusterContainerCnv::createTransient
virtual TrigEMClusterContainer * createTransient()
Definition: TrigEMClusterContainerCnv.cxx:22
TrigEMClusterContainer_p4
Definition: TrigEMClusterContainer_p4.h:23
TrigEMClusterContainerCnv::m_converter
TrigEMClusterContainerCnv_p4 m_converter
Definition: TrigEMClusterContainerCnv.h:37
TrigEMClusterContainerCnv.h
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.