ATLAS Offline Software
Loading...
Searching...
No Matches
CscPrepDataCnv_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: CscPrepDataCnv_p1.cxx
8//
9//-----------------------------------------------------------------------------
10
13
15persToTrans( const Muon::CscPrepData_p1 *persObj, Muon::CscPrepData *transObj,MsgStream &log )
16{
17 if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "CscPrepDataCnv_p1::persToTrans" << endmsg;
18
19 Amg::Vector2D locPos;
20 locPos.setZero();
21
22 *transObj = Muon::CscPrepData (Identifier(),
23 0, // idDE,
24 locPos,
25 std::vector<Identifier>(), //rdoList
26 {}, // locErrMat
27 nullptr, // detEl
28 persObj->m_charge,
29 persObj->m_time,
30 static_cast<Muon::CscClusterStatus>((persObj->m_status)&0xFF), // First 8 bits reserved for ClusterStatus.
31 static_cast<Muon::CscTimeStatus>((persObj->m_status)>>8)
32 );
33
34 fillTransFromPStore( &m_prdCnv, persObj->m_prd, transObj, log );
35}
36
38transToPers( const Muon::CscPrepData *transObj, Muon::CscPrepData_p1 *persObj, MsgStream &log )
39{
40 if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "CscPrepDataCnv_p1::transToPers" << endmsg;
41 persObj->m_prd = baseToPersistent( &m_prdCnv, transObj, log );
42 persObj->m_charge = transObj->charge();
43 persObj->m_time = transObj->time();
44 persObj->m_status = (transObj->timeStatus()<<8); // First 8 bits reserved for ClusterStatus.
45 persObj->m_status += transObj->status();
46}
47
48
#define endmsg
void persToTrans(const Muon::CscPrepData_p1 *persObj, Muon::CscPrepData *transObj, MsgStream &log)
PrepRawDataCnv_p1 * m_prdCnv
void transToPers(const Muon::CscPrepData *transObj, Muon::CscPrepData_p1 *persObj, 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
int m_status
in here we pack both the transient values m_status and m_timeStatus (introduced in MuonPrepRawData-03...
Class representing clusters from the CSC.
Definition CscPrepData.h:39
CscTimeStatus timeStatus() const
Returns the Csc time status flag.
double time() const
Returns the time.
int charge() const
Returns the charge.
CscClusterStatus status() const
Returns the Csc status (position measurement) flag.
Eigen::Matrix< double, 2, 1 > Vector2D
CscClusterStatus
Enum to represent the cluster status - see the specific enum values for more details.
CscTimeStatus
Enum to represent the cluster time measurement status - see the specific enum values for more details...