ATLAS Offline Software
Loading...
Searching...
No Matches
TestBeam
TBEventAthenaPool
src
TBPhaseCnv.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 "
TBPhaseCnv.h
"
6
7
TBPhase_PERS
*
TBPhaseCnv::createPersistent
(
TBPhase
* transCont) {
8
MsgStream log(msgSvc(),
"TBPhaseConverter"
);
9
TBPhase_PERS
*persObj =
m_TPConverter
.createPersistent( transCont, log );
10
log << MSG::DEBUG <<
"Success"
<<
endmsg
;
11
return
persObj;
12
}
13
14
TBPhase
*
TBPhaseCnv::createTransient
() {
15
MsgStream log(msgSvc(),
"TBPhaseConverter"
);
16
static
const
pool::Guid
p1_guid(
"40443E91-053F-41C1-84F8-0A7F03F1DEC4"
);
// GUID of the persistent object
17
static
const
pool::Guid
p0_guid(
"C044C9BE-E371-4AC3-95ED-CCA05984EDE4"
);
// GUID of the transient object
18
if
(
compareClassGuid
(p1_guid) ) {
19
// using unique_ptr ensures deletion of the persistent object
20
std::unique_ptr< TBPhase_p1 > col_vect(
poolReadObject< TBPhase_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< TBPhase >
();
26
}
27
throw
std::runtime_error(
"Unsupported persistent version of Data Collection"
);
28
}
29
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:63
TBPhaseCnv.h
TBPhase_PERS
TBPhase_p1 TBPhase_PERS
Definition
TBPhaseCnv.h:20
TBPhaseCnv::createTransient
virtual TBPhase * createTransient()
Definition
TBPhaseCnv.cxx:14
TBPhaseCnv::createPersistent
virtual TBPhase_PERS * createPersistent(TBPhase *transCont)
Definition
TBPhaseCnv.cxx:7
TBPhaseCnv::m_TPConverter
TBPhaseCnv_p1 m_TPConverter
Definition
TBPhaseCnv.h:32
TBPhase
Definition
TBPhase.h:22
T_AthenaPoolCustomCnv< TBPhase, TBPhase_PERS >::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
T_AthenaPoolCustomCnv< TBPhase, TBPhase_PERS >::poolReadObject
P * poolReadObject()
pool::Guid
::Guid Guid
Definition
T_AthenaPoolCustCnv.h:19
Generated on
for ATLAS Offline Software by
1.14.0