ATLAS Offline Software
TauDetailsContainerCnv.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 //-----------------------------------------------------------------------------
6 // file: TauDetailsContainerCnv.cxx
7 // author: Lukasz Janyst
8 // date: July 1007
9 //-----------------------------------------------------------------------------
10 
11 #include "GaudiKernel/MsgStream.h"
16 #include "TauDetailsContainerCnv.h"
17 
19 TauDetailsContainerCnv :: createPersistent( Analysis :: TauDetailsContainer *transCont )
20 {
21  MsgStream msg( msgSvc(), "TauDetailsContainerCnv" );
23  TauDetailsContainer_PERS *persObj = cnv.createPersistent( transCont, msg );
24  return persObj;
25 }
26 
27 Analysis :: TauDetailsContainer *TauDetailsContainerCnv :: createTransient()
28 {
29  MsgStream msg( msgSvc(), "TauDetailsContainerCnv" );
30 
31  Analysis :: TauDetailsContainer *transObj = 0;
32 
33  static const pool :: Guid p1_guid( "727655C6-9CF7-476F-8AB4-747834E1FB02" );
34  static const pool :: Guid p2_guid( "AF3C1607-E62F-46C0-8BF5-C26874647C07" );
35  static const pool :: Guid p3_guid( "5973152f-5913-4a0c-84de-5cd392945858" );
36  static const pool :: Guid p4_guid( "FA5D3190-EC7A-4608-A7C6-A154D7FEFE18" );
37 
38  if( compareClassGuid( p4_guid ) ){
39  // using unique_ptr ensures deletion of the persistent object
40  std :: unique_ptr<TauDetailsContainer_tlp4> persObj( poolReadObject<TauDetailsContainer_tlp4>() );
42  transObj = cnv.createTransient( persObj.get(), msg );
43  }
44  else if( compareClassGuid( p3_guid ) ){
45  // using unique_ptr ensures deletion of the persistent object
46  std :: unique_ptr<TauDetailsContainer_tlp3> persObj( poolReadObject<TauDetailsContainer_tlp3>() );
48  transObj = cnv.createTransient( persObj.get(), msg );
49  }
50  else if( compareClassGuid( p2_guid ) ){
51  // using unique_ptr ensures deletion of the persistent object
52  std :: unique_ptr<TauDetailsContainer_tlp2> persObj( poolReadObject<TauDetailsContainer_tlp2>() );
54  transObj = cnv.createTransient( persObj.get(), msg );
55  }
56  else if( compareClassGuid( p1_guid ) ){
57  // using unique_ptr ensures deletion of the persistent object
58  std :: unique_ptr<TauDetailsContainer_tlp1> persObj( poolReadObject<TauDetailsContainer_tlp1>() );
60  transObj = cnv.createTransient( persObj.get(), msg );
61  }
62  else
63  throw std::runtime_error("Unsupported persistent version of TauJetContainer");
64 
65  return transObj;
66 }
TauDetailsContainerCnv_tlp2.h
TauDetailsContainerCnv_tlp3
Tau details container converter.
Definition: TauDetailsContainerCnv_tlp3.h:25
TauDetailsContainerCnv_tlp3.h
TauDetailsContainerCnv_tlp2
Tau details container converter.
Definition: TauDetailsContainerCnv_tlp2.h:25
TauDetailsContainerCnv_tlp4.h
TauDetailsContainerCnv::createPersistent
virtual TauDetailsContainer_PERS * createPersistent(Analysis ::TauDetailsContainer *transCont)
Definition: TauDetailsContainerCnv.cxx:19
TauDetailsContainerCnv_tlp1
Tau details container converter.
Definition: TauDetailsContainerCnv_tlp1.h:42
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
TauDetailsContainerCnv.h
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
AthMessaging::msg
MsgStream & msg() const
The standard message stream.
Definition: AthMessaging.h:164
TauDetailsContainerCnv_tlp1.h
TauDetailsContainerCnv_tlp4
Tau details container converter.
Definition: TauDetailsContainerCnv_tlp4.h:30
TopLevelTPConverter::createPersistent
virtual TL_PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of transObj.
Definition: TopLevelTPConverter.h:110
TauDetailsContainer_tlp4
Persistent class for Analysis::TauDetailsContainer.
Definition: TauDetailsContainer_tlp4.h:34
T_AthenaPoolCustCnv< Analysis ::TauDetailsContainer, TauDetailsContainer_PERS >::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.
TauDetailsContainerCnv::createTransient
virtual Analysis ::TauDetailsContainer * createTransient()
Definition: TauDetailsContainerCnv.cxx:27