ATLAS Offline Software
CompetingPixelClustersOnTrackCnv_p1.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 //-----------------------------------------------------------------------------
6 //
7 // file: InDetCompetingRIOsOnTrackCnv_p1.cxx
8 //
9 //-----------------------------------------------------------------------------
10 
16 
17 void
20  MsgStream &log )
21 {
22  auto containedChildRots = std::vector< const InDet::PixelClusterOnTrack * >{};
23 
24  for (const TPObjRef& ref : persObj->m_containedChildRots) {
25  ITPConverterFor<Trk::MeasurementBase> *rotCnv = nullptr;
26  const InDet::PixelClusterOnTrack* mcot = dynamic_cast<const InDet::PixelClusterOnTrack*>(createTransFromPStore(&rotCnv, ref, log));
27  containedChildRots.push_back( mcot );
28  }
29 
30  *transObj = InDet::CompetingPixelClustersOnTrack (std::move(containedChildRots),
31  std::vector<double>{});
32  fillTransFromPStore( &m_cRotCnv, persObj->m_competingROT, transObj, log );
33 }
34 
35 void
38  MsgStream &log )
39 {
40  persObj->m_competingROT = baseToPersistent( &m_cRotCnv, transObj, log );
41 
42  for (const InDet::PixelClusterOnTrack* cl : transObj->containedROTs()) {
43  ITPConverterFor<Trk::MeasurementBase> *rotCnv = nullptr;
44  persObj->m_containedChildRots.push_back( toPersistent(&rotCnv, cl, log) );
45  }
46 }
47 
48 
ITPConverterFor< Trk::MeasurementBase >
MeasurementBase.h
TPObjRef
Definition: TPObjRef.h:20
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
InDet::CompetingPixelClustersOnTrack::containedROTs
const std::vector< const InDet::PixelClusterOnTrack * > & containedROTs() const
returns the vector of PixelClusterOnTrack objects .
Definition: CompetingPixelClustersOnTrack.h:135
CompetingPixelClustersOnTrackCnv_p1::persToTrans
virtual void persToTrans(const InDet::CompetingPixelClustersOnTrack_p1 *persObj, InDet::CompetingPixelClustersOnTrack *transObj, MsgStream &log)
Definition: CompetingPixelClustersOnTrackCnv_p1.cxx:18
ITPConverterFor< TRANS_BASE >::toPersistent
TPObjRef toPersistent(CNV **cnv, const typename CNV::TransBase_t *transObj, MsgStream &log) const
Persistify an object and store the persistent represenation in the storage vector of the top-level pe...
Definition: TPConverter.h:119
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
InDet::CompetingPixelClustersOnTrack
Definition: CompetingPixelClustersOnTrack.h:47
RIO_OnTrack.h
CompetingPixelClustersOnTrackCnv_p1::m_cRotCnv
CompetingRIOsOnTrackCnv_p1 * m_cRotCnv
Definition: CompetingPixelClustersOnTrackCnv_p1.h:38
CompetingPixelClustersOnTrackCnv_p1::transToPers
virtual void transToPers(const InDet::CompetingPixelClustersOnTrack *transObj, InDet::CompetingPixelClustersOnTrack_p1 *persObj, MsgStream &log)
Definition: CompetingPixelClustersOnTrackCnv_p1.cxx:36
InDet::PixelClusterOnTrack
Definition: PixelClusterOnTrack.h:51
ref
const boost::regex ref(r_ef)
CompetingPixelClustersOnTrackCnv_p1.h
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
InDet::CompetingPixelClustersOnTrack_p1::m_containedChildRots
std::vector< TPObjRef > m_containedChildRots
Definition: CompetingPixelClustersOnTrack_p1.h:24
InDet::CompetingPixelClustersOnTrack_p1::m_competingROT
TPObjRef m_competingROT
link to base CompetingRIOsOnTrack
Definition: CompetingPixelClustersOnTrack_p1.h:22
PixelClusterOnTrack.h
CompetingPixelClustersOnTrack.h
dq_make_web_display.cl
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
Definition: dq_make_web_display.py:26
InDet::CompetingPixelClustersOnTrack_p1
Version 1 of the persistent class representing the transient class InDet::CompetingPixelClustersOnTra...
Definition: CompetingPixelClustersOnTrack_p1.h:17
ITPConverterFor< TRANS_BASE >::createTransFromPStore
CNV::Trans_t * createTransFromPStore(CNV **cnv, const TPObjRef &ref, MsgStream &log) const
Create transient representation of a persistent object, stored in the the top-level persistent object...
Definition: TPConverter.h:172