ATLAS Offline Software
TrigInDetTrackCollectionCnv.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 
10 
13 
16 
19 
20 //constructor
23  m_tlp_Converter (new TrigInDetTrackCollectionCnv_PERS)
24 {}
25 
26 //destructor
28 {
29  delete m_tlp_Converter;
30 }
31 
32 
33 //create persistent
35  MsgStream mlog(msgSvc(), "TrigInDetTrackCollectionConverter" );
36  mlog << MSG::DEBUG << "TrigInDetTrackCollectionCnv::createPersistent" << endmsg;
37 
39 
40  return persObj;
41 }
42 
43 //create transient
45 
46  MsgStream mlog(msgSvc(), "TrigInDetTrackCollectionConverter" );
47  mlog << MSG::DEBUG << "TrigInDetTrackCollectionCnv::createTransient " << endmsg;
48 
49  static const pool::Guid tlp4_guid("E1B8EE19-4F7B-4EF2-8FDC-45AA871BD628");
50  static const pool::Guid tlp3_guid("196F811B-382D-47A9-8551-D2038343BFFA");
51  static const pool::Guid tlp2_guid("4DBBB46F-33C9-4571-AE5E-A2335D7A2976");
52  static const pool::Guid tlp1_guid("0B5CA4CA-0A0F-43DC-8973-0E2212B2E8DA");
53  static const pool::Guid p0_guid("5F6029E6-764B-4126-891D-73BFC3CC391C");
54 
55  TrigInDetTrackCollection *transObj = 0;
56  if( compareClassGuid(tlp4_guid) ) {
57 
58  mlog << MSG::DEBUG << "TrigInDetTrackCollectionCnv::reading tlp4 persistent object" << endmsg;
59  TrigInDetTrackCollectionCnv_tlp4 tlp4_Converter;
60  poolReadObject< TrigInDetTrackCollection_tlp4 >( tlp4_Converter );
61  transObj = tlp4_Converter.createTransient( mlog );
62  } else if( compareClassGuid(tlp3_guid) ) {
63 
64  mlog << MSG::DEBUG << "TrigInDetTrackCollectionCnv::reading tlp3 persistent object" << endmsg;
65  TrigInDetTrackCollectionCnv_tlp3 tlp3_Converter;
66  poolReadObject< TrigInDetTrackCollection_tlp3 >( tlp3_Converter );
67  transObj = tlp3_Converter.createTransient( mlog );
68  } else if( compareClassGuid(tlp2_guid) ) {
69 
70  mlog << MSG::DEBUG << "TrigInDetTrackCollectionCnv::reading tlp2 persistent object" << endmsg;
71  TrigInDetTrackCollectionCnv_tlp2 tlp2_Converter;
72  poolReadObject< TrigInDetTrackCollection_tlp2 >( tlp2_Converter );
73  transObj = tlp2_Converter.createTransient( mlog );
74  } else if( compareClassGuid(tlp1_guid) ) {
75 
76  mlog << MSG::DEBUG << "TrigInDetTrackCollectionCnv::reading tlp1 persistent object" << endmsg;
77  TrigInDetTrackCollectionCnv_tlp1 tlp1_Converter;
78  poolReadObject< TrigInDetTrackCollection_tlp1 >( tlp1_Converter );
79  transObj = tlp1_Converter.createTransient( mlog );
80 
81  }
82 
83  else if( compareClassGuid(p0_guid) ) {
84 
85  mlog << MSG::DEBUG << "TrigInDetTrackCollectionCnv::reading p0 persistent object" << endmsg;
86  // old version from before TP separation, just return it
87  transObj = this->poolReadObject<TrigInDetTrackCollection>();
88  }
89  else {
90  throw std::runtime_error("Unsupported persistent version of Data container");
91  }
92 
93  return transObj;
94 }
TrigInDetTrackCollection_tlp4
Definition: TrigInDetTrackCollection_tlp4.h:21
TrigInDetTrackCollectionCnv_tlp2.h
TrigInDetTrackCollectionCnv::TrigInDetTrackCollectionCnv
TrigInDetTrackCollectionCnv(ISvcLocator *svcloc)
Definition: TrigInDetTrackCollectionCnv.cxx:21
TrigInDetTrackCollectionCnv_tlp1.h
TrigInDetTrackCollection
Definition: TrigInDetTrackCollection.h:13
TrigInDetTrackCollectionCnv::createTransient
virtual TrigInDetTrackCollection * createTransient()
Definition: TrigInDetTrackCollectionCnv.cxx:44
CSV_InDetExporter.new
new
Definition: CSV_InDetExporter.py:145
TrigInDetTrackCollectionCnv_tlp2
Definition: TrigInDetTrackCollectionCnv_tlp2.h:30
TrigInDetTrackCollection_tlp4.h
TrigInDetTrackCollectionCnv::m_tlp_Converter
TrigInDetTrackCollectionCnv_PERS * m_tlp_Converter
Definition: TrigInDetTrackCollectionCnv.h:47
TrigInDetTrackCollection_tlp3.h
pool::Guid
::Guid Guid
Definition: T_AthenaPoolCustCnv.h:19
TrigInDetTrackCollectionCnv_tlp1
Definition: TrigInDetTrackCollectionCnv_tlp1.h:32
TopLevelTPConverter::createTransient
TRANS * createTransient(MsgStream &log)
Create transient representation of the persistent object known to this converter.
Definition: TopLevelTPConverter.h:62
python.InDetPriVxFinderConfig.mlog
mlog
Definition: InDetPriVxFinderConfig.py:134
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
TrigInDetTrackCollection_tlp1.h
TrigInDetTrackCollection_tlp2.h
TrigInDetTrackCollectionCnv.h
TrigInDetTrackCollectionCnv::~TrigInDetTrackCollectionCnv
~TrigInDetTrackCollectionCnv()
Definition: TrigInDetTrackCollectionCnv.cxx:27
TrigInDetTrackCollectionCnv_tlp3.h
TrigInDetTrackCollectionCnv_tlp4
Definition: TrigInDetTrackCollectionCnv_tlp4.h:25
DEBUG
#define DEBUG
Definition: page_access.h:11
TopLevelTPConverter::createPersistent
virtual TL_PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of transObj.
Definition: TopLevelTPConverter.h:110
TrigInDetTrackCollectionCnv_tlp4.h
T_AthenaPoolCustCnv::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.
TrigInDetTrackCollectionCnv::createPersistent
virtual TrigInDetTrackCollection_PERS * createPersistent(TrigInDetTrackCollection *transObj)
Definition: TrigInDetTrackCollectionCnv.cxx:34
TrigInDetTrackCollectionCnv_tlp3
Definition: TrigInDetTrackCollectionCnv_tlp3.h:30