ATLAS Offline Software
Loading...
Searching...
No Matches
TestBeam
TBEventAthenaPool
src
TBTDCRawContCnv.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 "
TBTDCRawContCnv.h
"
6
7
TBTDCRawCont_PERS
*
TBTDCRawContCnv::createPersistent
(
TBTDCRawCont
* transCont) {
8
MsgStream log(msgSvc(),
"TBTDCRawContConverter"
);
9
TBTDCRawCont_PERS
*persObj =
m_TPConverter
.createPersistent( transCont, log );
10
log << MSG::DEBUG <<
"Success"
<<
endmsg
;
11
return
persObj;
12
}
13
14
TBTDCRawCont
*
TBTDCRawContCnv::createTransient
() {
15
MsgStream log(msgSvc(),
"TBTDCRawContConverter"
);
16
static
const
pool::Guid
p1_guid(
"C05FD0A4-E5AD-41C8-9EA5-2A71378BB247"
);
// GUID of the persistent object
17
static
const
pool::Guid
p0_guid(
"82D6D14E-49FE-4841-9B39-08D66B9DC7CE"
);
// GUID of the transient object
18
if
(
compareClassGuid
(p1_guid) ) {
19
// using unique_ptr ensures deletion of the persistent object
20
std::unique_ptr< TBTDCRawCont_p1 > col_vect(
poolReadObject< TBTDCRawCont_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< TBTDCRawCont >
();
26
}
27
throw
std::runtime_error(
"Unsupported persistent version of Data Collection"
);
28
}
29
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:63
TBTDCRawContCnv.h
TBTDCRawCont_PERS
TBTDCRawCont_p1 TBTDCRawCont_PERS
Definition
TBTDCRawContCnv.h:21
TBTDCRawContCnv::createPersistent
virtual TBTDCRawCont_PERS * createPersistent(TBTDCRawCont *transCont)
Definition
TBTDCRawContCnv.cxx:7
TBTDCRawContCnv::createTransient
virtual TBTDCRawCont * createTransient()
Definition
TBTDCRawContCnv.cxx:14
TBTDCRawContCnv::m_TPConverter
TBTDCRawContCnv_p1 m_TPConverter
Definition
TBTDCRawContCnv.h:33
TBTDCRawCont
"TBEvent/TBTDCRawCont.h"
Definition
TBTDCRawCont.h:21
T_AthenaPoolCustomCnv< TBTDCRawCont, TBTDCRawCont_PERS >::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
T_AthenaPoolCustomCnv< TBTDCRawCont, TBTDCRawCont_PERS >::poolReadObject
P * poolReadObject()
pool::Guid
::Guid Guid
Definition
T_AthenaPoolCustCnv.h:19
Generated on
for ATLAS Offline Software by
1.14.0