ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigEvent
TrigEventAthenaPool
src
TrigTauCnv.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
#include "
TrigTauCnv.h
"
6
#include "
TrigParticleTPCnv/TrigTau_tlp1.h
"
7
#include "
TrigParticleTPCnv/TrigTauCnv_tlp1.h
"
8
#include "
TrigParticleTPCnv/TrigTau_tlp2.h
"
9
#include "
TrigParticleTPCnv/TrigTauCnv_tlp2.h
"
10
11
class
TrigTauCnv_impl
12
{
13
public
:
14
TrigTauCnv_tlp1
m_TPConverter_p1
;
15
TrigTauCnv_tlp2
m_TPConverter_p2
;
16
};
17
18
TrigTauCnv::TrigTauCnv
(ISvcLocator* svcloc) :
19
T_AthenaPoolCustomCnv
<
TrigTau
,
TrigTau_PERS
>( svcloc ),
20
m_impl
(new
TrigTauCnv_impl
)
21
{
22
}
23
TrigTauCnv::~TrigTauCnv
()
24
{
25
delete
m_impl
;
26
}
27
28
//create persistent
29
TrigTau_PERS
*
TrigTauCnv::createPersistent
(
TrigTau
* transCont)
30
{
31
MsgStream mlog(msgSvc(),
"TrigTauConverter"
);
32
mlog << MSG::DEBUG <<
"TrigTauCnv::createPersistent"
<<
endmsg
;
33
34
TrigTau_PERS
*persObj =
m_impl
->m_TPConverter_p2.createPersistent( transCont, mlog );
35
36
return
persObj;
37
}
38
39
//create transient
40
TrigTau
*
TrigTauCnv::createTransient
(
const
Token
* token)
41
{
42
MsgStream mlog(msgSvc(),
"TrigTauConverter"
);
43
mlog << MSG::DEBUG <<
"TrigTauCnv::createTransient "
<<
endmsg
;
44
45
static
const
pool::Guid
tlp1_guid(
"82AE3333-5398-4590-A51A-616832332D9B"
);
46
static
const
pool::Guid
p0_guid(
"F95B5B76-13D3-4EB4-94BB-1383B8571ADD"
);
47
static
const
pool::Guid
tlp2_guid(
"B2619D46-FB89-4961-8A57-6A980A2EFB33"
);
48
static
const
pool::Guid
p2_guid(
"9CA7EFF2-DB12-4E06-A425-01B1D8367BE3"
);
49
50
TrigTau
*trans_cont(0);
51
52
if
(
compareClassGuid
(token, tlp1_guid) ) {
53
54
mlog << MSG::DEBUG <<
"TrigTauCnv::reading tlp1 persistent object"
<<
endmsg
;
55
std::unique_ptr< TrigTau_tlp1 > col_vect( this->
poolReadObject< TrigTau_tlp1 >
(token) );
56
trans_cont =
m_impl
->m_TPConverter_p1.createTransient( col_vect.get(), mlog );
57
58
}
59
else
if
(
compareClassGuid
(token, p0_guid) ) {
60
61
mlog << MSG::DEBUG <<
"TrigTauCnv::reading p0 persistent object"
<<
endmsg
;
62
// old version from before TP separation, just return it
63
trans_cont = this->
poolReadObject<TrigTau>
(token);
64
65
}
else
if
(
compareClassGuid
(token, tlp2_guid) ) {
66
67
mlog << MSG::DEBUG <<
"TrigTauCnv::reading tlp2 persistent object"
<<
endmsg
;
68
std::unique_ptr< TrigTau_tlp2 > col_vect( this->
poolReadObject< TrigTau_tlp2 >
(token) );
69
trans_cont =
m_impl
->m_TPConverter_p2.createTransient( col_vect.get(), mlog );
70
71
}
72
else
if
(
compareClassGuid
(token, p2_guid) ) {
73
74
mlog << MSG::DEBUG <<
"TrigTauCnv::reading p2 persistent object"
<<
endmsg
;
75
// old version from before TP separation, just return it
76
trans_cont = this->
poolReadObject<TrigTau>
(token);
77
78
}
else
{
79
80
throw
std::runtime_error(
"Unsupported persistent version of Data container"
);
81
82
}
83
84
return
trans_cont;
85
86
}
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
TrigTauCnv.h
TrigTau_PERS
TrigTau_tlp2 TrigTau_PERS
Definition
TrigTauCnv.h:26
TrigTauCnv_tlp1.h
TrigTauCnv_tlp2.h
TrigTau_tlp1.h
TrigTau_tlp2.h
T_AthenaPoolCustomCnv< TrigTau, TrigTau_PERS >::compareClassGuid
virtual bool compareClassGuid(const Token *token, const Guid &clid) const
T_AthenaPoolCustomCnv< TrigTau, TrigTau_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
TrigTauCnv_impl
Definition
TrigTauCnv.cxx:12
TrigTauCnv_impl::m_TPConverter_p2
TrigTauCnv_tlp2 m_TPConverter_p2
Definition
TrigTauCnv.cxx:15
TrigTauCnv_impl::m_TPConverter_p1
TrigTauCnv_tlp1 m_TPConverter_p1
Definition
TrigTauCnv.cxx:14
TrigTauCnv_tlp1
Definition
TrigTauCnv_tlp1.h:29
TrigTauCnv_tlp2
Definition
TrigTauCnv_tlp2.h:29
TrigTauCnv::~TrigTauCnv
~TrigTauCnv()
Definition
TrigTauCnv.cxx:23
TrigTauCnv::createTransient
TrigTau * createTransient(const Token *token)
Definition
TrigTauCnv.cxx:40
TrigTauCnv::m_impl
TrigTauCnv_impl * m_impl
Definition
TrigTauCnv.h:48
TrigTauCnv::createPersistent
TrigTau_PERS * createPersistent(TrigTau *transCont)
Definition
TrigTauCnv.cxx:29
TrigTauCnv::TrigTauCnv
TrigTauCnv(ISvcLocator *svcloc)
Definition
TrigTauCnv.cxx:18
TrigTau
File: TrigTau.h.
Definition
TrigTau.h:37
pool::Guid
::Guid Guid
Definition
T_AthenaPoolCustCnv.h:19
Generated on
for ATLAS Offline Software by
1.17.0