ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigEvent
TrigSteeringEventAthenaPool
src
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
"
8
#include "
TrigSteeringEventTPCnv/TrigRoiDescriptor_p1.h
"
9
#include "
TrigSteeringEventTPCnv/TrigRoiDescriptor_p2.h
"
10
#include "
TrigSteeringEventTPCnv/TrigRoiDescriptor_p3.h
"
11
#include "
TrigSteeringEventTPCnv/TrigRoiDescriptorCnv_p1.h
"
12
#include "
TrigSteeringEventTPCnv/TrigRoiDescriptorCnv_p2.h
"
13
#include "
TrigSteeringEventTPCnv/TrigRoiDescriptorCnv_p3.h
"
14
15
16
struct
TrigRoiDescriptorCnv_tp
{
17
TrigRoiDescriptorCnv_p1
p1
;
18
TrigRoiDescriptorCnv_p2
p2
;
19
TrigRoiDescriptorCnv_p3
p3
;
20
};
21
22
TrigRoiDescriptorCnv::TrigRoiDescriptorCnv
(ISvcLocator* svcloc) :
23
T_AthenaPoolCustomCnv
<
TrigRoiDescriptor
,
TrigRoiDescriptor_PERS
>( svcloc ),
24
m_TPConverters
(new
TrigRoiDescriptorCnv_tp
)
25
{
26
}
27
TrigRoiDescriptorCnv::~TrigRoiDescriptorCnv
()
28
{
29
delete
m_TPConverters
;
30
}
31
32
//create persistent
33
TrigRoiDescriptor_PERS
*
TrigRoiDescriptorCnv::createPersistent
(
TrigRoiDescriptor
* transObj)
34
{
35
MsgStream mlog(msgSvc(),
"TrigRoiDescriptorConverter"
);
36
37
TrigRoiDescriptor_PERS
*persObj =
m_TPConverters
->p3.createPersistent( transObj, mlog );
38
39
return
persObj;
40
}
41
42
//createTransient
43
TrigRoiDescriptor
*
TrigRoiDescriptorCnv::createTransient
(
const
Token
* token)
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
(token, p3_guid) ) {
55
56
std::unique_ptr< TrigRoiDescriptor_p3 > col_vect( this->
poolReadObject< TrigRoiDescriptor_p3 >
(token) );
57
trans_obj =
m_TPConverters
->p3.createTransient( col_vect.get(), mlog );
58
59
}
60
else
if
(
compareClassGuid
(token, p2_guid) ) {
61
62
std::unique_ptr< TrigRoiDescriptor_p2 > col_vect( this->
poolReadObject< TrigRoiDescriptor_p2 >
(token) );
63
trans_obj =
m_TPConverters
->p2.createTransient( col_vect.get(), mlog );
64
65
}
66
else
if
(
compareClassGuid
(token, p1_guid) ) {
67
68
std::unique_ptr< TrigRoiDescriptor_p1 > col_vect( this->
poolReadObject< TrigRoiDescriptor_p1 >
(token) );
69
trans_obj =
m_TPConverters
->p1.createTransient( col_vect.get(), mlog );
70
71
}
72
else
if
(
compareClassGuid
(token, p0_guid) ) {
73
74
// old version from before TP separation, just return it
75
trans_obj = this->
poolReadObject<TrigRoiDescriptor>
(token);
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.h
TrigRoiDescriptor_PERS
TrigRoiDescriptor_p3 TrigRoiDescriptor_PERS
Definition
TrigRoiDescriptorCnv.h:27
TrigRoiDescriptorCnv_p1.h
TrigRoiDescriptorCnv_p2.h
TrigRoiDescriptorCnv_p3.h
TrigRoiDescriptor_p1.h
TrigRoiDescriptor_p2.h
TrigRoiDescriptor_p3.h
T_AthenaPoolCustomCnv< TrigRoiDescriptor, TrigRoiDescriptor_PERS >::compareClassGuid
virtual bool compareClassGuid(const Token *token, const Guid &clid) const
T_AthenaPoolCustomCnv< TrigRoiDescriptor, TrigRoiDescriptor_PERS >::poolReadObject
P * poolReadObject(const Token *token)
T_AthenaPoolCustomCnv
Compatibility for old converter classes that don't get passed the key.
Definition
T_AthenaPoolCustomCnv.h:129
Token
This class provides a token that identifies in a unique way objects on the persistent storage.
Definition
Token.h:22
TrigRoiDescriptorCnv_p1
Definition
TrigRoiDescriptorCnv_p1.h:30
TrigRoiDescriptorCnv_p2
Definition
TrigRoiDescriptorCnv_p2.h:28
TrigRoiDescriptorCnv_p3
Definition
TrigRoiDescriptorCnv_p3.h:28
TrigRoiDescriptorCnv::TrigRoiDescriptorCnv
TrigRoiDescriptorCnv(ISvcLocator *svcloc)
Definition
TrigRoiDescriptorCnv.cxx:22
TrigRoiDescriptorCnv::createTransient
TrigRoiDescriptor * createTransient(const Token *token)
Definition
TrigRoiDescriptorCnv.cxx:43
TrigRoiDescriptorCnv::createPersistent
TrigRoiDescriptor_PERS * createPersistent(TrigRoiDescriptor *transObj)
Definition
TrigRoiDescriptorCnv.cxx:33
TrigRoiDescriptorCnv::~TrigRoiDescriptorCnv
~TrigRoiDescriptorCnv()
Definition
TrigRoiDescriptorCnv.cxx:27
TrigRoiDescriptorCnv::m_TPConverters
TrigRoiDescriptorCnv_tp * m_TPConverters
Definition
TrigRoiDescriptorCnv.h:48
TrigRoiDescriptor
nope - should be used for standalone also, perhaps need to protect the class def bits ifndef XAOD_ANA...
Definition
TrigRoiDescriptor.h:48
pool::Guid
::Guid Guid
Definition
T_AthenaPoolCustCnv.h:19
TrigRoiDescriptorCnv_tp
Definition
TrigRoiDescriptorCnv.cxx:16
TrigRoiDescriptorCnv_tp::p3
TrigRoiDescriptorCnv_p3 p3
Definition
TrigRoiDescriptorCnv.cxx:19
TrigRoiDescriptorCnv_tp::p1
TrigRoiDescriptorCnv_p1 p1
Definition
TrigRoiDescriptorCnv.cxx:17
TrigRoiDescriptorCnv_tp::p2
TrigRoiDescriptorCnv_p2 p2
Definition
TrigRoiDescriptorCnv.cxx:18
Generated on
for ATLAS Offline Software by
1.17.0