ATLAS Offline Software
Loading...
Searching...
No Matches
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
16persToTrans( 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
31transToPers( 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
#define endmsg
void transToPers(const Muon::ChamberT0s *transObj, Muon::ChamberT0s_p1 *persObj, MsgStream &log) const
void persToTrans(const Muon::ChamberT0s_p1 *persObj, Muon::ChamberT0s *transObj, MsgStream &log) const
std::vector< std::pair< unsigned int, float > > m_t0s
Stores links between chambers and the reconstructed T0.
Definition ChamberT0s.h:17
const std::vector< std::pair< Identifier, float > > & getAllT0s() const
Returns entire list of T0s.
Definition ChamberT0s.h:68