ATLAS Offline Software
MuonSpectrometer
MuonCnv
MuonEventTPCnv
src
MuonChamberT0s
ChamberT0sCnv_p1.cxx
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
//
7
// file: ChamberT0sCnv_p1.cxx
8
//
9
//-----------------------------------------------------------------------------
10
11
#include "
MuonChamberT0s/ChamberT0s.h
"
12
#include "
MuonEventTPCnv/MuonChamberT0s/ChamberT0sCnv_p1.h
"
13
#include <utility>
14
15
void
ChamberT0sCnv_p1::
16
persToTrans
(
const
Muon::ChamberT0s_p1
*persObj,
Muon::ChamberT0s
*transObj,MsgStream &
log
)
const
17
{
18
if
(
log
.level() <=
MSG::DEBUG
)
log
<<
MSG::DEBUG
<<
"ChamberT0sCnv_p1::persToTrans"
<<
endmsg
;
19
// better way to do this?
20
21
std::vector<std::pair<Identifier, float> > t0s;
22
t0s.reserve( persObj->
m_t0s
.size() );
23
for
(
const
std::pair<unsigned int, float>&
p
: persObj->
m_t0s
) {
24
t0s.emplace_back(
Identifier
(
p
.first),
p
.second );
25
}
26
27
*transObj =
Muon::ChamberT0s
(std::move(t0s));
28
}
29
30
void
ChamberT0sCnv_p1::
31
transToPers
(
const
Muon::ChamberT0s
*transObj,
Muon::ChamberT0s_p1
*persObj, MsgStream &
log
)
const
32
{
33
if
(
log
.level() <=
MSG::DEBUG
)
log
<<
MSG::DEBUG
<<
"ChamberT0sCnv_p1::transToPers"
<<
endmsg
;
34
persObj->
m_t0s
.clear();
35
persObj->
m_t0s
.reserve( transObj->
getAllT0s
().size() );
36
for
(
const
std::pair< Identifier, float>&
p
: transObj->
getAllT0s
() ) {
37
persObj->
m_t0s
.emplace_back(
p
.first.get_identifier32().get_compact(),
p
.second );
38
}
39
}
40
41
python.PerfMonSerializer.p
def p
Definition:
PerfMonSerializer.py:743
Muon::ChamberT0s
Stores links between chambers and the reconstructed T0.
Definition:
ChamberT0s.h:17
Muon::ChamberT0s_p1
Definition:
ChamberT0s_p1.h:13
Identifier
Definition:
DetectorDescription/Identifier/Identifier/Identifier.h:32
endmsg
#define endmsg
Definition:
AnalysisConfig_Ntuple.cxx:63
Muon::ChamberT0s::getAllT0s
const std::vector< std::pair< Identifier, float > > & getAllT0s() const
Returns entire list of T0s.
Definition:
ChamberT0s.h:68
ChamberT0sCnv_p1::persToTrans
void persToTrans(const Muon::ChamberT0s_p1 *persObj, Muon::ChamberT0s *transObj, MsgStream &log) const
Definition:
ChamberT0sCnv_p1.cxx:16
ChamberT0sCnv_p1.h
ChamberT0s.h
DEBUG
#define DEBUG
Definition:
page_access.h:11
python.CaloCondTools.log
log
Definition:
CaloCondTools.py:20
Muon::ChamberT0s_p1::m_t0s
std::vector< std::pair< unsigned int, float > > m_t0s
Definition:
ChamberT0s_p1.h:16
ChamberT0sCnv_p1::transToPers
void transToPers(const Muon::ChamberT0s *transObj, Muon::ChamberT0s_p1 *persObj, MsgStream &log) const
Definition:
ChamberT0sCnv_p1.cxx:31
Generated on Tue Jul 2 2024 21:12:09 for ATLAS Offline Software by
1.8.18