ATLAS Offline Software
Trigger
TrigEvent
TrigEventAthenaPool
src
TrigTrackCountsCnv.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 "
TrigTrackCountsCnv.h
"
6
#include "
TrigInDetEventTPCnv/TrigTrackCounts_p1.h
"
7
#include "
TrigInDetEventTPCnv/TrigTrackCountsCnv_p1.h
"
8
#include "
TrigInDetEventTPCnv/TrigTrackCounts_p2.h
"
9
#include "
TrigInDetEventTPCnv/TrigTrackCountsCnv_p2.h
"
10
11
TrigTrackCountsCnv::TrigTrackCountsCnv
(ISvcLocator *svcloc):
TrigTrackCountsCnvBase
(svcloc) {}
12
TrigTrackCountsCnv::~TrigTrackCountsCnv
(){}
13
14
15
TrigTrackCounts_PERS
*
TrigTrackCountsCnv::createPersistent
(
TrigTrackCounts
* transObj) {
16
MsgStream
mlog
(
msgSvc
(),
"TrigTrackCountsConverter"
);
17
18
mlog
<<
MSG::DEBUG
<<
"TrigTrackCountsCnv::createPersistent"
<<
endmsg
;
19
20
TrigTrackCountsCnv_p2
converter;
21
22
TrigTrackCounts_PERS
*persObj = converter.
createPersistent
( transObj,
mlog
);
23
24
return
persObj;
25
}
26
27
28
TrigTrackCounts
*
TrigTrackCountsCnv::createTransient
() {
29
MsgStream
mlog
(
msgSvc
(),
"TrigTrackCountsConverter"
);
30
31
mlog
<<
MSG::DEBUG
<<
"TrigTrackCountsCnv::createTransient "
<<
endmsg
;
32
33
static
const
pool::Guid
p2_guid(
"BD8BB599-AE38-45CC-93DB-27F67C23DB62"
);
34
static
const
pool::Guid
p1_guid(
"2DCA396C-5CC1-4B6A-8B76-E3EBA4F81A61"
);
35
static
const
pool::Guid
p0_guid(
"6277C97C-0EAA-4922-892E-E88C1FA01BA0"
);
36
37
if
(
compareClassGuid
(p2_guid)) {
38
std::unique_ptr< TrigTrackCounts_p2 > pers_ptr( poolReadObject< TrigTrackCounts_p2 >() );
39
TrigTrackCountsCnv_p2
converter;
40
return
converter.
createTransient
( pers_ptr.get(),
mlog
);
41
}
42
else
if
(
compareClassGuid
(p1_guid)) {
43
std::unique_ptr< TrigTrackCounts_p1 > pers_ptr( poolReadObject< TrigTrackCounts_p1 >() );
44
TrigTrackCountsCnv_p1
converter;
45
return
converter.
createTransient
( pers_ptr.get(),
mlog
);
46
}
47
else
if
(
compareClassGuid
(p0_guid)) {
48
// old version from before TP separation, just return it
49
return
this->poolReadObject<TrigTrackCounts>();
50
}
51
else
{
52
throw
std::runtime_error(
"Unsupported persistent version"
);
53
}
54
55
}
TrigTrackCounts
Definition:
Trigger/TrigEvent/TrigInDetEvent/TrigInDetEvent/TrigTrackCounts.h:18
TrigTrackCountsCnv_p1.h
TPPolyCnvBase::createTransient
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
TrigTrackCountsCnv.h
TrigTrackCounts_p2.h
TPAbstractPolyCnvBase::createPersistent
virtual PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of a transient object.
pool::Guid
::Guid Guid
Definition:
T_AthenaPoolCustCnv.h:19
TrigTrackCountsCnv::TrigTrackCountsCnv
TrigTrackCountsCnv(ISvcLocator *svcloc)
Definition:
TrigTrackCountsCnv.cxx:11
TrigTrackCounts_p2
Definition:
TrigTrackCounts_p2.h:23
TrigTrackCountsCnv_p2
Definition:
TrigTrackCountsCnv_p2.h:34
TrigTrackCountsCnv::~TrigTrackCountsCnv
~TrigTrackCountsCnv()
Definition:
TrigTrackCountsCnv.cxx:12
python.InDetPriVxFinderConfig.mlog
mlog
Definition:
InDetPriVxFinderConfig.py:134
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition:
StdJOSetup.py:36
T_AthenaPoolCustomCnv
Compatibility for old converter classes that don't get passed the key.
Definition:
T_AthenaPoolCustomCnv.h:132
endmsg
#define endmsg
Definition:
AnalysisConfig_Ntuple.cxx:63
TrigTrackCountsCnv::createPersistent
virtual TrigTrackCounts_PERS * createPersistent(TrigTrackCounts *transObj)
Definition:
TrigTrackCountsCnv.cxx:15
TrigTrackCountsCnv_p1
Definition:
TrigTrackCountsCnv_p1.h:30
TrigTrackCountsCnv::createTransient
virtual TrigTrackCounts * createTransient()
Definition:
TrigTrackCountsCnv.cxx:28
DEBUG
#define DEBUG
Definition:
page_access.h:11
TrigTrackCountsCnv_p2.h
T_AthenaPoolCustCnv::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.
TrigTrackCounts_p1.h
Generated on Thu Nov 7 2024 21:30:14 for ATLAS Offline Software by
1.8.18