ATLAS Offline Software
MuonSpectrometer
MuonCnv
MuonEventAthenaPool
src
MdtCsmContainerCnv.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 MDT CSM
7
8
@author Tadashi Maeno
9
based on SCT_RDO_ContainerCnv by RD Schaffer
10
*/
11
12
#ifndef MUONEVENTATHENAPOOL_MdtCsmContainerCnv_H
13
#define MUONEVENTATHENAPOOL_MdtCsmContainerCnv_H
14
15
#include "
MuonRdoContainerTPCnv.h
"
16
#include "
MuonRDO/MdtCsmContainer.h
"
17
#include "
MdtCsmContainerCnv_p1.h
"
18
#include "
MuonEventAthenaPool/MdtCsmContainer_p1.h
"
19
20
21
typedef
MuonRdoContainerTPCnv<MdtCsmContainer, MdtCsmContainer_p1, MdtCsmContainerCnv_p1 >
MdtCsmContainerCnv
;
22
23
template
< >
24
inline
25
MdtCsmContainer
*
26
MdtCsmContainerCnv::createTransient
()
27
{
28
MsgStream
log
(
msgSvc
(),
"MdtCsmContainerCnv"
);
29
if
(
log
.level() <=
MSG::DEBUG
)
log
<<
MSG::DEBUG
<<
" **** Entered createTransient() "
<<
endmsg
;
30
31
// the use of auto pointers ensures that the persistent object is deleted
32
// using the correct persistent type pointer
33
34
MdtCsmContainer
*trans_cont = 0;
35
static
const
pool::Guid
p1_guid(
"66D77835-5290-4C9A-842A-AF10F384FC93"
);
36
static
const
pool::Guid
p0_guid(
"CFDA6FF6-557F-40CB-9C54-B5A7404A9175"
);
37
38
if
(
compareClassGuid
(p1_guid) ) {
39
std::unique_ptr< MdtCsmContainer_p1 > col_vect( poolReadObject< MdtCsmContainer_p1 >() );
40
trans_cont =
m_TPconverter
.createTransient( col_vect.get(),
log
);
41
}
else
if
(
compareClassGuid
(p0_guid) ) {
42
// old version from before TP separation
43
std::unique_ptr< COLL_vector > col_vect( this->poolReadObject< COLL_vector >() );
44
trans_cont =
createTransientFrom_p0
( col_vect.get(),
log
);
45
}
else
{
46
throw
std::runtime_error(
"Unsupported persistent version of CSC RDO container"
);
47
}
48
return
trans_cont;
49
}
50
51
52
#endif
MdtCsmContainer
This container provides acces to the MDT RDOs.
Definition:
MdtCsmContainer.h:22
MdtCsmContainer.h
MuonRdoContainerTPCnv
Definition:
MuonRdoContainerTPCnv.h:25
pool::Guid
::Guid Guid
Definition:
T_AthenaPoolCustCnv.h:19
MdtCsmContainer_p1.h
MdtCsmContainerCnv_p1.h
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition:
StdJOSetup.py:36
endmsg
#define endmsg
Definition:
AnalysisConfig_Ntuple.cxx:63
MuonRdoContainerTPCnv.h
MuonRdoContainerTPCnv::createTransientFrom_p0
virtual T * createTransientFrom_p0(COLL_vector *persObj, MsgStream &log)
MuonRdoContainerTPCnv::createTransient
virtual T * createTransient()
Definition:
CscRawDataContainerCnv.h:25
MdtCsmContainerCnv
MuonRdoContainerTPCnv< MdtCsmContainer, MdtCsmContainer_p1, MdtCsmContainerCnv_p1 > MdtCsmContainerCnv
Definition:
MdtCsmContainerCnv.h:21
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
T_AthenaPoolCustCnv< T, P >::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.
Generated on Tue Jul 2 2024 21:21:16 for ATLAS Offline Software by
1.8.18