ATLAS Offline Software
TBTriggerPatternUnitCnv.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
8  MsgStream log(msgSvc(), "TBTriggerPatternUnitConverter" );
10  log << MSG::DEBUG << "Success" << endmsg;
11  return persObj;
12 }
13 
15  MsgStream log(msgSvc(), "TBTriggerPatternUnitConverter" );
16  static const pool::Guid p1_guid("7630C108-3B5F-4ED3-97C8-F3148AF1B84F"); // GUID of the persistent object
17  static const pool::Guid p0_guid("0B82A5B3-0808-4B78-B47B-BFE9388EEEEB"); // GUID of the transient object
18  if( compareClassGuid(p1_guid) ) {
19  // using unique_ptr ensures deletion of the persistent object
20  std::unique_ptr< TBTriggerPatternUnit_p1 > col_vect( poolReadObject< TBTriggerPatternUnit_p1 >() );
21  return m_TPConverter.createTransient( col_vect.get(), log );
22  }
23  else if( compareClassGuid(p0_guid) ) {
24  // regular object from before TP separation, just return it
25  return poolReadObject< TBTriggerPatternUnit >();
26  }
27  throw std::runtime_error("Unsupported persistent version of Data Collection");
28 }
29 
TPPolyCnvBase::createTransient
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
TBTriggerPatternUnit_p1
Definition: TBTriggerPatternUnit_p1.h:15
TPAbstractPolyCnvBase::createPersistent
virtual PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of a transient object.
pool::Guid
::Guid Guid
Definition: T_AthenaPoolCustCnv.h:19
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
TBTriggerPatternUnitCnv.h
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
TBTriggerPatternUnitCnv::m_TPConverter
TBTriggerPatternUnitCnv_p1 m_TPConverter
Definition: TBTriggerPatternUnitCnv.h:32
TBTriggerPatternUnitCnv::createTransient
virtual TBTriggerPatternUnit * createTransient()
Definition: TBTriggerPatternUnitCnv.cxx:14
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
TBTriggerPatternUnit
Definition: TBTriggerPatternUnit.h:27
T_AthenaPoolCustCnv::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.
TBTriggerPatternUnitCnv::createPersistent
virtual TBTriggerPatternUnit_PERS * createPersistent(TBTriggerPatternUnit *transCont)
Definition: TBTriggerPatternUnitCnv.cxx:7