ATLAS Offline Software
SkimDecisionCnv.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 SkimDecisionCnv
7 // Author: David Cote, September 2008. <david.cote@cern.ch>
9 
10 #include "SkimDecisionCnv.h"
11 
13  MsgStream log(msgSvc(), "SkimDecisionConverter" );
14  SkimDecision_PERS * persObj = m_TPConverter.createPersistent( transCont, log );
15 
16  log << MSG::DEBUG << "Success" << endmsg;
17  return persObj;
18 }
19 
21  MsgStream log(msgSvc(), "SkimDecisionConverter" );
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("61CEDFF0-46DD-42BD-B43A-12F850D3752E");
24  if( compareClassGuid(p1_guid) ) {
25  // using unique_ptr ensures deletion of the persistent object
26  std::unique_ptr< SkimDecision_p1 > col_vect( poolReadObject< SkimDecision_p1 >() );
27  return m_TPConverter.createTransient( col_vect.get(), log );
28  }
29  else {
30  throw std::runtime_error("Unsupported persistent version of SkimDecision");
31  }
32 }
33 
SkimDecision_p1
Definition: SkimDecision_p1.h:15
SkimDecisionCnv.h
TPPolyCnvBase::createTransient
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
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
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
SkimDecisionCnv::m_TPConverter
SkimDecisionCnv_p1 m_TPConverter
Definition: SkimDecisionCnv.h:34
SkimDecision
Definition: SkimDecision.h:16
T_AthenaPoolCustCnv::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.
SkimDecisionCnv::createPersistent
virtual SkimDecision_PERS * createPersistent(SkimDecision *transCont)
Definition: SkimDecisionCnv.cxx:12
SkimDecisionCnv::createTransient
virtual SkimDecision * createTransient()
Definition: SkimDecisionCnv.cxx:20