ATLAS Offline Software
Loading...
Searching...
No Matches
MuonSegmentQualityCnv_p1.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5//-----------------------------------------------------------------------------
6//
7// file: MuonSegmentQualityCnv_p1.cxx
8//
9//-----------------------------------------------------------------------------
10
14#include <iterator>
15#include <algorithm>
16
18persToTrans( const Muon::MuonSegmentQuality_p1 *persObj, Muon::MuonSegmentQuality *transObj,MsgStream &log )
19{
20 std::vector<Identifier> channelsWithoutHit;
21 channelsWithoutHit.reserve(persObj->m_channelsWithoutHit.size());
22for (unsigned int x : persObj->m_channelsWithoutHit)
23 channelsWithoutHit.emplace_back(Identifier32(x));
24
25 *transObj = Muon::MuonSegmentQuality (0, // chi2
26 0, // ndof
27 std::move(channelsWithoutHit));
28 fillTransFromPStore( &m_baseCnv, persObj->m_base, transObj, log );
29}
30
32transToPers( const Muon::MuonSegmentQuality *transObj, Muon::MuonSegmentQuality_p1 *persObj, MsgStream &log )
33{
34 persObj->m_base = baseToPersistent( &m_baseCnv, transObj, log );
35 persObj->m_channelsWithoutHit.clear();
36 persObj->m_channelsWithoutHit.reserve(transObj->channelsWithoutHit().size());
37 for (const Identifier& id : transObj->channelsWithoutHit())
38 persObj->m_channelsWithoutHit.push_back(id.get_identifier32().get_compact());
39}
40
41
42
#define x
TPObjRef baseToPersistent(CNV **cnv, const typename CNV::Trans_t *transObj, MsgStream &log) const
Definition TPConverter.h:97
void fillTransFromPStore(CNV **cnv, const TPObjRef &ref, TRANS_T *trans, MsgStream &log) const
void persToTrans(const Muon ::MuonSegmentQuality_p1 *persObj, Muon ::MuonSegmentQuality *transObj, MsgStream &log)
void transToPers(const Muon ::MuonSegmentQuality *transObj, Muon ::MuonSegmentQuality_p1 *persObj, MsgStream &log)
std::vector< unsigned int > m_channelsWithoutHit
This is the common muon segment quality object.
const std::vector< Identifier > & channelsWithoutHit() const
vector of identifiers of channels crossed by the segment but without hit