ATLAS Offline Software
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 
13 #include <utility>
14 
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 
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 
TRTCalib_cfilter.t0s
list t0s
Definition: TRTCalib_cfilter.py:110
Muon::ChamberT0s
Stores links between chambers and the reconstructed T0.
Definition: ChamberT0s.h:17
Muon::ChamberT0s_p1
Definition: ChamberT0s_p1.h:13
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
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
Identifier
Definition: IdentifierFieldParser.cxx:14