ATLAS Offline Software
TrigT2JetContainerCnv.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
8 
9 //createPersistent
11 {
12 
13  MsgStream mlog(msgSvc(), "TrigT2JetContainerConverter" );
14 
15  mlog << MSG::DEBUG << "TrigT2JetContainerCnv::createPersistent" << endmsg;
16 
17  TrigT2JetContainer_PERS* p_T2JetCont = m_converter.createPersistent( transObj, mlog );
18 
19  return p_T2JetCont;
20 
21 }//end of create persistent method
22 
23 
24 //createTransient
26 {
27 
28  MsgStream mlog(msgSvc(), "TrigT2JetContainerConverter" );
29 
30  mlog << MSG::DEBUG << "TrigT2JetContainerCnv::createTransient called" << endmsg;
31 
32  static const pool::Guid tlp1_guid( "3B670168-C5AA-48A1-9813-C94530980EBF" );
33  static const pool::Guid p3_guid( "6215BEE2-45E7-4681-9089-9BD470CDAF4D" );
34 
35 
36  if( compareClassGuid( p3_guid ) ){
37  std::unique_ptr< TrigT2JetContainer_p3 > col_vect( poolReadObject< TrigT2JetContainer_p3 >() );
38  //std::cout << "Reading TTCC p3" << std::endl;
39  return m_converter.createTransient( col_vect.get(), mlog ) ;
40  } else if( compareClassGuid( tlp1_guid ) ) {
41  std::unique_ptr< TrigT2JetContainer_tlp1 > col_vect( poolReadObject< TrigT2JetContainer_tlp1 >() );
42  //std::cout << "Reading TTC tlp1" << std::endl;
43  return m_converter_tlp1.createTransient( col_vect.get(), mlog );
44  } else throw std::runtime_error( "Unsupported persistent version of TrigT2JetContainer" );
45 
46 }//end of create transient method
47 
TrigT2JetContainer_p3.h
TrigT2JetContainerCnv::m_converter
TrigT2JetContainerCnv_p3 m_converter
Definition: TrigT2JetContainerCnv.h:48
TPPolyCnvBase::createTransient
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
TrigT2JetContainer_p3
Definition: TrigT2JetContainer_p3.h:23
TPAbstractPolyCnvBase::createPersistent
virtual PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of a transient object.
TrigT2JetContainer
container of TrigT2Jet elements
Definition: TrigT2JetContainer.h:26
TrigT2JetContainer_tlp1.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
TrigT2JetContainerCnv::createPersistent
virtual TrigT2JetContainer_PERS * createPersistent(TrigT2JetContainer *transObj)
Definition: TrigT2JetContainerCnv.cxx:10
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.
TrigT2JetContainerCnv::m_converter_tlp1
TrigT2JetContainerCnv_tlp1 m_converter_tlp1
Definition: TrigT2JetContainerCnv.h:47
TrigT2JetContainerCnv.h
TrigT2JetContainerCnv::createTransient
virtual TrigT2JetContainer * createTransient()
Definition: TrigT2JetContainerCnv.cxx:25