ATLAS Offline Software
LArLATOMEHeaderContainerCnv.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
9 #include <memory>
10 
13  m_p1_guid("7FE06234-8574-4514-86C7-1FD09E97D713")
14 {}
15 
17 
18  MsgStream log(msgSvc(), "LArLATOMEHeaderContainerCnv");
19  StoreGateSvc *detStore=nullptr;
20  StatusCode sc=service("DetectorStore",detStore);
21  if (sc.isFailure()) {
22  ATH_MSG_FATAL("DetectorStore service not found !");
23  return StatusCode::FAILURE;
24  }
26 }
27 
28 
30  MsgStream log(msgSvc(), "LArLATOMEHeaderContainerCnv");
31  log << MSG::DEBUG << "Writing LArDigitContainer_p2" << endmsg;
34  converter.transToPers(trans,pers,log);
35  return pers;
36 }
37 
38 
39 
41  MsgStream log(msgSvc(), "LArLATOMEHeaderContainerCnv" );
43  log << MSG::DEBUG << "Reading LArLATOMEHeaderContainer_p1. GUID="
44  << m_classID.toString() << endmsg;
46  std::unique_ptr<LArLATOMEHeaderContainer_p1> pers(poolReadObject<LArLATOMEHeaderContainer_p1>());
48  converter.persToTrans(pers.get(),trans, log);
49  return trans;
50  }
51  log << MSG::ERROR << "Unsupported persistent version of LArLATOMEHeaderContainer. GUID="
52  << m_classID.toString() << endmsg;
53  throw std::runtime_error("Unsupported persistent version of Data Collection");
54  // not reached
55 }
T_AthenaPoolCustCnv::m_classID
Guid m_classID
Definition: T_AthenaPoolCustCnv.h:96
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
LArLATOMEHeaderContainerCnv::initialize
virtual StatusCode initialize() override
Gaudi Service Interface method implementations:
Definition: LArLATOMEHeaderContainerCnv.cxx:16
LArLATOMEHeaderContainerCnv::createPersistent
virtual LArLATOMEHeaderContainerPERS * createPersistent(LArLATOMEHeaderContainer *) override
Definition: LArLATOMEHeaderContainerCnv.cxx:29
LArLATOMEHeaderContainer_p1.h
Guid::toString
const std::string toString() const
Automatic conversion to string representation.
Definition: Guid.cxx:58
LArLATOMEHeaderContainer
Container class for LArLATOMEHeader.
Definition: LArLATOMEHeaderContainer.h:19
LArLATOMEHeaderContainerCnv.h
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
LArLATOMEHeaderContainerCnv_p1.h
LArLATOMEHeaderContainer_p1
Definition: LArLATOMEHeaderContainer_p1.h:12
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:128
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
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LArLATOMEHeaderContainerCnv_p1::persToTrans
virtual void persToTrans(const LArLATOMEHeaderContainer_p1 *pers, LArLATOMEHeaderContainer *trans, MsgStream &log) const override
Definition: LArLATOMEHeaderContainerCnv_p1.cxx:11
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
LArLATOMEHeaderContainerCnv::m_p1_guid
pool::Guid m_p1_guid
Definition: LArLATOMEHeaderContainerCnv.h:26
LArLATOMEHeaderContainerPERS
LArLATOMEHeaderContainer_p1 LArLATOMEHeaderContainerPERS
Definition: LArLATOMEHeaderContainerCnv.h:13
LArLATOMEHeaderContainerCnv_p1::transToPers
virtual void transToPers(const LArLATOMEHeaderContainer *trans, LArLATOMEHeaderContainer_p1 *pers, MsgStream &log) const override
Definition: LArLATOMEHeaderContainerCnv_p1.cxx:32
LArLATOMEHeaderContainerCnv_p1
Definition: LArLATOMEHeaderContainerCnv_p1.h:15
LArLATOMEHeaderContainerCnv::createTransient
virtual LArLATOMEHeaderContainer * createTransient() override final
Definition: LArLATOMEHeaderContainerCnv.cxx:40
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
T_AthenaPoolCustCnv::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.
T_AthenaPoolCustCnv::initialize
virtual StatusCode initialize()
Gaudi Service Interface method implementations:
LArLATOMEHeaderContainer
Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Old Athena::TPCnvVers::Old Athena::TPCnvVers::Old LArLATOMEHeaderContainer
Definition: LArTPCnv.cxx:106
StoreGateSvc.h
LArLATOMEHeaderContainerCnv::LArLATOMEHeaderContainerCnv
LArLATOMEHeaderContainerCnv(ISvcLocator *)
Definition: LArLATOMEHeaderContainerCnv.cxx:11