ATLAS Offline Software
Loading...
Searching...
No Matches
TestBeam
TBEventAthenaPool
src
TBBPCContCnv.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 "
TBBPCContCnv.h
"
6
7
TBBPCCont_PERS
*
TBBPCContCnv::createPersistent
(
TBBPCCont
* transCont) {
8
MsgStream log(msgSvc(),
"TBBPCContConverter"
);
9
TBBPCCont_PERS
*persObj =
m_TPConverter
.createPersistent( transCont, log );
10
log << MSG::DEBUG <<
"Success"
<<
endmsg
;
11
return
persObj;
12
}
13
14
TBBPCCont
*
TBBPCContCnv::createTransient
() {
15
MsgStream log(msgSvc(),
"TBBPCContConverter"
);
16
static
const
pool::Guid
p1_guid(
"89A09260-F284-4694-8687-3C6C72989A96"
);
// GUID of the persistent object
17
static
const
pool::Guid
p0_guid(
"05E6C927-F43C-4C2A-B654-C671BF8FDB67"
);
// GUID of the transient object
18
if
(
compareClassGuid
(p1_guid) ) {
19
// using unique_ptr ensures deletion of the persistent object
20
std::unique_ptr< TBBPCCont_p1 > col_vect(
poolReadObject< TBBPCCont_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< TBBPCCont >
();
26
}
27
throw
std::runtime_error(
"Unsupported persistent version of Data Collection"
);
28
}
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:63
TBBPCContCnv.h
TBBPCCont_PERS
TBBPCCont_p1 TBBPCCont_PERS
Definition
TBBPCContCnv.h:20
TBBPCContCnv::createTransient
virtual TBBPCCont * createTransient()
Definition
TBBPCContCnv.cxx:14
TBBPCContCnv::createPersistent
virtual TBBPCCont_PERS * createPersistent(TBBPCCont *transCont)
Definition
TBBPCContCnv.cxx:7
TBBPCContCnv::m_TPConverter
TBBPCContCnv_p1 m_TPConverter
Definition
TBBPCContCnv.h:32
TBBPCCont
"TBEvent/TBBPCCont.h"
Definition
TBBPCCont.h:17
T_AthenaPoolCustomCnv< TBBPCCont, TBBPCCont_PERS >::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
T_AthenaPoolCustomCnv< TBBPCCont, TBBPCCont_PERS >::poolReadObject
P * poolReadObject()
pool::Guid
::Guid Guid
Definition
T_AthenaPoolCustCnv.h:19
Generated on
for ATLAS Offline Software by
1.14.0