ATLAS Offline Software
TestBeam
TBEventAthenaPool
src
TBADCRawContCnv.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 "
TBADCRawContCnv.h
"
6
7
TBADCRawCont_PERS
*
TBADCRawContCnv::createPersistent
(
TBADCRawCont
* transCont) {
8
MsgStream
log
(
msgSvc
(),
"TBADCRawContConverter"
);
9
TBADCRawCont_PERS
*persObj =
m_TPConverter
.
createPersistent
( transCont,
log
);
10
log
<<
MSG::DEBUG
<<
"Success"
<<
endmsg
;
11
return
persObj;
12
}
13
14
TBADCRawCont
*
TBADCRawContCnv::createTransient
() {
15
MsgStream
log
(
msgSvc
(),
"TBADCRawContConverter"
);
16
static
const
pool::Guid
p1_guid(
"4D0407FD-A534-4595-B5BD-4A8DB797A094"
);
// GUID of the persistent object
17
static
const
pool::Guid
p0_guid(
"5D407302-FD4E-42BC-A6E5-F5C9ECCDCBF1"
);
// GUID of the transient object
18
if
(
compareClassGuid
(p1_guid) ) {
19
// using unique_ptr ensures deletion of the persistent object
20
std::unique_ptr< TBADCRawCont_p1 > col_vect( poolReadObject< TBADCRawCont_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< TBADCRawCont >();
26
}
27
throw
std::runtime_error(
"Unsupported persistent version of Data Collection"
);
28
}
29
TBADCRawCont_p1
Definition:
TBADCRawCont_p1.h:15
TPPolyCnvBase::createTransient
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
TBADCRawContCnv::createTransient
virtual TBADCRawCont * createTransient()
Definition:
TBADCRawContCnv.cxx:14
TPAbstractPolyCnvBase::createPersistent
virtual PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of a transient object.
TBADCRawContCnv::m_TPConverter
TBADCRawContCnv_p1 m_TPConverter
Definition:
TBADCRawContCnv.h:32
TBADCRawContCnv::createPersistent
virtual TBADCRawCont_PERS * createPersistent(TBADCRawCont *transCont)
Definition:
TBADCRawContCnv.cxx:7
pool::Guid
::Guid Guid
Definition:
T_AthenaPoolCustCnv.h:19
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition:
StdJOSetup.py:36
endmsg
#define endmsg
Definition:
AnalysisConfig_Ntuple.cxx:63
TBADCRawContCnv.h
DEBUG
#define DEBUG
Definition:
page_access.h:11
python.CaloCondTools.log
log
Definition:
CaloCondTools.py:20
T_AthenaPoolCustCnv::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.
TBADCRawCont
Definition:
TBADCRawCont.h:20
Generated on Thu Nov 7 2024 21:27:09 for ATLAS Offline Software by
1.8.18