ATLAS Offline Software
CscRawData.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MUONBYTESTREAM_CSCRAWDATA_H
6 #define MUONBYTESTREAM_CSCRAWDATA_H
7 
8 #include <inttypes.h>
9 #include <vector>
10 #include <iostream>
11 
12 class MsgStream;
13 
21 class CscRawData final {
22 
23  private:
24 
26 
28  std::vector<uint16_t> m_amps;
29 
32 
35 
38 
41 
44 
47 
50 
51  public:
52 
54  CscRawData () : m_address(0), m_id(0), m_time(0), m_rpuID(0),
55  m_width(0), m_isTimeComputed(false), m_hashId(0) {}
56 
58  CscRawData (const std::vector<uint16_t>& p_amp, uint32_t address, uint16_t id) :
59  m_amps (p_amp),
61  m_id(id),
62  m_time (0x0),
63  m_rpuID (0x0),
64  m_width (0x1),
65  m_isTimeComputed (false),
66  m_hashId (0x0)
67  {
68  }
69 
71  CscRawData (const std::vector<uint16_t>& p_amp, uint32_t address,
72  uint16_t id, uint16_t rpuID) :
73  m_amps (p_amp),
75  m_id(id),
76  m_time (0x0),
77  m_rpuID(rpuID),
78  m_width (0x1),
79  m_isTimeComputed (false),
80  m_hashId (0x0)
81  {
82  }
83 
85  CscRawData (const std::vector<uint16_t>& p_amp, uint32_t address, uint16_t id,
87  m_amps (p_amp),
89  m_id(id),
90  m_time (0x0),
91  m_rpuID(rpuID),
92  m_width(width),
93  m_isTimeComputed (false),
94  m_hashId (0x0)
95  {
96  }
97 
99  CscRawData (const std::vector<uint16_t>& p_amp, uint32_t address, uint16_t id,
101  m_amps (p_amp),
103  m_id(id),
104  m_time(time),
105  m_rpuID(rpuID),
106  m_width(width),
107  m_isTimeComputed (true),
109  {
110  }
111  CscRawData(const CscRawData&) = default;
112  CscRawData(CscRawData&&) = default;
113  CscRawData& operator=(const CscRawData&) = default;
116 
123 
125  uint16_t rpuID() const { return m_rpuID; }
126  uint16_t identify() const { return m_id; }
127  uint16_t time() const { return m_time; }
128  uint16_t width() const { return m_width; }
129  bool isTimeComputed() const { return m_isTimeComputed; }
130  const std::vector<uint16_t>& samples() const { return m_amps; }
131  uint32_t address() const { return m_address; }
132  uint32_t hashId() const { return m_hashId; }
133 
135  bool samples (const unsigned int i, const unsigned int numSample, std::vector<uint16_t>& adc) const ;
136 };
137 
139 MsgStream& operator << ( MsgStream& sl, const CscRawData& coll);
140 
142 std::ostream& operator << ( std::ostream& sl, const CscRawData& coll);
143 
144 
145 #endif
146 
147 
148 
149 
150 
151 
152 
CscRawData::operator=
CscRawData & operator=(CscRawData &&)=default
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
CscRawData::rpuID
uint16_t rpuID() const
data access methods
Definition: CscRawData.h:125
CscRawData::address
uint32_t address() const
Definition: CscRawData.h:131
CscRawData::operator=
CscRawData & operator=(const CscRawData &)=default
CscRawData::CscRawData
CscRawData(const CscRawData &)=default
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
CscRawData::CscRawData
CscRawData(const std::vector< uint16_t > &p_amp, uint32_t address, uint16_t id)
constructor for a single strip
Definition: CscRawData.h:58
CscRawData::setWidth
void setWidth(uint16_t width)
Definition: CscRawData.h:120
CscRawData::isTimeComputed
bool isTimeComputed() const
Definition: CscRawData.h:129
CscRawData::m_address
uint32_t m_address
online identifier of the first strip in the ROD cluster
Definition: CscRawData.h:31
CscRawData::CscRawData
CscRawData(const std::vector< uint16_t > &p_amp, uint32_t address, uint16_t id, uint16_t time, uint16_t rpuID, uint16_t width, uint32_t hashId)
full constructor for cluster with timing information
Definition: CscRawData.h:99
CscRawData::CscRawData
CscRawData()
default constructor
Definition: CscRawData.h:54
CscRawData::m_id
uint16_t m_id
online identifier of the collection in which this strip is
Definition: CscRawData.h:34
operator<<
MsgStream & operator<<(MsgStream &sl, const CscRawData &coll)
Overload of << operator for MsgStream for debug output.
Definition: CscRawData.cxx:23
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
lumiFormat.i
int i
Definition: lumiFormat.py:85
CscRawData::width
uint16_t width() const
Definition: CscRawData.h:128
CscRawData::CscRawData
CscRawData(CscRawData &&)=default
CscRawData::identify
uint16_t identify() const
Definition: CscRawData.h:126
CscRawData::CscRawData
CscRawData(const std::vector< uint16_t > &p_amp, uint32_t address, uint16_t id, uint16_t rpuID)
single strip constructor with SPU information
Definition: CscRawData.h:71
CscRawData::setHashID
void setHashID(uint32_t hash)
Definition: CscRawData.h:121
CscRawData::m_isTimeComputed
bool m_isTimeComputed
failed to compute the time in the ROD or not - if failure m_time = 0
Definition: CscRawData.h:46
CscRawData::hashId
uint32_t hashId() const
Definition: CscRawData.h:132
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:220
CscRawData::samples
const std::vector< uint16_t > & samples() const
Definition: CscRawData.h:130
CscRawData::m_width
uint16_t m_width
number of consecutive strips forming the on-line cluster
Definition: CscRawData.h:43
CscRawData::set_isTimeComputed
void set_isTimeComputed()
Definition: CscRawData.h:122
CscRawData::m_time
uint16_t m_time
online peaking time of the first strip: this is 0 if failed to compute time in the ROD
Definition: CscRawData.h:37
CscRawData::time
uint16_t time() const
Definition: CscRawData.h:127
CscRawData::m_rpuID
uint16_t m_rpuID
SPU -Sparsifier Processing Unit - identifier in which this strip is.
Definition: CscRawData.h:40
CscRawData
Class to hold the electronic output for a single CSC readout channel: n sampling ADC data + the addre...
Definition: CscRawData.h:21
CaloCondBlobAlgs_fillNoiseFromASCII.hash
dictionary hash
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:109
ReadFloatFromCool.adc
adc
Definition: ReadFloatFromCool.py:48
CscRawData::m_amps
std::vector< uint16_t > m_amps
data members
Definition: CscRawData.h:28
CscRawData::setRpuID
void setRpuID(uint16_t rpuID)
construction methods
Definition: CscRawData.h:118
CscRawData::setTime
void setTime(uint16_t time)
Definition: CscRawData.h:119
CscRawData::~CscRawData
~CscRawData()
Definition: CscRawData.h:115
CscRawData::m_hashId
uint32_t m_hashId
offline hash identifier of the first strip in the online cluster
Definition: CscRawData.h:49
CscRawData::CscRawData
CscRawData(const std::vector< uint16_t > &p_amp, uint32_t address, uint16_t id, uint16_t rpuID, uint16_t width)
cluster of strip constructor with cluster width and SPU identifier
Definition: CscRawData.h:85