ATLAS Offline Software
MuonSpectrometer
MuonCnv
MuonEventAthenaPool
src
RpcPadContainerCnv.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
/*
6
custom POOL converter for RPC PAD
7
8
@author Tadashi Maeno
9
based on SCT_RDO_ContainerCnv by RD Schaffer
10
*/
11
12
#ifndef MUONEVENTATHENAPOOL_RPCPADCONTAINERCNV_H
13
#define MUONEVENTATHENAPOOL_RPCPADCONTAINERCNV_H
14
15
#include "
MuonRdoContainerTPCnv.h
"
16
#include "
MuonRDO/RpcPadContainer.h
"
17
#include "
RpcPadContainerCnv_p1.h
"
18
#include "
RpcPadContainerCnv_p2.h
"
19
#include "
MuonEventAthenaPool/RpcPadContainer_p1.h
"
20
#include "
MuonEventAthenaPool/RpcPadContainer_p2.h
"
21
22
23
typedef
MuonRdoContainerTPCnv<RpcPadContainer, RpcPadContainer_p2, RpcPadContainerCnv_p2 >
24
RpcPadContainerCnv
;
25
26
template
< >
27
inline
28
RpcPadContainer
*
29
RpcPadContainerCnv::createTransient
()
30
{
31
MsgStream
log
(
msgSvc
(),
"RpcPadContainerCnv"
);
32
if
(
log
.level() <=
MSG::DEBUG
)
log
<<
MSG::DEBUG
<<
" **** Entered createTransient() "
<<
endmsg
;
33
34
// the use of auto pointers ensures that the persistent object is deleted
35
// using the correct persistent type pointer
36
37
RpcPadContainer
*trans_cont = 0;
38
static
const
pool::Guid
p2_guid(
"3B29433B-015F-4664-AB3F-A6B2FAA8C97F"
);
39
static
const
pool::Guid
p1_guid(
"60A912DD-7920-4DCE-986E-6CD5644835BD"
);
40
static
const
pool::Guid
p0_guid(
"85B897F6-E15D-4215-9DAC-EA2828BCEEC9"
);
41
if
(
compareClassGuid
(p2_guid) ) {
42
if
(
log
.level() <=
MSG::DEBUG
)
log
<<
MSG::DEBUG
<<
" **** createTransient - p2 "
<<
endmsg
;
43
44
std::unique_ptr< RpcPadContainer_p2 > col_vect( poolReadObject< RpcPadContainer_p2 >() );
45
trans_cont =
m_TPconverter
.createTransient( col_vect.get(),
log
);
46
}
else
if
(
compareClassGuid
(p1_guid) ) {
47
if
(
log
.level() <=
MSG::DEBUG
)
log
<<
MSG::DEBUG
<<
" **** createTransient - p1 "
48
<<
endmsg
;
49
50
std::unique_ptr< RpcPadContainer_p1 > col_vect( poolReadObject< RpcPadContainer_p1 >() );
51
RpcPadContainerCnv_p1
cnv;
52
trans_cont = cnv.
createTransient
( col_vect.get(),
log
);
53
}
else
if
(
compareClassGuid
(p0_guid) ) {
54
if
(
log
.level() <=
MSG::DEBUG
)
log
<<
MSG::DEBUG
<<
" **** createTransient - p0 "
55
<<
endmsg
;
56
57
// old version from before TP separation
58
std::unique_ptr< COLL_vector > col_vect( this->poolReadObject< COLL_vector >() );
59
trans_cont =
createTransientFrom_p0
( col_vect.get(),
log
);
60
}
61
else
{
62
throw
std::runtime_error(
"Unsupported persistent version of RPC RDO container"
);
63
}
64
return
trans_cont;
65
}
66
67
#endif
68
69
70
71
RpcPadContainerCnv
MuonRdoContainerTPCnv< RpcPadContainer, RpcPadContainer_p2, RpcPadContainerCnv_p2 > RpcPadContainerCnv
Definition:
RpcPadContainerCnv.h:24
MuonRdoContainerTPCnv
Definition:
MuonRdoContainerTPCnv.h:25
pool::Guid
::Guid Guid
Definition:
T_AthenaPoolCustCnv.h:19
RpcPadContainer_p2.h
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition:
StdJOSetup.py:36
RpcPadContainerCnv_p1
Definition:
RpcPadContainerCnv_p1.h:25
endmsg
#define endmsg
Definition:
AnalysisConfig_Ntuple.cxx:63
RpcPadContainer_p1.h
MuonRdoContainerTPCnv.h
MuonRdoContainerTPCnv::createTransientFrom_p0
virtual T * createTransientFrom_p0(COLL_vector *persObj, MsgStream &log)
MuonRdoContainerTPCnv::createTransient
virtual T * createTransient()
Definition:
CscRawDataContainerCnv.h:25
DEBUG
#define DEBUG
Definition:
page_access.h:11
python.CaloCondTools.log
log
Definition:
CaloCondTools.py:20
MuonRdoContainerTPCnv::m_TPconverter
CONV m_TPconverter
convertor
Definition:
MuonRdoContainerTPCnv.h:45
RpcPadContainer.h
RpcPadContainerCnv_p2.h
T_AthenaPoolCustCnv< T, P >::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.
RpcPadContainerCnv_p1.h
RpcPadContainerCnv_p1::createTransient
virtual RpcPadContainer * createTransient(const RpcPadContainer_p1 *persObj, MsgStream &log) override
Definition:
RpcPadContainerCnv_p1.cxx:104
RpcPadContainer
Use IdentifiableContainer with RpcPad.
Definition:
RpcPadContainer.h:23
Generated on Thu Nov 7 2024 21:25:03 for ATLAS Offline Software by
1.8.18