ATLAS Offline Software
TrigT2MbtsBitsContainerCnv.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 //createPersistent
9 {
10  MsgStream mlog(msgSvc(), "TrigT2MbtsBitsContainerConverter" );
11 
12  mlog << MSG::DEBUG << "TrigT2MbtsBitsContainerCnv::createPersistent" << endmsg;
13 
15 
16  return persObj;
17 
18 }//end of create persistent method
19 
20 
21 //createTransient
23 {
24  MsgStream mlog(msgSvc(), "TrigT2MbtsBitsContainerConverter" );
25 
26  mlog << MSG::DEBUG << "TrigT2MbtsBitsContainerCnv::createTransient" << endmsg;
27 
28  static const pool::Guid p3_guid( "60BD805D-F64E-46DF-87CD-0B4443660C97" );
29  static const pool::Guid tlp1_guid( "82BAAC80-62FC-4E6D-9BD7-1619064FF7AC" );
30  static const pool::Guid p1_guid( "139D9BFE-0944-44A6-8D9E-10CEEF8B30B9" );
31  static const pool::Guid trans_guid( "BBB00ED0-1D5C-4C73-8785-6BF239D07816" );
32 
33  if( compareClassGuid( p3_guid ) ){
34 
35  std::unique_ptr< TrigT2MbtsBitsContainer_p3 > col_vect( poolReadObject< TrigT2MbtsBitsContainer_p3 >() );
36  // std::cout << "Reading IMFC p3" << std::endl;
37  return m_converter.createTransient( col_vect.get(), mlog ) ;
38 
39  } else if(compareClassGuid(tlp1_guid)) {
40 
41  std::unique_ptr< TrigT2MbtsBitsContainer_tlp1 > col_vect( poolReadObject< TrigT2MbtsBitsContainer_tlp1 >() );
42  // std::cout << "Reading IMFC tlp1" << std::endl;
43  return m_converter_tlp1.createTransient( col_vect.get(), mlog );
44 
45  } else if(compareClassGuid(p1_guid)) {
46 
47  std::unique_ptr< TrigT2MbtsBitsContainer_p1 > col_vect( poolReadObject< TrigT2MbtsBitsContainer_p1 >() );
48  return m_converter_p1.createTransient( col_vect.get(), mlog );
49 
50  } else if(compareClassGuid(trans_guid)) {
51 
52  return poolReadObject<TrigT2MbtsBitsContainer>();
53 
54  } else {
55 
56  throw std::runtime_error( "Unsupported persistent version of TrigT2MbtsBitsContainer" );
57 
58  }
59 
60 }//end of create transient method
61 
TrigT2MbtsBitsContainer_p3
Definition: TrigT2MbtsBitsContainer_p3.h:11
TPPolyCnvBase::createTransient
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
TrigT2MbtsBitsContainerCnv::createTransient
virtual TrigT2MbtsBitsContainer * createTransient()
Definition: TrigT2MbtsBitsContainerCnv.cxx:22
TPAbstractPolyCnvBase::createPersistent
virtual PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of a transient object.
TrigT2MbtsBitsContainerCnv.h
pool::Guid
::Guid Guid
Definition: T_AthenaPoolCustCnv.h:19
TrigT2MbtsBitsContainer
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigT2MbtsBitsContainer.h:13
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
TrigT2MbtsBitsContainerCnv::m_converter_tlp1
TrigT2MbtsBitsContainerCnv_tlp1 m_converter_tlp1
Definition: TrigT2MbtsBitsContainerCnv.h:32
TrigT2MbtsBitsContainerCnv::m_converter_p1
TrigT2MbtsBitsContainerCnv_p1 m_converter_p1
Definition: TrigT2MbtsBitsContainerCnv.h:33
TrigT2MbtsBitsContainerCnv::m_converter
TrigT2MbtsBitsContainerCnv_p3 m_converter
Definition: TrigT2MbtsBitsContainerCnv.h:34
DEBUG
#define DEBUG
Definition: page_access.h:11
TrigT2MbtsBitsContainerCnv::createPersistent
virtual TrigT2MbtsBitsContainer_PERS * createPersistent(TrigT2MbtsBitsContainer *transObj)
Definition: TrigT2MbtsBitsContainerCnv.cxx:8
T_AthenaPoolCustCnv::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.