ATLAS Offline Software
Loading...
Searching...
No Matches
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
13class MsgStream;
14
20{
21
22 private:
23
24 // TDC Id in the CSM (TDC online Id)
25 uint16_t m_tdcId;
26 // Channel number
27 uint16_t m_channelId;
28
29 // Leading edge boolean flag
31
32 // Decoded time of the first leading edge
33 uint16_t m_coarse;
34 uint16_t m_fine;
35 // Decoded width in case of a combined measurement
36 uint16_t m_width;
37
38 // Masked channel flag
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
51 MdtAmtHit(uint16_t tdcId, uint16_t channelId);
52
53 // Full constructor with masked flag
54 MdtAmtHit(uint16_t tdcId, uint16_t channelId, bool isMasked);
55
56 // set data members
57 void setValues(uint16_t coarse, uint16_t fine, uint16_t width);
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
85MsgStream& operator << ( MsgStream& sl, const MdtAmtHit& coll);
86
88std::ostream& operator << ( std::ostream& sl, const MdtAmtHit& coll);
89
90
91#endif // MUONRDO_MDTAMTHIT_H
92
93
MsgStream & operator<<(MsgStream &sl, const MdtAmtHit &coll)
Overload of << operator for MsgStream for debug output.
Definition MdtAmtHit.cxx:45
MDT RDO's : data from a single channel of an AMT Atlas Muon TDC.
Definition MdtAmtHit.h:20
bool m_isMasked
Definition MdtAmtHit.h:39
std::vector< uint32_t > m_dataWords
Definition MdtAmtHit.h:43
void setLeading(const bool leading)
Definition MdtAmtHit.h:63
void setWidth(const uint16_t width)
Definition MdtAmtHit.h:61
uint16_t fine() const
Definition MdtAmtHit.h:73
uint16_t width() const
Definition MdtAmtHit.h:74
uint16_t m_fine
Definition MdtAmtHit.h:34
void addData(uint32_t dataWord)
Definition MdtAmtHit.cxx:40
uint16_t tdcId() const
Definition MdtAmtHit.h:70
bool isMasked() const
Definition MdtAmtHit.h:76
uint16_t m_coarse
Definition MdtAmtHit.h:33
const std::vector< uint32_t > * dataWords() const
Definition MdtAmtHit.h:80
uint16_t m_tdcId
Definition MdtAmtHit.h:25
void setTdcCounts(const uint16_t coarse, const uint16_t fine)
Definition MdtAmtHit.cxx:34
bool m_leading
Definition MdtAmtHit.h:30
bool leading() const
Definition MdtAmtHit.h:75
void setValues(uint16_t coarse, uint16_t fine, uint16_t width)
Definition MdtAmtHit.cxx:26
uint16_t channelId() const
Definition MdtAmtHit.h:71
uint16_t m_width
Definition MdtAmtHit.h:36
uint16_t m_channelId
Definition MdtAmtHit.h:27
uint16_t coarse() const
Definition MdtAmtHit.h:72