ATLAS Offline Software
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 
18 persToTrans( const Muon::MuonSegmentQuality_p1 *persObj, Muon::MuonSegmentQuality *transObj,MsgStream &log )
19 {
20  std::vector<Identifier> channelsWithoutHit;
21  channelsWithoutHit.reserve(persObj->m_channelsWithoutHit.size());
22 for (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 
32 transToPers( 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 
Muon::MuonSegmentQuality
Definition: MuonSegmentQuality.h:34
Identifier32
Definition: Identifier32.h:25
Muon::MuonSegmentQuality_p1
Definition: MuonSegmentQuality_p1.h:18
MuonSegmentQualityCnv_p1::transToPers
void transToPers(const Muon ::MuonSegmentQuality *transObj, Muon ::MuonSegmentQuality_p1 *persObj, MsgStream &log)
Definition: MuonSegmentQualityCnv_p1.cxx:32
MuonSegmentQuality.h
x
#define x
ITPConverterFor< TRANS_BASE >::fillTransFromPStore
void fillTransFromPStore(CNV **cnv, const TPObjRef &ref, TRANS_T *trans, MsgStream &log) const
Convert persistent object, stored in the the top-level persistent object and referenced by the TP Ref...
Definition: TPConverter.h:145
Muon::MuonSegmentQuality_p1::m_channelsWithoutHit
std::vector< unsigned int > m_channelsWithoutHit
Definition: MuonSegmentQuality_p1.h:25
Muon::MuonSegmentQuality_p1::m_base
TPObjRef m_base
Definition: MuonSegmentQuality_p1.h:21
ITPConverterFor< TRANS_BASE >::baseToPersistent
TPObjRef baseToPersistent(CNV **cnv, const typename CNV::Trans_t *transObj, MsgStream &log) const
Persistify bass class of a given object and store the persistent represenation in the storage vector ...
Definition: TPConverter.h:97
MuonSegmentQualityCnv_p1::persToTrans
void persToTrans(const Muon ::MuonSegmentQuality_p1 *persObj, Muon ::MuonSegmentQuality *transObj, MsgStream &log)
Definition: MuonSegmentQualityCnv_p1.cxx:18
MuonSegmentQualityCnv_p1::m_baseCnv
FitQualityCnv_p1 * m_baseCnv
Definition: MuonSegmentQualityCnv_p1.h:36
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
FitQuality.h
MuonSegmentQualityCnv_p1.h
Muon::MuonSegmentQuality::channelsWithoutHit
const std::vector< Identifier > & channelsWithoutHit() const
vector of identifiers of channels crossed by the segment but without hit
Definition: MuonSegmentQuality.h:74
Identifier
Definition: IdentifierFieldParser.cxx:14