ATLAS Offline Software
MdtAmtHit.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MUONRDO_MDTAMTHIT_H
6 #define MUONRDO_MDTAMTHIT_H
7 
8 #include<stdint.h>
9 #include<vector>
10 #include <iostream>
11 
12 
13 class MsgStream;
14 
19 class MdtAmtHit
20 {
21 
22  private:
23 
24  // TDC Id in the CSM (TDC online Id)
26  // Channel number
28 
29  // Leading edge boolean flag
30  bool m_leading;
31 
32  // Decoded time of the first leading edge
35  // Decoded width in case of a combined measurement
37 
38  // Masked channel flag
39  bool m_isMasked;
40 
41  // All the datawords (no headers and footers) coming from this channel
42  // to be decoded on demand using MdtReadOut methods
43  std::vector<uint32_t> m_dataWords;
44 
45  public:
46 
47  // Default constructor
48  MdtAmtHit();
49 
50  // Full constructor
52 
53  // Full constructor with masked flag
55 
56  // set data members
58 
59  void setTdcCounts(const uint16_t coarse, const uint16_t fine);
60 
61  void setWidth(const uint16_t width) {m_width = width;};
62 
63  void setLeading(const bool leading) {m_leading = leading;};
64 
65  // Add a data word to the vector
66  void addData(uint32_t dataWord);
67 
68  // Retrieve the decoded data from the first leading edge
69  // combined or single
70  uint16_t tdcId() const {return m_tdcId;}
71  uint16_t channelId() const {return m_channelId;}
72  uint16_t coarse() const {return m_coarse;}
73  uint16_t fine() const {return m_fine;}
74  uint16_t width() const {return m_width;}
75  bool leading() const {return m_leading;}
76  bool isMasked() const {return m_isMasked;}
77 
78  // Vector containing all 32 bits data words (undecoded)
79  // FIXME: Should return by reference!
80  const std::vector<uint32_t>* dataWords() const {return &m_dataWords;}
81 
82 };
83 
85 MsgStream& operator << ( MsgStream& sl, const MdtAmtHit& coll);
86 
88 std::ostream& operator << ( std::ostream& sl, const MdtAmtHit& coll);
89 
90 
91 #endif // MUONRDO_MDTAMTHIT_H
92 
93 
MdtAmtHit::setValues
void setValues(uint16_t coarse, uint16_t fine, uint16_t width)
Definition: MdtAmtHit.cxx:26
MdtAmtHit::isMasked
bool isMasked() const
Definition: MdtAmtHit.h:76
MdtAmtHit::setTdcCounts
void setTdcCounts(const uint16_t coarse, const uint16_t fine)
Definition: MdtAmtHit.cxx:34
operator<<
MsgStream & operator<<(MsgStream &sl, const MdtAmtHit &coll)
Overload of << operator for MsgStream for debug output.
Definition: MdtAmtHit.cxx:45
MdtAmtHit
MDT RDO's : data from a single channel of an AMT Atlas Muon TDC.
Definition: MdtAmtHit.h:20
MdtAmtHit::m_isMasked
bool m_isMasked
Definition: MdtAmtHit.h:39
MdtAmtHit::m_tdcId
uint16_t m_tdcId
Definition: MdtAmtHit.h:25
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
MdtAmtHit::tdcId
uint16_t tdcId() const
Definition: MdtAmtHit.h:70
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
MdtAmtHit::leading
bool leading() const
Definition: MdtAmtHit.h:75
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
MdtAmtHit::dataWords
const std::vector< uint32_t > * dataWords() const
Definition: MdtAmtHit.h:80
MdtAmtHit::fine
uint16_t fine() const
Definition: MdtAmtHit.h:73
MdtAmtHit::addData
void addData(uint32_t dataWord)
Definition: MdtAmtHit.cxx:40
MdtAmtHit::MdtAmtHit
MdtAmtHit()
Definition: MdtAmtHit.cxx:8
MdtAmtHit::m_width
uint16_t m_width
Definition: MdtAmtHit.h:36
MdtAmtHit::m_channelId
uint16_t m_channelId
Definition: MdtAmtHit.h:27
MdtAmtHit::setWidth
void setWidth(const uint16_t width)
Definition: MdtAmtHit.h:61
MdtAmtHit::m_fine
uint16_t m_fine
Definition: MdtAmtHit.h:34
MdtAmtHit::m_leading
bool m_leading
Definition: MdtAmtHit.h:30
MdtAmtHit::setLeading
void setLeading(const bool leading)
Definition: MdtAmtHit.h:63
MdtAmtHit::channelId
uint16_t channelId() const
Definition: MdtAmtHit.h:71
MdtAmtHit::coarse
uint16_t coarse() const
Definition: MdtAmtHit.h:72