ATLAS Offline Software
LumiBlockCollectionCnv.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 LumiBlockCollectionCnv
7 // Author: Marjorie Shapiro <mdshapiro@lbl.gov>
9 
10 #include "LumiBlockCollectionCnv.h"
11 
12 
14  MsgStream log(msgSvc(), "LumiBlockCollectionConverter" );
15  LumiBlockCollection_PERS * persObj = m_converter.createPersistent( transCont, log );
16 
17  log << MSG::DEBUG << "Success" << endmsg;
18  return persObj;
19 }
20 
22  MsgStream log(msgSvc(), "LumiBlockCollectionConverter" );
23  static const pool::Guid p1_guid("CF1F40C9-6125-4C35-87FF-DDA2C319000C");
24  static const pool::Guid p2_guid("DEF9282A-F174-4382-8248-B94567CD869F");
25 
26  if( compareClassGuid(p2_guid) ) {
27  std::unique_ptr< LumiBlockCollection_p2 > col_vect( poolReadObject< LumiBlockCollection_p2 >() );
28  return m_converter.createTransient( col_vect.get(), log );
29  }
30  else if( compareClassGuid(p1_guid) ) {
31  std::unique_ptr< LumiBlockCollection_p1 > col_vect( poolReadObject< LumiBlockCollection_p1 >() );
32  return m_converter_p1.createTransient( col_vect.get(), log );
33  }
34  else {
35  throw std::runtime_error("Unsupported persistent version of LumiBlockCollection");
36  }
37 }
TPPolyCnvBase::createTransient
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
LumiBlockCollectionCnv::createTransient
virtual LumiBlockCollection * createTransient()
Definition: LumiBlockCollectionCnv.cxx:21
TPAbstractPolyCnvBase::createPersistent
virtual PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of a transient object.
LumiBlockCollectionCnv::m_converter
LumiBlockCollectionCnv_p2 m_converter
Definition: LumiBlockCollectionCnv.h:35
LumiBlockCollectionCnv::m_converter_p1
LumiBlockCollectionCnv_p1 m_converter_p1
Definition: LumiBlockCollectionCnv.h:34
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
LumiBlockCollection
Definition: LumiBlockCollection.h:21
LumiBlockCollectionCnv::createPersistent
virtual LumiBlockCollection_PERS * createPersistent(LumiBlockCollection *transCont)
Definition: LumiBlockCollectionCnv.cxx:13
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
LumiBlockCollectionCnv.h
T_AthenaPoolCustCnv::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.
LumiBlockCollection_p2
Definition: LumiBlockCollection_p2.h:11