ATLAS Offline Software
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 
15 persToTrans( 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 
38 transToPers( 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 
Muon::CscPrepData_p1::m_time
float m_time
Definition: CscPrepData_p1.h:31
Muon::CscPrepData_p1::m_prd
TPObjRef m_prd
Definition: CscPrepData_p1.h:25
Muon::CscPrepData::charge
int charge() const
Returns the charge.
Definition: CscPrepData.h:153
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
Muon::CscPrepData_p1::m_charge
int m_charge
Definition: CscPrepData_p1.h:30
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::CscPrepData::timeStatus
CscTimeStatus timeStatus() const
Returns the Csc time status flag.
Definition: CscPrepData.h:168
CscPrepData.h
Muon::CscPrepData
Class representing clusters from the CSC.
Definition: CscPrepData.h:39
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
Muon::CscPrepData::status
CscClusterStatus status() const
Returns the Csc status (position measurement) flag.
Definition: CscPrepData.h:163
CscPrepDataCnv_p1.h
Muon::CscPrepData::time
double time() const
Returns the time.
Definition: CscPrepData.h:158
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
CscPrepDataCnv_p1::m_prdCnv
PrepRawDataCnv_p1 * m_prdCnv
Definition: CscPrepDataCnv_p1.h:34
CscPrepDataCnv_p1::persToTrans
void persToTrans(const Muon::CscPrepData_p1 *persObj, Muon::CscPrepData *transObj, MsgStream &log)
Definition: CscPrepDataCnv_p1.cxx:15
CscPrepDataCnv_p1::transToPers
void transToPers(const Muon::CscPrepData *transObj, Muon::CscPrepData_p1 *persObj, MsgStream &log)
Definition: CscPrepDataCnv_p1.cxx:38
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
Muon::CscPrepData_p1::m_status
int m_status
in here we pack both the transient values m_status and m_timeStatus (introduced in MuonPrepRawData-03...
Definition: CscPrepData_p1.h:32
Muon::CscClusterStatus
CscClusterStatus
Enum to represent the cluster status - see the specific enum values for more details.
Definition: CscClusterStatus.h:23
Muon::CscPrepData_p1
Definition: CscPrepData_p1.h:19
Muon::CscTimeStatus
CscTimeStatus
Enum to represent the cluster time measurement status - see the specific enum values for more details...
Definition: CscTimeStatus.h:24
Identifier
Definition: IdentifierFieldParser.cxx:14