ATLAS Offline Software
TrigRoiDescriptorCnv.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 // #ifndef XAOD_ANALYSIS
6 
7 #include "TrigRoiDescriptorCnv.h"
14 
15 
20 };
21 
24  m_TPConverters (new TrigRoiDescriptorCnv_tp )
25 {
26 }
28 {
29  delete m_TPConverters;
30 }
31 
32 //create persistent
34 {
35  MsgStream mlog(msgSvc(), "TrigRoiDescriptorConverter" );
36 
38 
39  return persObj;
40 }
41 
42 //createTransient
44 {
45  MsgStream mlog(msgSvc(), "TrigRoiDescriptorConverter" );
46 
47  static const pool::Guid p3_guid("28F5BCC8-1F3D-47B1-8286-087F1B298F0A");
48  static const pool::Guid p2_guid("D53CE59B-99A8-4B25-87D5-C08D1AF4BA8A");
49  static const pool::Guid p1_guid("391FFE21-5D82-471E-9FFC-B77150142B8F");
50  static const pool::Guid p0_guid("B2C86E23-8421-4F34-8014-AE4A7E4BA0A7");
51 
52  TrigRoiDescriptor *trans_obj(0);
53 
54  if( compareClassGuid(p3_guid) ) {
55 
56  std::unique_ptr< TrigRoiDescriptor_p3 > col_vect( this->poolReadObject< TrigRoiDescriptor_p3 >() );
57  trans_obj = m_TPConverters->p3.createTransient( col_vect.get(), mlog );
58 
59  }
60  else if( compareClassGuid(p2_guid) ) {
61 
62  std::unique_ptr< TrigRoiDescriptor_p2 > col_vect( this->poolReadObject< TrigRoiDescriptor_p2 >() );
63  trans_obj = m_TPConverters->p2.createTransient( col_vect.get(), mlog );
64 
65  }
66  else if( compareClassGuid(p1_guid) ) {
67 
68  std::unique_ptr< TrigRoiDescriptor_p1 > col_vect( this->poolReadObject< TrigRoiDescriptor_p1 >() );
69  trans_obj = m_TPConverters->p1.createTransient( col_vect.get(), mlog );
70 
71  }
72  else if( compareClassGuid(p0_guid) ) {
73 
74  // old version from before TP separation, just return it
75  trans_obj = this->poolReadObject<TrigRoiDescriptor>();
76 
77  } else {
78 
79  throw std::runtime_error("Unsupported persistent version of Data container");
80  }
81 
82  return trans_obj;
83 
84 }
85 
86 // #endif
TrigRoiDescriptorCnv_tp::p3
TrigRoiDescriptorCnv_p3 p3
Definition: TrigRoiDescriptorCnv.cxx:19
TrigRoiDescriptorCnv::m_TPConverters
TrigRoiDescriptorCnv_tp * m_TPConverters
Definition: TrigRoiDescriptorCnv.h:48
TPPolyCnvBase::createTransient
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
TrigRoiDescriptorCnv_p2
Definition: TrigRoiDescriptorCnv_p2.h:28
CSV_InDetExporter.new
new
Definition: CSV_InDetExporter.py:145
TrigRoiDescriptorCnv_p3.h
TrigRoiDescriptor
nope - should be used for standalone also, perhaps need to protect the class def bits #ifndef XAOD_AN...
Definition: TrigRoiDescriptor.h:56
TrigRoiDescriptorCnv_tp::p2
TrigRoiDescriptorCnv_p2 p2
Definition: TrigRoiDescriptorCnv.cxx:18
TrigRoiDescriptorCnv_p2.h
TPAbstractPolyCnvBase::createPersistent
virtual PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of a transient object.
TrigRoiDescriptorCnv_p1.h
TrigRoiDescriptorCnv::createPersistent
TrigRoiDescriptor_PERS * createPersistent(TrigRoiDescriptor *transObj)
Definition: TrigRoiDescriptorCnv.cxx:33
pool::Guid
::Guid Guid
Definition: T_AthenaPoolCustCnv.h:19
TrigRoiDescriptorCnv_p1
Definition: TrigRoiDescriptorCnv_p1.h:30
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
TrigRoiDescriptor_p3
Definition: TrigRoiDescriptor_p3.h:21
TrigRoiDescriptorCnv_tp
Definition: TrigRoiDescriptorCnv.cxx:16
TrigRoiDescriptorCnv::createTransient
TrigRoiDescriptor * createTransient()
Definition: TrigRoiDescriptorCnv.cxx:43
TrigRoiDescriptor_p2.h
TrigRoiDescriptorCnv.h
TrigRoiDescriptor_p1.h
TrigRoiDescriptorCnv::TrigRoiDescriptorCnv
TrigRoiDescriptorCnv(ISvcLocator *svcloc)
Definition: TrigRoiDescriptorCnv.cxx:22
TrigRoiDescriptor_p3.h
TrigRoiDescriptorCnv_p3
Definition: TrigRoiDescriptorCnv_p3.h:28
T_AthenaPoolCustCnv< TrigRoiDescriptor, TrigRoiDescriptor_PERS >::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.
TrigRoiDescriptorCnv::~TrigRoiDescriptorCnv
~TrigRoiDescriptorCnv()
Definition: TrigRoiDescriptorCnv.cxx:27
TrigRoiDescriptorCnv_tp::p1
TrigRoiDescriptorCnv_p1 p1
Definition: TrigRoiDescriptorCnv.cxx:17