ATLAS Offline Software
RingerRingsCnv.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "RingerRingsCnv.h"
7 
8 RingerRingsCnv::RingerRingsCnv(ISvcLocator* svcloc) :
10  m_TPConverter (new RingerRingsCnv_tlp1)
11 { }
13 {
14  delete m_TPConverter;
15 }
16 
17 
18 
20  MsgStream mlog(msgSvc(), "RingerRingsConverter" );
21  mlog << MSG::DEBUG << "RingerRingsCnv::createPersistent" << endmsg;
22 
23  RingerRings_PERS *persObj = m_TPConverter->createPersistent(transCont, mlog);
24 
25  return persObj;
26 }
27 
28 
30  MsgStream mlog(msgSvc(), "RingerRingsConverter" );
31  mlog << MSG::DEBUG << "RingerRingsCnv::createTransient " << endmsg;
32 
33  static const pool::Guid tlp1_guid("7A3BC015-8ECE-44A9-A2BD-9D52B3D2B354");
34 
35  RingerRings *trans_cont(0);
36 
37  if (compareClassGuid(tlp1_guid) ) {
38  mlog << MSG::DEBUG << "RingerRingsCnv::reading tlp1 persistent object" << endmsg;
39  std::unique_ptr<RingerRings_tlp1> col_vect(this->poolReadObject<RingerRings_tlp1>());
40  trans_cont = m_TPConverter->createTransient(col_vect.get(), mlog);
41  } else {
42  throw std::runtime_error("Unsupported persistent version of Data container");
43  }
44  return trans_cont;
45 }
46 
RingerRingsCnv::RingerRingsCnv
RingerRingsCnv(ISvcLocator *svcloc)
Definition: RingerRingsCnv.cxx:8
CSV_InDetExporter.new
new
Definition: CSV_InDetExporter.py:145
RingerRings_tlp1
Definition: RingerRings_tlp1.h:23
pool::Guid
::Guid Guid
Definition: T_AthenaPoolCustCnv.h:19
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:139
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
T_AthenaPoolCustomCnv
Compatibility for old converter classes that don't get passed the key.
Definition: T_AthenaPoolCustomCnv.h:132
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
RingerRingsCnv::~RingerRingsCnv
~RingerRingsCnv()
Definition: RingerRingsCnv.cxx:12
RingerRingsCnv::m_TPConverter
RingerRingsCnv_tlp1 * m_TPConverter
Definition: RingerRingsCnv.h:47
RingerRingsCnv_tlp1.h
RingerRingsCnv_tlp1
Definition: RingerRingsCnv_tlp1.h:25
RingerRings
This class carries the generated Rings.
Definition: RingerRings.h:18
RingerRingsCnv::createPersistent
RingerRings_PERS * createPersistent(RingerRings *transCont)
Definition: RingerRingsCnv.cxx:19
RingerRingsCnv::createTransient
RingerRings * createTransient()
Definition: RingerRingsCnv.cxx:29
DEBUG
#define DEBUG
Definition: page_access.h:11
TopLevelTPConverter::createPersistent
virtual TL_PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of transObj.
Definition: TopLevelTPConverter.h:110
T_AthenaPoolCustCnv< RingerRings, RingerRings_PERS >::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.
RingerRingsCnv.h