ATLAS Offline Software
SkimDecisionCollectionCnv.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 // File for class SkimDecisionCollectionCnv
7 // Author: David Cote, September 2008. <david.cote@cern.ch>
9 
11 
13  MsgStream log(msgSvc(), "SkimDecisionCollectionConverter" );
15 
16  log << MSG::DEBUG << "Success" << endmsg;
17  return persObj;
18 }
19 
21  MsgStream log(msgSvc(), "SkimDecisionCollectionConverter" );
22  //p1_guid matches the number in EventBookkeeperTPCnv/selection.xtml and is generated with uuidgen | tr "[:lower:]" "[:upper:]"
23  static const pool::Guid p1_guid("5705559E-F062-4F15-A220-78A8542EFBF3");
24  if( compareClassGuid(p1_guid) ) {
25  // using unique_ptr ensures deletion of the persistent object
26  std::unique_ptr< SkimDecisionCollection_p1 > col_vect( poolReadObject< SkimDecisionCollection_p1 >() );
27  return m_TPConverter.createTransient( col_vect.get(), log );
28  }
29  else {
30  throw std::runtime_error("Unsupported persistent version of SkimDecisionCollection");
31  }
32 }
33 
TPPolyCnvBase::createTransient
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
SkimDecisionCollectionCnv.h
SkimDecisionCollection
Definition: SkimDecisionCollection.h:21
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
SkimDecisionCollection_p1
Definition: SkimDecisionCollection_p1.h:12
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
SkimDecisionCollectionCnv::createTransient
virtual SkimDecisionCollection * createTransient()
Definition: SkimDecisionCollectionCnv.cxx:20
SkimDecisionCollectionCnv::m_TPConverter
SkimDecisionCollectionCnv_p1 m_TPConverter
Definition: SkimDecisionCollectionCnv.h:34
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
SkimDecisionCollectionCnv::createPersistent
virtual SkimDecisionCollection_PERS * createPersistent(SkimDecisionCollection *transCont)
Definition: SkimDecisionCollectionCnv.cxx:12
T_AthenaPoolCustCnv::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.