ATLAS Offline Software
SCT_ClusterOnTrackCnv_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: SCT_ClusterOnTrackCnv_p1.cxx
8 //
9 //-----------------------------------------------------------------------------
10 
13 
14 
17  InDet::SCT_ClusterOnTrack *transObj, MsgStream &log ) {
18 
20  m_elCnv.persToTrans(&persObj->m_prdLink,&rio,log);
21 
22  Amg::MatrixX localCovariance;
23  localCovariance.setZero();
24 
25  *transObj = InDet::SCT_ClusterOnTrack (rio,
27  localCovariance,
28  0, // idDE
29  Identifier(),
30  false,
31  persObj->m_positionAlongStrip);
32  fillTransFromPStore( &m_scCnv, persObj->m_RIO, transObj, log );
33 }
34 
37  InDet::SCT_ClusterOnTrack_p1 *persObj, MsgStream &log )
38 {
39 
40  persObj->m_positionAlongStrip = (float) transObj->positionAlongStrip();
41  persObj->m_RIO = baseToPersistent( &m_scCnv, transObj, log );
42 
43 // New suggestion from RD - as calling m_elCnv.transToPers crashes
44  if (transObj->prepRawDataLink().isValid() ) {
45  persObj->m_prdLink.m_contName = transObj->prepRawDataLink().dataID();
46  persObj->m_prdLink.m_elementIndex = transObj->prepRawDataLink().index();
47  }else{
48  persObj->m_prdLink.m_contName = "";
49  persObj->m_prdLink.m_elementIndex = 0;
50 // commented out because it spams the log files when reading AODs (tracks from electrons e.g. aso which are in AOD)
51 // log<<MSG::WARNING<<"SCT_ClusterOnTrackCnv_p1::transToPers - ElementLink broken!"<<endmsg;
52 // if (transObj->prepRawData()!=0)
53 // log<<MSG::WARNING<<"Dumping PRD: "<<*(transObj->prepRawData())<<endmsg;
54 // else
55 // log<<MSG::WARNING<<"No PRD to dump (or indeed link to)!"<<endmsg;
56  }
57 }
58 
59 
Trk::LocalParameters
Definition: LocalParameters.h:98
SCT_ClusterOnTrack.h
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:27
InDet::SCT_ClusterOnTrack::positionAlongStrip
double positionAlongStrip() const
Definition: SCT_ClusterOnTrack.h:163
SCT_ClusterOnTrackCnv_p1::m_elCnv
ElementLinkCnv_p1< ElementLinkToIDCSCT_ClusterContainer > m_elCnv
Definition: SCT_ClusterOnTrackCnv_p1.h:43
InDet::SCT_ClusterOnTrack_p1::m_RIO
TPObjRef m_RIO
Definition: SCT_ClusterOnTrack_p1.h:26
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
SCT_ClusterOnTrackCnv_p1::transToPers
void transToPers(const InDet::SCT_ClusterOnTrack *transObj, InDet::SCT_ClusterOnTrack_p1 *persObj, MsgStream &log)
Definition: SCT_ClusterOnTrackCnv_p1.cxx:36
SCT_ClusterOnTrackCnv_p1::m_scCnv
SiClusterOnTrackCnv_p1 * m_scCnv
Definition: SCT_ClusterOnTrackCnv_p1.h:42
InDet::SCT_ClusterOnTrack_p1::m_prdLink
ElementLinkInt_p1 m_prdLink
Link to PRD.
Definition: SCT_ClusterOnTrack_p1.h:30
SCT_ClusterOnTrackCnv_p1.h
InDet::SCT_ClusterOnTrack_p1
Definition: SCT_ClusterOnTrack_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
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
InDet::SCT_ClusterOnTrack::prepRawDataLink
const ElementLinkToIDCSCT_ClusterContainer & prepRawDataLink() const
Definition: SCT_ClusterOnTrack.h:153
SCT_ClusterOnTrackCnv_p1::persToTrans
void persToTrans(const InDet::SCT_ClusterOnTrack_p1 *persObj, InDet::SCT_ClusterOnTrack *transObj, MsgStream &log)
Definition: SCT_ClusterOnTrackCnv_p1.cxx:16
readCCLHist.float
float
Definition: readCCLHist.py:83
InDet::SCT_ClusterOnTrack
Definition: SCT_ClusterOnTrack.h:44
InDet::SCT_ClusterOnTrack_p1::m_positionAlongStrip
float m_positionAlongStrip
Definition: SCT_ClusterOnTrack_p1.h:33
Identifier
Definition: IdentifierFieldParser.cxx:14