ATLAS Offline Software
TrigL2BjetContainerCnv.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 
8 //* createPersistent *//
10 
11  MsgStream mlog(msgSvc(), "TrigL2BjetContainerConverter" );
12 
13  mlog << MSG::DEBUG << "TrigL2BjetContainerCnv::createPersistent called" << endmsg;
14 
15  TrigL2BjetContainer_PERS * p_L2BjetCont = m_converter.createPersistent( transObj, mlog );
16 
17  return p_L2BjetCont;
18 
19 }
20 
21 //* createTransient *//
23 
24  MsgStream mlog(msgSvc(), "TrigL2BjetContainerConverter" );
25 
26  mlog << MSG::DEBUG << "TrigL2BjetContainerCnv::createTransient called" << endmsg;
27 
28  static const pool::Guid p3_guid( "65534D07-EECA-46B1-A6AA-A4DA4DFEAAEF" );
29  static const pool::Guid tlp2_guid( "67162A5D-CEC3-4D9B-AF43-1858D6F1558E" );
30  static const pool::Guid tlp1_guid( "716A64FC-6EAF-4851-A0C8-8CE73C43C051" );
31  static const pool::Guid p0_guid( "B4842D15-7BFB-476E-8C68-F2F38E588380" );
32  static const pool::Guid p0_guid2( "F6ACED03-42F3-4192-A4E2-47FA9A9B9D49" );
33 
34  if( compareClassGuid( p3_guid ) ){
35  std::unique_ptr< TrigL2BjetContainer_p3 > col_vect( poolReadObject< TrigL2BjetContainer_p3 >() );
36  // std::cout << "Reading IMFC p3" << std::endl;
37  return m_converter.createTransient( col_vect.get(), mlog ) ;
38 
39  } else if ( compareClassGuid( tlp2_guid ) ) {
40 
41  std::unique_ptr< TrigL2BjetContainer_tlp2 > col_vect( poolReadObject< TrigL2BjetContainer_tlp2 >() );
42  // std::cout << "Reading IMFC tlp2" << std::endl;
43  return m_converter2.createTransient( col_vect.get(), mlog );
44 
45  } else if ( compareClassGuid( tlp1_guid ) ) {
46 
47  std::unique_ptr< TrigL2BjetContainer_tlp1 > col_vect( poolReadObject< TrigL2BjetContainer_tlp1 >() );
48  // std::cout << "Reading IMFC tlp1" << std::endl;
49  return m_converter1.createTransient( col_vect.get(), mlog );
50 
51  } else if( compareClassGuid( p0_guid ) || compareClassGuid( p0_guid2 ) ) {
52 
53  return poolReadObject< TrigL2BjetContainer >();
54 
55  } else throw std::runtime_error( "Unsupported persistent version of TrigL2BjetContainer" );
56 
57 }
58 
TPPolyCnvBase::createTransient
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
TrigL2BjetContainerCnv::m_converter1
TrigL2BjetContainerCnv_tlp1 m_converter1
Definition: TrigL2BjetContainerCnv.h:33
TPAbstractPolyCnvBase::createPersistent
virtual PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of a transient object.
TrigL2BjetContainerCnv::createPersistent
virtual TrigL2BjetContainer_PERS * createPersistent(TrigL2BjetContainer *transObj)
Definition: TrigL2BjetContainerCnv.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
TrigL2BjetContainer
Container of TrigEFBjet objects to be stored in POOL.
Definition: TrigL2BjetContainer.h:32
TrigL2BjetContainerCnv::m_converter
TrigL2BjetContainerCnv_p3 m_converter
Definition: TrigL2BjetContainerCnv.h:35
TrigL2BjetContainerCnv::createTransient
virtual TrigL2BjetContainer * createTransient()
Definition: TrigL2BjetContainerCnv.cxx:22
TrigL2BjetContainer_p3
Definition: TrigL2BjetContainer_p3.h:10
TrigL2BjetContainerCnv::m_converter2
TrigL2BjetContainerCnv_tlp2 m_converter2
Definition: TrigL2BjetContainerCnv.h:34
DEBUG
#define DEBUG
Definition: page_access.h:11
TrigL2BjetContainerCnv.h
T_AthenaPoolCustCnv::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.
TrigL2BjetContainer_p3.h