ATLAS Offline Software
Loading...
Searching...
No Matches
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
15persToTrans( 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
38transToPers( 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
#define endmsg
void transToPers(const Muon::CscStripPrepData *transObj, Muon::CscStripPrepData_p1 *persObj, MsgStream &log)
void persToTrans(const Muon::CscStripPrepData_p1 *persObj, Muon::CscStripPrepData *transObj, MsgStream &log)
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
std::vector< float > m_sampleCharges
Class representing the raw data of one CSC strip (for clusters look at Muon::CscPrepData).
bool samplingPhase() const
return the sampling phase
double timeOfFirstSample() const
return the time of the first sample
const std::vector< float > & sampleCharges() const
Return the time samples.
void set_samplingPhase()
set the sampling phase
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...
virtual const IdentifierHash collectionHash() const final
returns the IdentifierHash corresponding to the channel.
unsigned short samplingTime() const
return the sampling time in ns: the time between samplings
Identifier identify() const
return the identifier
Eigen::Matrix< double, 2, 1 > Vector2D