ATLAS Offline Software
MdtAmtHit.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 #include "MuonRDO/MdtAmtHit.h"
6 #include "GaudiKernel/MsgStream.h"
7 
9  m_tdcId(0), m_channelId(0), m_leading(false), m_coarse(0),
10  m_fine(0), m_width(0), m_isMasked(false)
11 {
12 }
13 
15  m_tdcId(tdcId), m_channelId(channelId), m_leading(false),
16  m_coarse(0), m_fine(0), m_width(0), m_isMasked(false)
17 {
18 }
19 
21  m_tdcId(tdcId), m_channelId(channelId), m_leading(false),
22  m_coarse(0), m_fine(0), m_width(0), m_isMasked(isMasked)
23 {
24 }
25 
27 {
28  m_leading = true;
29  m_coarse = coarse;
30  m_fine = fine;
31  m_width = width;
32 }
33 
34 void MdtAmtHit::setTdcCounts(const uint16_t coarse, const uint16_t fine)
35 {
36  m_coarse = coarse;
37  m_fine = fine;
38 }
39 
41 {
42  m_dataWords.push_back(dataWord);
43 }
44 
45 MsgStream& operator << ( MsgStream& sl, const MdtAmtHit& data)
46 {
47  sl << "MdtAmtHit ("<< &data <<") "
48  << "tdcId=" << data.tdcId()
49  << ", channelId=" << data.channelId()
50  << ", coarse=" << data.coarse()
51  << ", fine=" << data.fine()
52  << ", width=" << data.width()
53  << ", leading=" << data.leading()
54  << ", isMasked=" << data.isMasked()
55  << ", dataWords=[";
56  if (nullptr!=data.dataWords()) {
57  for( unsigned i=0; i<data.dataWords()->size(); i++ ) {
58  sl << (*data.dataWords() )[i] << ",";
59  }
60  }else{
61  sl << "No datawords";
62  }
63  sl << "]"<<std::endl;
64  return sl;
65 }
66 
67 
68 std::ostream& operator << ( std::ostream& sl, const MdtAmtHit& data)
69 {
70  sl << "MdtAmtHit "
71  << "tdcId=" << data.tdcId()
72  << ", channelId=" << data.channelId()
73  << ", coarse=" << data.coarse()
74  << ", fine=" << data.fine()
75  << ", width=" << data.width()
76  << ", leading=" << data.leading()
77  << ", isMasked=" << data.isMasked()
78  << ", dataWords=[";
79  if (nullptr!=data.dataWords()) {
80  for( unsigned i=0; i<data.dataWords()->size(); i++ ) {
81  sl << (*data.dataWords() )[i] << ",";
82  }
83  }else{
84  sl << "No datawords";
85  }
86  sl << "]"<<std::endl;
87  return sl;
88 }
MdtAmtHit::setValues
void setValues(uint16_t coarse, uint16_t fine, uint16_t width)
Definition: MdtAmtHit.cxx:26
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
MdtAmtHit::setTdcCounts
void setTdcCounts(const uint16_t coarse, const uint16_t fine)
Definition: MdtAmtHit.cxx:34
MdtAmtHit
MDT RDO's : data from a single channel of an AMT Atlas Muon TDC.
Definition: MdtAmtHit.h:20
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
MdtAmtHit::m_dataWords
std::vector< uint32_t > m_dataWords
Definition: MdtAmtHit.h:43
MdtAmtHit::width
uint16_t width() const
Definition: MdtAmtHit.h:74
MdtAmtHit::m_coarse
uint16_t m_coarse
Definition: MdtAmtHit.h:33
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
lumiFormat.i
int i
Definition: lumiFormat.py:92
MdtAmtHit::fine
uint16_t fine() const
Definition: MdtAmtHit.h:73
MdtAmtHit::addData
void addData(uint32_t dataWord)
Definition: MdtAmtHit.cxx:40
CaloCondBlobAlgs_fillNoiseFromASCII.channelId
channelId
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:122
operator<<
MsgStream & operator<<(MsgStream &sl, const MdtAmtHit &data)
Overload of << operator for MsgStream for debug output.
Definition: MdtAmtHit.cxx:45
MdtAmtHit::MdtAmtHit
MdtAmtHit()
Definition: MdtAmtHit.cxx:8
MdtAmtHit.h
MdtAmtHit::m_width
uint16_t m_width
Definition: MdtAmtHit.h:36
Base_Fragment.width
width
Definition: Sherpa_i/share/common/Base_Fragment.py:59
MdtAmtHit::m_fine
uint16_t m_fine
Definition: MdtAmtHit.h:34
MdtAmtHit::m_leading
bool m_leading
Definition: MdtAmtHit.h:30
MdtAmtHit::coarse
uint16_t coarse() const
Definition: MdtAmtHit.h:72