ATLAS Offline Software
Loading...
Searching...
No Matches
TestBeam
TBEventAthenaPool
src
TBMWPCContCnv.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 "
TBMWPCContCnv.h
"
6
7
TBMWPCCont_PERS
*
TBMWPCContCnv::createPersistent
(
TBMWPCCont
* transCont) {
8
MsgStream log(msgSvc(),
"TBMWPCContConverter"
);
9
TBMWPCCont_PERS
*persObj =
m_TPConverter
.createPersistent( transCont, log );
10
log << MSG::DEBUG <<
"Success"
<<
endmsg
;
11
return
persObj;
12
}
13
14
TBMWPCCont
*
TBMWPCContCnv::createTransient
() {
15
MsgStream log(msgSvc(),
"TBMWPCContConverter"
);
16
static
const
pool::Guid
p1_guid(
"E1F16B8A-9D8B-4906-83EE-E38EBE63768A"
);
// GUID of the persistent object
17
static
const
pool::Guid
p0_guid(
"05F6DFD7-EB63-49DB-AA5B-F03BE66365AC"
);
// GUID of the transient object
18
if
(
compareClassGuid
(p1_guid) ) {
19
// using unique_ptr ensures deletion of the persistent object
20
std::unique_ptr< TBMWPCCont_p1 > col_vect(
poolReadObject< TBMWPCCont_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< TBMWPCCont >
();
26
}
27
throw
std::runtime_error(
"Unsupported persistent version of Data Collection"
);
28
}
29
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:63
TBMWPCContCnv.h
TBMWPCCont_PERS
TBMWPCCont_p1 TBMWPCCont_PERS
Definition
TBMWPCContCnv.h:20
TBMWPCContCnv::createPersistent
virtual TBMWPCCont_PERS * createPersistent(TBMWPCCont *transCont)
Definition
TBMWPCContCnv.cxx:7
TBMWPCContCnv::m_TPConverter
TBMWPCContCnv_p1 m_TPConverter
Definition
TBMWPCContCnv.h:32
TBMWPCContCnv::createTransient
virtual TBMWPCCont * createTransient()
Definition
TBMWPCContCnv.cxx:14
TBMWPCCont
"TBEvent/TBMWPCCont.h"
Definition
TBMWPCCont.h:17
T_AthenaPoolCustomCnv< TBMWPCCont, TBMWPCCont_PERS >::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
T_AthenaPoolCustomCnv< TBMWPCCont, TBMWPCCont_PERS >::poolReadObject
P * poolReadObject()
pool::Guid
::Guid Guid
Definition
T_AthenaPoolCustCnv.h:19
Generated on
for ATLAS Offline Software by
1.14.0