ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigEvent
TrigSteeringEventAthenaPool
src
HLTResultCnv.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 "
HLTResultCnv.h
"
8
#include "
TrigSteeringEventTPCnv/HLTResultCnv_p1.h
"
9
#include "
TrigSteeringEventTPCnv/HLTResult_p1.h
"
10
11
HLTResultCnv::HLTResultCnv
(ISvcLocator* svcloc) :
12
HLTResultCnvBase
(svcloc),
13
m_TPConverter
(new
HLT
::HLTResultCnv_p1)
14
{}
15
16
HLTResultCnv::~HLTResultCnv
()
17
{
18
delete
m_TPConverter
;
19
}
20
21
22
//create persistent
23
HLTResult_PERS
*
HLTResultCnv::createPersistent
(
HLT::HLTResult
* transCont)
24
{
25
MsgStream mlog(msgSvc(),
"HLTResultConverter"
);
26
27
HLTResult_PERS
* persObj =
m_TPConverter
->createPersistent( transCont, mlog );
28
29
return
persObj;
30
}
31
32
//create transient
33
HLT::HLTResult
*
HLTResultCnv::createTransient
(
const
Token
* token)
34
{
35
MsgStream mlog(msgSvc(),
"HLTResultConverter"
);
36
37
static
const
pool::Guid
p1_guid(
"9567573D-F35E-4D5E-9A1A-A43B07D3CF3B"
);
38
static
const
pool::Guid
p0_guid(
"559D6CB9-9A54-4284-A03D-9C745352281D"
);
39
40
if
(
compareClassGuid
(token, p1_guid) ) {
41
// using unique_ptr ensures deletion of the persistent object
42
std::unique_ptr< HLT::HLTResult_p1 > col_vect(
poolReadObject< HLT::HLTResult_p1 >
(token) );
43
return
m_TPConverter
->createTransient( col_vect.get(), mlog );
44
}
45
46
else
if
(
compareClassGuid
(token, p0_guid) ){
47
// old version from before TP separation, just return it
48
return
this->
poolReadObject<HLT::HLTResult>
(token);
49
}
50
51
throw
std::runtime_error(
"Unsupported persistent version of HLTResult"
);
52
}
53
54
#endif
HLTResultCnv.h
HLTResult_PERS
HLT::HLTResult_p1 HLTResult_PERS
Definition
HLTResultCnv.h:34
HLTResultCnvBase
T_AthenaPoolCustomCnv< HLT::HLTResult, HLTResult_PERS > HLTResultCnvBase
Definition
HLTResultCnv.h:36
HLTResultCnv_p1.h
HLTResult_p1.h
HLTResultCnv::~HLTResultCnv
~HLTResultCnv()
Definition
HLTResultCnv.cxx:16
HLTResultCnv::m_TPConverter
HLT::HLTResultCnv_p1 * m_TPConverter
Definition
HLTResultCnv.h:56
HLTResultCnv::createTransient
virtual HLT::HLTResult * createTransient(const Token *token)
Definition
HLTResultCnv.cxx:33
HLTResultCnv::createPersistent
virtual HLTResult_PERS * createPersistent(HLT::HLTResult *transCont)
Definition
HLTResultCnv.cxx:23
HLTResultCnv::HLTResultCnv
HLTResultCnv(ISvcLocator *svcloc)
Definition
HLTResultCnv.cxx:11
HLT::HLTResult
HLT::HLTResult is sumarising result of trigger decision evaluation (online/offline) It contains basic...
Definition
HLTResult.h:49
T_AthenaPoolCustomCnv< HLT::HLTResult, HLTResult_PERS >::compareClassGuid
virtual bool compareClassGuid(const Token *token, const Guid &clid) const
T_AthenaPoolCustomCnv< HLT::HLTResult, HLTResult_PERS >::poolReadObject
P * poolReadObject(const Token *token)
Token
This class provides a token that identifies in a unique way objects on the persistent storage.
Definition
Token.h:22
HLT
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...
Definition
HLTResultReader.h:26
pool::Guid
::Guid Guid
Definition
T_AthenaPoolCustCnv.h:19
Generated on
for ATLAS Offline Software by
1.17.0