ATLAS Offline Software
Loading...
Searching...
No Matches
TestBeam
TBEventAthenaPool
src
TBTrackInfoCnv.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 "
TBTrackInfoCnv.h
"
6
7
TBTrackInfo_PERS
*
TBTrackInfoCnv::createPersistent
(
TBTrackInfo
* transCont) {
8
MsgStream log(msgSvc(),
"TBTrackInfoConverter"
);
9
TBTrackInfo_PERS
*persObj =
m_TPConverter
.createPersistent( transCont, log );
10
log << MSG::DEBUG <<
"Success"
<<
endmsg
;
11
return
persObj;
12
}
13
14
TBTrackInfo
*
TBTrackInfoCnv::createTransient
() {
15
MsgStream log(msgSvc(),
"TBTrackInfoConverter"
);
16
static
const
pool::Guid
p1_guid(
"A49F674F-25AD-496B-BEBE-DE1EBEAFE990"
);
// GUID of the persistent object
17
static
const
pool::Guid
p0_guid(
"5780AB02-D5D1-4537-B682-56CA95927BFB"
);
// GUID of the transient object
18
if
(
compareClassGuid
(p1_guid) ) {
19
// using unique_ptr ensures deletion of the persistent object
20
std::unique_ptr< TBTrackInfo_p1 > col_vect(
poolReadObject< TBTrackInfo_p1 >
() );
21
return
m_TPConverter
.createTransient( col_vect.get(), log );
22
}
23
else
if
(
compareClassGuid
(p0_guid) ) {
24
// regular object from before TP separation, just return it
25
return
poolReadObject< TBTrackInfo >
();
26
}
27
throw
std::runtime_error(
"Unsupported persistent version of Data Collection"
);
28
}
29
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:63
TBTrackInfoCnv.h
TBTrackInfo_PERS
TBTrackInfo_p1 TBTrackInfo_PERS
Definition
TBTrackInfoCnv.h:20
TBTrackInfoCnv::m_TPConverter
TBTrackInfoCnv_p1 m_TPConverter
Definition
TBTrackInfoCnv.h:32
TBTrackInfoCnv::createTransient
virtual TBTrackInfo * createTransient()
Definition
TBTrackInfoCnv.cxx:14
TBTrackInfoCnv::createPersistent
virtual TBTrackInfo_PERS * createPersistent(TBTrackInfo *transCont)
Definition
TBTrackInfoCnv.cxx:7
TBTrackInfo
Definition
TBTrackInfo.h:19
T_AthenaPoolCustomCnv< TBTrackInfo, TBTrackInfo_PERS >::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
T_AthenaPoolCustomCnv< TBTrackInfo, TBTrackInfo_PERS >::poolReadObject
P * poolReadObject()
pool::Guid
::Guid Guid
Definition
T_AthenaPoolCustCnv.h:19
Generated on
for ATLAS Offline Software by
1.14.0