ATLAS Offline Software
CscStripPrepDataCnv_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: CscStripPrepDataCnv_p1.cxx
8 //
9 //-----------------------------------------------------------------------------
10 
13 
15 persToTrans( const Muon::CscStripPrepData_p1 *persObj, Muon::CscStripPrepData *transObj,MsgStream &log )
16 {
17  if (log.level() <= MSG::DEBUG)
18  log << MSG::DEBUG << "CscStripPrepDataCnv_p1::persToTrans" << endmsg;
19 
20  Amg::Vector2D locpos;
21  locpos.setZero();
22 
23  *transObj = Muon::CscStripPrepData (transObj->identify(),
24  persObj->m_collectionHash,
25  locpos,
26  {}, // locerrmat
27  transObj->detectorElement(),
28  persObj->m_sampleCharges,
29  persObj->m_timeOfFirstSample,
30  persObj->m_samplingTime);
31 
32  if (persObj->m_samplingPhase)
33  transObj->set_samplingPhase();
34  fillTransFromPStore( &m_prdCnv, persObj->m_prd, transObj, log );
35 }
36 
38 transToPers( const Muon::CscStripPrepData *transObj, Muon::CscStripPrepData_p1 *persObj, MsgStream &log )
39 {
40  if (log.level() <= MSG::DEBUG)
41  log << MSG::DEBUG << "CscStripPrepDataCnv_p1::transToPers" << endmsg;
42  persObj->m_prd = baseToPersistent( &m_prdCnv, transObj, log );
43  persObj->m_collectionHash = transObj->collectionHash();
44  persObj->m_sampleCharges = transObj->sampleCharges();
45  persObj->m_timeOfFirstSample = transObj->timeOfFirstSample();
46  persObj->m_samplingTime = transObj->samplingTime();
47  persObj->m_samplingPhase = transObj->samplingPhase();
48 }
49 
50 
Muon::CscStripPrepData::samplingTime
unsigned short samplingTime() const
return the sampling time in ns: the time between samplings
Definition: CscStripPrepData.h:173
Muon::CscStripPrepData::set_samplingPhase
void set_samplingPhase()
set the sampling phase
Definition: CscStripPrepData.h:183
Muon::CscStripPrepData_p1::m_prd
TPObjRef m_prd
Definition: CscStripPrepData_p1.h:25
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
CscStripPrepData.h
CscStripPrepDataCnv_p1::transToPers
void transToPers(const Muon::CscStripPrepData *transObj, Muon::CscStripPrepData_p1 *persObj, MsgStream &log)
Definition: CscStripPrepDataCnv_p1.cxx:38
Muon::CscStripPrepData_p1::m_sampleCharges
std::vector< float > m_sampleCharges
Definition: CscStripPrepData_p1.h:30
Muon::CscStripPrepData::detectorElement
virtual const MuonGM::CscReadoutElement * detectorElement() const override final
return the detector element corresponding to this PRD The pointer will be zero if the det el is not d...
Definition: CscStripPrepData.h:153
Muon::CscStripPrepData::collectionHash
virtual const IdentifierHash collectionHash() const final
returns the IdentifierHash corresponding to the channel.
Definition: CscStripPrepData.h:158
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::CscStripPrepData
Class representing the raw data of one CSC strip (for clusters look at Muon::CscPrepData).
Definition: CscStripPrepData.h:40
Muon::CscStripPrepData::samplingPhase
bool samplingPhase() const
return the sampling phase
Definition: CscStripPrepData.h:178
Muon::CscStripPrepData_p1::m_collectionHash
IdentifierHash m_collectionHash
Definition: CscStripPrepData_p1.h:26
CscStripPrepDataCnv_p1::persToTrans
void persToTrans(const Muon::CscStripPrepData_p1 *persObj, Muon::CscStripPrepData *transObj, MsgStream &log)
Definition: CscStripPrepDataCnv_p1.cxx:15
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
Muon::CscStripPrepData_p1::m_samplingTime
unsigned short m_samplingTime
Definition: CscStripPrepData_p1.h:32
Trk::PrepRawData::identify
Identifier identify() const
return the identifier
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
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
Muon::CscStripPrepData_p1::m_samplingPhase
bool m_samplingPhase
Definition: CscStripPrepData_p1.h:33
Muon::CscStripPrepData_p1
Definition: CscStripPrepData_p1.h:19
Muon::CscStripPrepData_p1::m_timeOfFirstSample
float m_timeOfFirstSample
Definition: CscStripPrepData_p1.h:31
Muon::CscStripPrepData::timeOfFirstSample
double timeOfFirstSample() const
return the time of the first sample
Definition: CscStripPrepData.h:168
Muon::CscStripPrepData::sampleCharges
const std::vector< float > & sampleCharges() const
Return the time samples.
Definition: CscStripPrepData.h:163
CscStripPrepDataCnv_p1::m_prdCnv
PrepRawDataCnv_p1 * m_prdCnv
Definition: CscStripPrepDataCnv_p1.h:35
CscStripPrepDataCnv_p1.h