ATLAS Offline Software
Loading...
Searching...
No Matches
RecoTimingObjCnv.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
6// Framework includes
7#include "GaudiKernel/MsgStream.h"
8
9// RecTPCnv includes
11
12// RecAthenaPool includes
13#include "RecoTimingObjCnv.h"
14
17{
18 // MsgStream msg( msgSvc(), "RecoTimingObjCnv" );
19 if ( ! bool(m_msg) )
20 m_msg=new MsgStream( msgSvc(), "RecoTimingObjCnv" );
21
23 RecoTimingObj_PERS *persObj = cnv.createPersistent( transCont, *m_msg );
24
25 // msg << MSG::DEBUG << "::createPersistent [Success]" << endmsg;
26 return persObj;
27}
28
30{
31 // MsgStream msg( msgSvc(), "RecoTimingObjCnv" );
32 if ( ! bool(m_msg) )
33 m_msg=new MsgStream( msgSvc(), "RecoTimingObjCnv" );
34
35 RecoTimingObj *transObj = 0;
36
37 static const pool::Guid p1_guid("4A28542C-DD7F-441A-9866-37A74ED49850");
38
39 if ( compareClassGuid(p1_guid) )
40 {
41 std::unique_ptr<RecoTimingObj_p1> persObj( poolReadObject<RecoTimingObj_p1>() );
43 transObj = cnv.createTransient( persObj.get(), *m_msg );
44 } else {
45 throw std::runtime_error("Unsupported persistent version of RecoTimingObj");
46 }
47
48 return transObj;
49}
RecoTimingObj_p1 RecoTimingObj_PERS
virtual RecoTimingObj * createTransient()
Build the transient representation from a persistent one.
virtual RecoTimingObj_PERS * createPersistent(RecoTimingObj *transCont)
Build the persistent representation from the transient one.
virtual PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of a transient object.
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
virtual bool compareClassGuid(const Guid &clid) const