ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigEvent
TrigEventAthenaPool
src
TrigMonConfigCollectionCnv.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 "
TrigMonConfigCollectionCnv.h
"
7
#include "
TrigMonitoringEventTPCnv/TrigMonConfigCollectionCnv_p1.h
"
8
#include "
TrigMonitoringEventTPCnv/TrigMonConfigCollectionCnv_tlp1.h
"
9
10
class
TrigMonConfigCollectionCnv_impl
11
{
12
public
:
13
TrigMonConfigCollectionCnv_p1
m_TPConverter
;
14
TrigMonConfigCollectionCnv_tlp1
m_TPConverter_tlp1
;
15
};
16
17
//---------------------------------------------------------------------------------------------
18
TrigMonConfigCollectionCnv::TrigMonConfigCollectionCnv
(ISvcLocator* svcloc) :
19
T_AthenaPoolCustomCnv
<
TrigMonConfigCollection
,
TrigMonConfigCollection_PERS
>(svcloc),
20
m_log
(new MsgStream(msgSvc(),
"TrigMonConfigCollectionCnv"
)),
21
m_impl
(new
TrigMonConfigCollectionCnv_impl
)
22
{
23
}
24
25
//---------------------------------------------------------------------------------------------
26
TrigMonConfigCollectionCnv::~TrigMonConfigCollectionCnv
()
27
{
28
delete
m_log
;
29
delete
m_impl
;
30
}
31
32
//---------------------------------------------------------------------------------------------
33
//create persistent
34
TrigMonConfigCollection_PERS
*
TrigMonConfigCollectionCnv::createPersistent
(
TrigMonConfigCollection
* transObj)
35
{
36
(*m_log) << MSG::DEBUG <<
"TrigMonConfigCollectionCnv::createPersistent"
<<
endmsg
;
37
38
TrigMonConfigCollection_PERS
*persObj =
m_impl
->m_TPConverter_tlp1.createPersistent(transObj, *
m_log
);
39
return
persObj;
40
}
41
42
//---------------------------------------------------------------------------------------------
43
//createTransient
44
TrigMonConfigCollection
*
TrigMonConfigCollectionCnv::createTransient
(
const
Token
* token)
45
{
46
(*m_log) << MSG::DEBUG <<
"TrigMonConfigCollectionCnv::createTransient "
<<
endmsg
;
47
48
static
const
Guid
tlp1_guid(
"887A60C5-BD4D-467C-9629-9F0EE818398A"
);
49
static
const
Guid
p1_guid(
"77FAC318-137E-4563-A681-68356299E397"
);
50
51
TrigMonConfigCollection
*trans_obj(0);
52
53
if
(
compareClassGuid
(token, tlp1_guid) ) {
54
55
(*m_log) << MSG::DEBUG <<
"TrigMonConfigCollectionCnv::reading tlp1 persistent object"
<<
endmsg
;
56
std::unique_ptr< TrigMonConfigCollection_tlp1 > col_vect( this->
poolReadObject< TrigMonConfigCollection_tlp1 >
(token) );
57
(*m_log) << MSG::DEBUG <<
"TrigMonConfigCollectionCnv::reading tlp1 persistent object pointer"
<< col_vect.get() <<
endmsg
;
58
trans_obj =
m_impl
->m_TPConverter_tlp1.createTransient( col_vect.get(), *
m_log
);
59
}
60
else
if
(
compareClassGuid
(token, p1_guid) ) {
61
62
(*m_log) << MSG::DEBUG <<
"TrigMonConfigCollectionCnv::reading p1 persistent object"
<<
endmsg
;
63
std::unique_ptr< TrigMonConfigCollection_p1 > col_vect( this->
poolReadObject< TrigMonConfigCollection_p1 >
(token) );
64
(*m_log) << MSG::DEBUG <<
"TrigMonConfigCollectionCnv::reading p1 persistent object pointer"
<< col_vect.get() <<
endmsg
;
65
trans_obj =
m_impl
->m_TPConverter.createTransient( col_vect.get(), *
m_log
);
66
}
67
else
{
68
throw
std::runtime_error(
"Unsupported persistent version of TrigMonConfigCollection"
);
69
}
70
71
return
trans_obj;
72
}
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
TrigMonConfigCollectionCnv.h
TrigMonConfigCollection_PERS
TrigMonConfigCollection_tlp1 TrigMonConfigCollection_PERS
Definition
TrigMonConfigCollectionCnv.h:16
TrigMonConfigCollectionCnv_p1.h
TrigMonConfigCollectionCnv_tlp1.h
Guid
This class provides a encapsulation of a GUID/UUID/CLSID/IID data structure (128 bit number).
Definition
Guid.h:25
T_AthenaPoolCustomCnv< TrigMonConfigCollection, TrigMonConfigCollection_PERS >::compareClassGuid
virtual bool compareClassGuid(const Token *token, const Guid &clid) const
T_AthenaPoolCustomCnv< TrigMonConfigCollection, TrigMonConfigCollection_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
TrigMonConfigCollectionCnv_impl
Definition
TrigMonConfigCollectionCnv.cxx:11
TrigMonConfigCollectionCnv_impl::m_TPConverter_tlp1
TrigMonConfigCollectionCnv_tlp1 m_TPConverter_tlp1
Definition
TrigMonConfigCollectionCnv.cxx:14
TrigMonConfigCollectionCnv_impl::m_TPConverter
TrigMonConfigCollectionCnv_p1 m_TPConverter
Definition
TrigMonConfigCollectionCnv.cxx:13
TrigMonConfigCollectionCnv_p1
Definition
TrigMonConfigCollectionCnv_p1.h:18
TrigMonConfigCollectionCnv_tlp1
Definition
TrigMonConfigCollectionCnv_tlp1.h:16
TrigMonConfigCollectionCnv::createTransient
TrigMonConfigCollection * createTransient(const Token *token)
Definition
TrigMonConfigCollectionCnv.cxx:44
TrigMonConfigCollectionCnv::m_impl
TrigMonConfigCollectionCnv_impl * m_impl
Definition
TrigMonConfigCollectionCnv.h:35
TrigMonConfigCollectionCnv::createPersistent
TrigMonConfigCollection_PERS * createPersistent(TrigMonConfigCollection *transObj)
Definition
TrigMonConfigCollectionCnv.cxx:34
TrigMonConfigCollectionCnv::m_log
MsgStream * m_log
Definition
TrigMonConfigCollectionCnv.h:34
TrigMonConfigCollectionCnv::~TrigMonConfigCollectionCnv
virtual ~TrigMonConfigCollectionCnv()
Definition
TrigMonConfigCollectionCnv.cxx:26
TrigMonConfigCollectionCnv::TrigMonConfigCollectionCnv
TrigMonConfigCollectionCnv(ISvcLocator *svcloc)
Definition
TrigMonConfigCollectionCnv.cxx:18
TrigMonConfigCollection
Definition
TrigMonConfigCollection.h:11
Generated on
for ATLAS Offline Software by
1.17.0