ATLAS Offline Software
Loading...
Searching...
No Matches
TestBeam
TBEventAthenaPool
src
TBTDCCnv.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 "
TBTDCCnv.h
"
6
7
TBTDC_PERS
*
TBTDCCnv::createPersistent
(
TBTDC
* transCont) {
8
MsgStream log(msgSvc(),
"TBTDCConverter"
);
9
TBTDC_PERS
*persObj =
m_TPConverter
.createPersistent( transCont, log );
10
log << MSG::DEBUG <<
"Success"
<<
endmsg
;
11
return
persObj;
12
}
13
14
TBTDC
*
TBTDCCnv::createTransient
() {
15
MsgStream log(msgSvc(),
"TBTDCConverter"
);
16
static
const
pool::Guid
p1_guid(
"D909CCF6-CE91-4401-98FC-C1C41BD06513"
);
// GUID of the persistent object
17
static
const
pool::Guid
p0_guid(
"51CEFACC-47E5-4BF1-8BF5-FA48FCA15B43"
);
// GUID of the transient object
18
if
(
compareClassGuid
(p1_guid) ) {
19
// using unique_ptr ensures deletion of the persistent object
20
std::unique_ptr< TBTDC_p1 > col_vect(
poolReadObject< TBTDC_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< TBTDC >
();
26
}
27
throw
std::runtime_error(
"Unsupported persistent version of Data Collection"
);
28
}
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:63
TBTDCCnv.h
TBTDC_PERS
TBTDC_p1 TBTDC_PERS
Definition
TBTDCCnv.h:20
TBTDCCnv::createPersistent
virtual TBTDC_PERS * createPersistent(TBTDC *transCont)
Definition
TBTDCCnv.cxx:7
TBTDCCnv::m_TPConverter
TBTDCCnv_p1 m_TPConverter
Definition
TBTDCCnv.h:32
TBTDCCnv::createTransient
virtual TBTDC * createTransient()
Definition
TBTDCCnv.cxx:14
TBTDC
Definition
TBTDC.h:17
T_AthenaPoolCustomCnv< TBTDC, TBTDC_PERS >::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
T_AthenaPoolCustomCnv< TBTDC, TBTDC_PERS >::poolReadObject
P * poolReadObject()
pool::Guid
::Guid Guid
Definition
T_AthenaPoolCustCnv.h:19
Generated on
for ATLAS Offline Software by
1.14.0