ATLAS Offline Software
TBLArDigitContainerCnv.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
7 //#include "LArRawEvent/LArDigitContainer.h"
8 
9 
12  p0_guid("B15FFDA0-206D-4062-8B5F-582A1ECD5502"), // GUID of the transient object
13  p1_guid("9F58DDD2-ACDC-4ECF-A714-779B05F94649") // GUID of the persistent object
14 {}
15 
16 
17 
19  MsgStream log(msgSvc(), "TBLArDigitContainerCnv");
20  log << MSG::DEBUG << "Writing TBLArDigitContainer_p2" << endmsg;
22  m_converter.transToPers(trans,pers,log);
23  return pers;
24 }
25 
26 
27 
29  MsgStream log(msgSvc(), "TBLArDigitContainerCnv" );
32  log << MSG::DEBUG << "Read version p0 of TBLArDigitContainer. GUID="
33  << m_classID.toString() << endmsg;
34  return poolReadObject<TBLArDigitContainer>();
35  }
36  else if (compareClassGuid(p1_guid)) {
37  log << MSG::DEBUG << "Reading TBLArDigitContainer_p1. GUID="
38  << m_classID.toString() << endmsg;
39  TBLArDigitContainer_p1* pers=poolReadObject<TBLArDigitContainer_p1>();
40  m_converter.persToTrans(pers,trans, log);
41  delete pers;
42  return trans;
43  }
44  else {
45  log << MSG::ERROR << "Unsupported persistent version of TBLArDigitContainer. GUID="
46  << m_classID.toString() << endmsg;
47  throw std::runtime_error("Unsupported persistent version of Data Collection");
48  }
49  return trans;
50 }
51 
T_AthenaPoolCustCnv::m_classID
Guid m_classID
Definition: T_AthenaPoolCustCnv.h:96
TBLArDigitContainerCnv::p1_guid
pool::Guid p1_guid
Definition: TBLArDigitContainerCnv.h:38
Guid::toString
const std::string toString() const
Automatic conversion to string representation.
Definition: Guid.cxx:58
TBLArDigitContainerCnv::p0_guid
pool::Guid p0_guid
Definition: TBLArDigitContainerCnv.h:37
TBLArDigitContainerCnv::createTransient
virtual TBLArDigitContainer * createTransient()
Definition: TBLArDigitContainerCnv.cxx:28
TBLArDigitContainerPERS
TBLArDigitContainer_p1 TBLArDigitContainerPERS
Definition: TBLArDigitContainerCnv.h:22
TBLArDigitContainerCnv::createPersistent
virtual TBLArDigitContainerPERS * createPersistent(TBLArDigitContainer *)
Definition: TBLArDigitContainerCnv.cxx:18
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
TBLArDigitContainerCnv::TBLArDigitContainerCnv
TBLArDigitContainerCnv(ISvcLocator *)
Definition: TBLArDigitContainerCnv.cxx:10
TBLArDigitContainerCnv_p1::persToTrans
virtual void persToTrans(const TBLArDigitContainer_p1 *pers, TBLArDigitContainer *trans, MsgStream &log) const override
Definition: TBLArDigitContainerCnv_p1.cxx:14
TBLArDigitContainerCnv::m_converter
TBLArDigitContainerCnv_p1 m_converter
Definition: TBLArDigitContainerCnv.h:36
TBLArDigitContainer_p1
Definition: TBLArDigitContainer_p1.h:17
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
TBLArDigitContainerCnv.h
TBLArDigitContainer_p1.h
T_AthenaPoolCustCnv::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.
TBLArDigitContainer
Gaudi Class ID.
Definition: TBLArDigitContainer.h:40
TBLArDigitContainerCnv_p1::transToPers
virtual void transToPers(const TBLArDigitContainer *trans, TBLArDigitContainer_p1 *pers, MsgStream &log) const override
Definition: TBLArDigitContainerCnv_p1.cxx:45