ATLAS Offline Software
Trigger
TrigEvent
TrigEventAthenaPool
src
TrigT2MbtsBitsCnv.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 "
TrigT2MbtsBitsCnv.h
"
6
#include "
TrigCaloEventTPCnv/TrigT2MbtsBits_p1.h
"
7
#include "
TrigCaloEventTPCnv/TrigT2MbtsBitsCnv_p1.h
"
8
#include "
TrigCaloEventTPCnv/TrigT2MbtsBits_p2.h
"
9
#include "
TrigCaloEventTPCnv/TrigT2MbtsBitsCnv_p2.h
"
10
11
TrigT2MbtsBitsCnv::TrigT2MbtsBitsCnv
(ISvcLocator* svcloc):
TrigT2MbtsBitsCnvBase
(svcloc) {}
12
TrigT2MbtsBitsCnv::~TrigT2MbtsBitsCnv
(){}
13
14
TrigT2MbtsBits_PERS
*
TrigT2MbtsBitsCnv::createPersistent
(
TrigT2MbtsBits
* transObj) {
15
MsgStream
mlog
(
msgSvc
(),
"TrigT2MbtsBitsConverter"
);
16
mlog
<<
MSG::DEBUG
<<
"TrigT2MbtsBitsCnv::createPersistent"
<<
endmsg
;
17
18
TrigT2MbtsBitsCnv_p2
converter;
19
TrigT2MbtsBits_PERS
*persObj = converter.
createPersistent
( transObj,
mlog
);
20
21
return
persObj;
22
}
23
24
TrigT2MbtsBits
*
TrigT2MbtsBitsCnv::createTransient
() {
25
MsgStream
mlog
(
msgSvc
(),
"TrigT2MbtsBitsConverter"
);
26
mlog
<<
MSG::DEBUG
<<
"TrigT2MbtsBitsCnv::createTransient "
<<
endmsg
;
27
28
static
const
pool::Guid
p2_guid(
"6D130C0D-20A2-4304-8E70-6775892217A6"
);
29
static
const
pool::Guid
p1_guid(
"32E86328-15EB-42F5-A93F-6F891220A626"
);
30
31
32
TrigT2MbtsBits
*transObj = 0;
33
34
if
(
compareClassGuid
(p2_guid) ) {
35
mlog
<<
MSG::DEBUG
<<
"TrigT2MbtsBitsCnv::reading p2 persistent object"
<<
endmsg
;
36
std::unique_ptr< TrigT2MbtsBits_p2 > pers_ptr( poolReadObject< TrigT2MbtsBits_p2 >() );
37
TrigT2MbtsBitsCnv_p2
converter;
38
transObj = converter.
createTransient
(pers_ptr.get(),
mlog
);
39
}
40
else
if
(
compareClassGuid
(p1_guid) ) {
41
mlog
<<
MSG::DEBUG
<<
"TrigT2MbtsBitsCnv::reading p1 persistent object"
<<
endmsg
;
42
std::unique_ptr< TrigT2MbtsBits_p1 > pers_ptr( poolReadObject< TrigT2MbtsBits_p1 >() );
43
TrigT2MbtsBitsCnv_p1
converter;
44
transObj = converter.
createTransient
(pers_ptr.get(),
mlog
);
45
}
46
else
{
47
throw
std::runtime_error(
"Unsupported persistent version of Data container"
);
48
}
49
50
return
transObj;
51
}
TrigT2MbtsBitsCnv::createTransient
TrigT2MbtsBits * createTransient()
Definition:
TrigT2MbtsBitsCnv.cxx:24
TrigT2MbtsBitsCnv_p2.h
TrigT2MbtsBitsCnv_p2
Definition:
TrigT2MbtsBitsCnv_p2.h:25
TPPolyCnvBase::createTransient
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
TrigT2MbtsBitsCnv_p1.h
TrigT2MbtsBitsCnv.h
TrigT2MbtsBits
Definition:
Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigT2MbtsBits.h:19
TPAbstractPolyCnvBase::createPersistent
virtual PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of a transient object.
TrigT2MbtsBits_p1.h
TrigT2MbtsBitsCnv_p1
Definition:
TrigT2MbtsBitsCnv_p1.h:25
pool::Guid
::Guid Guid
Definition:
T_AthenaPoolCustCnv.h:19
python.InDetPriVxFinderConfig.mlog
mlog
Definition:
InDetPriVxFinderConfig.py:134
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition:
StdJOSetup.py:36
T_AthenaPoolCustomCnv
Compatibility for old converter classes that don't get passed the key.
Definition:
T_AthenaPoolCustomCnv.h:132
endmsg
#define endmsg
Definition:
AnalysisConfig_Ntuple.cxx:63
TrigT2MbtsBits_p2.h
TrigT2MbtsBitsCnv::createPersistent
TrigT2MbtsBits_PERS * createPersistent(TrigT2MbtsBits *transObj)
Definition:
TrigT2MbtsBitsCnv.cxx:14
DEBUG
#define DEBUG
Definition:
page_access.h:11
TrigT2MbtsBitsCnv::TrigT2MbtsBitsCnv
TrigT2MbtsBitsCnv(ISvcLocator *svcloc)
Definition:
TrigT2MbtsBitsCnv.cxx:11
TrigT2MbtsBits_p2
Definition:
TrigT2MbtsBits_p2.h:20
T_AthenaPoolCustCnv::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.
TrigT2MbtsBitsCnv::~TrigT2MbtsBitsCnv
~TrigT2MbtsBitsCnv()
Definition:
TrigT2MbtsBitsCnv.cxx:12
Generated on Thu Nov 7 2024 21:30:11 for ATLAS Offline Software by
1.8.18