ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
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
(
const
Token
* token)
27
{
28
MsgStream log(msgSvc(),
"MdtCsmContainerCnv"
);
29
if
(log.level() <= MSG::DEBUG) log << MSG::DEBUG <<
" **** Entered createTransient(const Token* token) "
<<
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
Guid
p1_guid(
"66D77835-5290-4C9A-842A-AF10F384FC93"
);
36
static
const
Guid
p0_guid(
"CFDA6FF6-557F-40CB-9C54-B5A7404A9175"
);
37
38
if
(
compareClassGuid
(token, p1_guid) ) {
39
std::unique_ptr< MdtCsmContainer_p1 > col_vect(
poolReadObject< MdtCsmContainer_p1 >
(token) );
40
trans_cont =
m_TPconverter
.createTransient( col_vect.get(), log );
41
}
else
if
(
compareClassGuid
(token, p0_guid) ) {
42
// old version from before TP separation
43
std::unique_ptr< COLL_vector > col_vect( this->
poolReadObject< COLL_vector >
(token) );
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
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
MdtCsmContainerCnv
MuonRdoContainerTPCnv< MdtCsmContainer, MdtCsmContainer_p1, MdtCsmContainerCnv_p1 > MdtCsmContainerCnv
Definition
MdtCsmContainerCnv.h:21
MdtCsmContainerCnv_p1.h
MdtCsmContainer.h
MdtCsmContainer_p1.h
MuonRdoContainerTPCnv.h
Guid
This class provides a encapsulation of a GUID/UUID/CLSID/IID data structure (128 bit number).
Definition
Guid.h:25
MdtCsmContainer
This container provides acces to the MDT RDOs.
Definition
MdtCsmContainer.h:22
MuonRdoContainerTPCnv
Definition
MuonRdoContainerTPCnv.h:25
MuonRdoContainerTPCnv< MdtCsmContainer, MdtCsmContainer_p1, MdtCsmContainerCnv_p1 >::createTransient
virtual MdtCsmContainer * createTransient(const Token *token)
Definition
MdtCsmContainerCnv.h:26
MuonRdoContainerTPCnv< MdtCsmContainer, MdtCsmContainer_p1, MdtCsmContainerCnv_p1 >::m_TPconverter
MdtCsmContainerCnv_p1 m_TPconverter
Definition
MuonRdoContainerTPCnv.h:45
MuonRdoContainerTPCnv::createTransientFrom_p0
virtual T * createTransientFrom_p0(COLL_vector *persObj, MsgStream &log)
T_AthenaPoolCustomCnv< T, P >::compareClassGuid
virtual bool compareClassGuid(const Token *token, const Guid &clid) const
MuonRdoContainerTPCnv< MdtCsmContainer, MdtCsmContainer_p1, MdtCsmContainerCnv_p1 >::poolReadObject
MdtCsmContainer_p1 * poolReadObject(const Token *token)
Token
This class provides a token that identifies in a unique way objects on the persistent storage.
Definition
Token.h:22
Generated on
for ATLAS Offline Software by
1.17.0