ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigEvent
TrigEventAthenaPool
src
MuonFeatureCnv.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 "
MuonFeatureCnv.h
"
6
#include "
TrigMuonEventTPCnv/MuonFeatureCnv_p1.h
"
7
#include "
TrigMuonEventTPCnv/MuonFeatureCnv_p2.h
"
8
9
MuonFeatureCnv::MuonFeatureCnv
(ISvcLocator *svcloc):
MuonFeatureCnvBase
(svcloc) {}
10
MuonFeatureCnv::~MuonFeatureCnv
(){}
11
12
//createPersistent
13
MuonFeature_PERS
*
MuonFeatureCnv::createPersistent
(
MuonFeature
* transObj) {
14
MsgStream mlog(msgSvc(),
"MuonFeatureConverter"
);
15
16
mlog << MSG::DEBUG <<
"MuonFeatureCnv::createPersistent"
<<
endmsg
;
17
18
MuonFeatureCnv_p2
converter;
19
MuonFeature_PERS
*persObj = converter.
createPersistent
( transObj, mlog );
20
21
return
persObj;
22
}
23
24
//createTransient
25
MuonFeature
*
MuonFeatureCnv::createTransient
(
const
Token
* token) {
26
MsgStream mlog(msgSvc(),
"MuonFeatureConverter"
);
27
28
mlog << MSG::DEBUG <<
"MuonFeatureCnv::createTransient "
<<
endmsg
;
29
30
static
const
Guid
p2_guid(
"3785A9E4-7845-4B54-B49F-DCC2A24409C0"
);
31
static
const
Guid
p1_guid(
"3DFFECBF-3251-4BE7-9D12-B3A9FCAC486E"
);
32
static
const
Guid
p0_guid(
"295FBAFB-ED82-43EA-8B63-6E3D3F4D2A9F"
);
33
34
if
(
compareClassGuid
(token, p1_guid) ) {
35
36
std::unique_ptr< MuonFeature_p1 > col_vect(
poolReadObject< MuonFeature_p1 >
(token) );
37
MuonFeatureCnv_p1
converter;
38
return
converter.
createTransient
( col_vect.get(), mlog );
39
40
}
41
else
if
(
compareClassGuid
(token, p2_guid) ) {
42
43
std::unique_ptr< MuonFeature_p2 > col_vect(
poolReadObject< MuonFeature_p2 >
(token) );
44
MuonFeatureCnv_p2
converter;
45
return
converter.
createTransient
( col_vect.get(), mlog );
46
47
}
48
else
if
(
compareClassGuid
(token, p0_guid) ) {
49
// old version from before TP separation, just return it
50
return
this->
poolReadObject<MuonFeature>
(token);
51
}
52
else
{
53
throw
std::runtime_error(
"Unsupported persistent version"
);
54
}
55
56
}
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
MuonFeatureCnv.h
MuonFeatureCnvBase
T_AthenaPoolCustomCnv< MuonFeature, MuonFeature_PERS > MuonFeatureCnvBase
Definition
MuonFeatureCnv.h:33
MuonFeature_PERS
MuonFeature_p2 MuonFeature_PERS
Definition
MuonFeatureCnv.h:31
MuonFeatureCnv_p1.h
MuonFeatureCnv_p2.h
Guid
This class provides a encapsulation of a GUID/UUID/CLSID/IID data structure (128 bit number).
Definition
Guid.h:25
MuonFeatureCnv_p1
Definition
MuonFeatureCnv_p1.h:32
MuonFeatureCnv_p2
Definition
MuonFeatureCnv_p2.h:32
MuonFeatureCnv::~MuonFeatureCnv
~MuonFeatureCnv()
Definition
MuonFeatureCnv.cxx:10
MuonFeatureCnv::MuonFeatureCnv
MuonFeatureCnv(ISvcLocator *svcloc)
Definition
MuonFeatureCnv.cxx:9
MuonFeatureCnv::createTransient
virtual MuonFeature * createTransient(const Token *token)
Definition
MuonFeatureCnv.cxx:25
MuonFeatureCnv::createPersistent
virtual MuonFeature_PERS * createPersistent(MuonFeature *transObj)
Definition
MuonFeatureCnv.cxx:13
MuonFeature
Definition
MuonFeature.h:21
TPAbstractPolyCnvBase::createPersistent
virtual PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of a transient object.
TPPolyCnvBase::createTransient
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
T_AthenaPoolCustomCnv< MuonFeature, MuonFeature_PERS >::compareClassGuid
virtual bool compareClassGuid(const Token *token, const Guid &clid) const
T_AthenaPoolCustomCnv< MuonFeature, MuonFeature_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
Generated on
for ATLAS Offline Software by
1.17.0