ATLAS Offline Software
TruthEtIsolationsContainerCnv.cxx
Go to the documentation of this file.
1 
3 /*
4  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // TruthEtIsolationsContainerCnv.cxx
8 // Implementation file for class TruthEtIsolationsContainerCnv
9 // Author: S.Binet<binet@cern.ch>
11 
12 // STL includes
13 
14 // Framework includes
15 #include "GaudiKernel/MsgStream.h"
16 
17 // McParticleEventTPCnv includes
19 
20 // McParticleEventAthenaPool includes
22 
26 
30 
32 // Protected methods:
34 
38 {}
39 
40 
43 {
44  MsgStream msg( msgSvc(), "TruthEtIsolationsContainerCnv" );
45 
48 
49  msg << MSG::DEBUG << "::createPersistent [Success]" << endmsg;
50  return pers;
51 }
52 
54 {
55  MsgStream msg( msgSvc(), "TruthEtIsolationsContainerCnv" );
56 
57  TruthEtIsolationsContainer *trans = 0;
58 
59  //static pool::Guid tr_guid("003AE8C0-B033-4470-9F3D-869724F34E48");
60  static const pool::Guid p1_guid("EB6EC9D5-4D99-4565-9E4A-65BE1C21B35D");
61 
62  if ( compareClassGuid(p1_guid) ) {
63 
64  std::unique_ptr<TruthEtIsolationsContainer_p1> pers( poolReadObject<TruthEtIsolationsContainer_p1>() );
66  trans = cnv.createTransient( pers.get(), msg );
67 
68  } else {
69  throw std::runtime_error("Unsupported persistent version of TruthEtIsolationsContainer");
70  }
71 
72  return trans;
73 }
TruthEtIsolationsContainerCnv::createPersistent
virtual TruthEtIsolationsContainer_PERS * createPersistent(TruthEtIsolationsContainer *transCont)
Build the persistent representation from the transient one.
Definition: TruthEtIsolationsContainerCnv.cxx:42
TruthEtIsolationsContainerCnv.h
TPPolyCnvBase::createTransient
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
TruthEtIsolationsContainer
Definition: TruthEtIsolationsContainer.h:26
TPAbstractPolyCnvBase::createPersistent
virtual PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of a transient object.
pool::Guid
::Guid Guid
Definition: T_AthenaPoolCustCnv.h:19
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
TruthEtIsolationsContainerCnv_p1.h
AthMessaging::msg
MsgStream & msg() const
The standard message stream.
Definition: AthMessaging.h:164
TruthEtIsolationsContainerCnv::createTransient
virtual TruthEtIsolationsContainer * createTransient()
Build the transient representation from a persistent one.
Definition: TruthEtIsolationsContainerCnv.cxx:53
TruthEtIsolationsContainer_p1
Definition: TruthEtIsolationsContainer_p1.h:22
DEBUG
#define DEBUG
Definition: page_access.h:11
TPCnvVector
Definition: TPConverter.h:1256
T_AthenaPoolCustCnv< TruthEtIsolationsContainer, TruthEtIsolationsContainer_PERS >::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.
TruthEtIsolationsContainerCnv::TruthEtIsolationsContainerCnv
TruthEtIsolationsContainerCnv(ISvcLocator *svcloc)
Create the converter from the service locator.
Definition: TruthEtIsolationsContainerCnv.cxx:35