ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigEvent
TrigEventAthenaPool
src
TrigMonConfigCnv.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
6
#include "
TrigMonConfigCnv.h
"
7
#include "
TrigMonitoringEventTPCnv/TrigMonConfigCnv_p1.h
"
8
9
//---------------------------------------------------------------------------------------------
10
TrigMonConfigCnv::TrigMonConfigCnv
(ISvcLocator* svcloc) :
11
T_AthenaPoolCustomCnv
<
TrigMonConfig
,
TrigMonConfig_PERS
>(svcloc),
12
m_log
(new MsgStream(msgSvc(),
"TrigMonConfigCnv"
)),
13
m_TPConverter
(new
TrigMonConfigCnv_p1
)
14
{
15
}
16
17
//---------------------------------------------------------------------------------------------
18
TrigMonConfigCnv::~TrigMonConfigCnv
()
19
{
20
delete
m_log
;
21
delete
m_TPConverter
;
22
}
23
24
//---------------------------------------------------------------------------------------------
25
//create persistent
26
TrigMonConfig_PERS
*
TrigMonConfigCnv::createPersistent
(
TrigMonConfig
* transObj)
27
{
28
(*m_log) << MSG::DEBUG <<
"TrigMonConfigCnv::createPersistent"
<<
endmsg
;
29
30
TrigMonConfig_PERS
*persObj =
m_TPConverter
->createPersistent(transObj, *
m_log
);
31
return
persObj;
32
}
33
34
//---------------------------------------------------------------------------------------------
35
//createTransient
36
TrigMonConfig
*
TrigMonConfigCnv::createTransient
(
const
Token
* token)
37
{
38
(*m_log) << MSG::DEBUG <<
"TrigMonConfigCnv::createTransient "
<<
endmsg
;
39
40
static
const
Guid
p1_guid(
"E841D3CA-AB5A-4955-850A-B368DE66A987"
);
41
TrigMonConfig
*trans_obj(0);
42
43
if
(
compareClassGuid
(token, p1_guid)) {
44
45
(*m_log) << MSG::DEBUG <<
"TrigMonConfigCnv::reading p1 persistent object"
<<
endmsg
;
46
std::unique_ptr< TrigMonConfig_p1 > col_vect( this->
poolReadObject< TrigMonConfig_p1 >
(token) );
47
trans_obj =
m_TPConverter
->createTransient( col_vect.get(), *
m_log
);
48
}
49
else
{
50
throw
std::runtime_error(
"Unsupported persistent version of TrigMonConfig"
);
51
}
52
53
return
trans_obj;
54
}
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
TrigMonConfigCnv.h
TrigMonConfig_PERS
TrigMonConfig_p1 TrigMonConfig_PERS
Definition
TrigMonConfigCnv.h:16
TrigMonConfigCnv_p1.h
Guid
This class provides a encapsulation of a GUID/UUID/CLSID/IID data structure (128 bit number).
Definition
Guid.h:25
T_AthenaPoolCustomCnv< TrigMonConfig, TrigMonConfig_PERS >::compareClassGuid
virtual bool compareClassGuid(const Token *token, const Guid &clid) const
T_AthenaPoolCustomCnv< TrigMonConfig, TrigMonConfig_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
TrigMonConfigCnv_p1
Definition
TrigMonConfigCnv_p1.h:22
TrigMonConfigCnv::m_TPConverter
TrigMonConfigCnv_p1 * m_TPConverter
Definition
TrigMonConfigCnv.h:35
TrigMonConfigCnv::m_log
MsgStream * m_log
Definition
TrigMonConfigCnv.h:34
TrigMonConfigCnv::~TrigMonConfigCnv
virtual ~TrigMonConfigCnv()
Definition
TrigMonConfigCnv.cxx:18
TrigMonConfigCnv::TrigMonConfigCnv
TrigMonConfigCnv(ISvcLocator *svcloc)
Definition
TrigMonConfigCnv.cxx:10
TrigMonConfigCnv::createTransient
TrigMonConfig * createTransient(const Token *token)
Definition
TrigMonConfigCnv.cxx:36
TrigMonConfigCnv::createPersistent
TrigMonConfig_PERS * createPersistent(TrigMonConfig *transObj)
Definition
TrigMonConfigCnv.cxx:26
TrigMonConfig
This class holds encoded ids for monitoring objects and helps to map these objects to trigger configu...
Definition
TrigMonConfig.h:29
Generated on
for ATLAS Offline Software by
1.17.0