ATLAS Offline Software
Loading...
Searching...
No Matches
TestBeam
TBEventAthenaPool
src
TBEventInfoCnv.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 "
TBEventInfoCnv.h
"
6
7
TBEventInfo_PERS
*
TBEventInfoCnv::createPersistent
(
TBEventInfo
* transCont) {
8
MsgStream log(msgSvc(),
"TBEventInfoConverter"
);
9
TBEventInfo_PERS
*persObj =
m_TPConverter
.createPersistent( transCont, log );
10
log << MSG::DEBUG <<
"Success"
<<
endmsg
;
11
return
persObj;
12
}
13
14
TBEventInfo
*
TBEventInfoCnv::createTransient
() {
15
MsgStream log(msgSvc(),
"TBEventInfoConverter"
);
16
static
const
pool::Guid
p1_guid(
"1E398439-74B3-457E-BC0B-DD69201AE463"
);
// GUID of the persistent object
17
static
const
pool::Guid
p0_guid(
"1295BE02-D698-43A8-A2BB-76E5ADCBD228"
);
// GUID of the transient object
18
if
(
compareClassGuid
(p1_guid) ) {
19
// using unique_ptr ensures deletion of the persistent object
20
std::unique_ptr< TBEventInfo_p1 > col_vect(
poolReadObject< TBEventInfo_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< TBEventInfo >
();
26
}
27
throw
std::runtime_error(
"Unsupported persistent version of Data Collection"
);
28
}
29
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:63
TBEventInfoCnv.h
TBEventInfo_PERS
TBEventInfo_p1 TBEventInfo_PERS
Definition
TBEventInfoCnv.h:20
TBEventInfoCnv::createPersistent
virtual TBEventInfo_PERS * createPersistent(TBEventInfo *transCont)
Definition
TBEventInfoCnv.cxx:7
TBEventInfoCnv::m_TPConverter
TBEventInfoCnv_p1 m_TPConverter
Definition
TBEventInfoCnv.h:32
TBEventInfoCnv::createTransient
virtual TBEventInfo * createTransient()
Definition
TBEventInfoCnv.cxx:14
TBEventInfo
Definition
TBEventInfo.h:27
T_AthenaPoolCustomCnv< TBEventInfo, TBEventInfo_PERS >::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
T_AthenaPoolCustomCnv< TBEventInfo, TBEventInfo_PERS >::poolReadObject
P * poolReadObject()
pool::Guid
::Guid Guid
Definition
T_AthenaPoolCustCnv.h:19
Generated on
for ATLAS Offline Software by
1.14.0