ATLAS Offline Software
LArRawChannel.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef LArRawChannel_H
6 #define LArRawChannel_H
7 
10 #include <stdint.h>
11 
12 // Gaudi Class ID
13 
14 // static const CLID CLID_LArRawChannel = 2722 ;
15 
40 class LArRawChannel final{
41 
42 public:
43 
45  LArRawChannel();
47  LArRawChannel(const LArRawChannel&) = default;
52  ~LArRawChannel() = default;
53 
54 
63  LArRawChannel( HWIdentifier chan_id,
64  int energy,
65  int time,
69 
70 
72  HWIdentifier identify() const;
73 
75  HWIdentifier channelID() const;
76  const HWIdentifier& hardwareID() const;
77 
79  int energy() const;
80 
82  int time() const;
83 
85  uint16_t quality() const;
86 
88  uint16_t provenance() const;
89 
91  CaloGain::CaloGain gain() const;
92 
93 private:
94 
98  int m_energy;
100  int m_time;
103 // Reflex doesn't handle unions completely correctly.
104 // If you have a union as a data member, it will print a warning
105 // at runtime. So, hide the union from reflex. (Only m_quality is used
106 // in inlined code.)
107 #ifdef __REFLEX__
108  int m_quality ;
109 # define m_qualProv ((uint16_t*)&m_quality)
110 #else
111  union {
112  int m_quality ;
114  };
115 #endif
116 
119 
120 };
121 
122 
124 
125 inline
127  :
128  m_channelID(0),
129  m_energy(0),
130  m_time(0),
131  m_quality(0),
132  m_gain(CaloGain::CaloGain(4))
133 { }
134 
135 inline
137  int energy,
138  int time,
139  uint16_t quality,
140  uint16_t provenance,
142  :
143  m_channelID(chan_id),
144  m_energy(energy),
145  m_time(time),
146  m_gain(gain)
147 { m_qualProv[0] = quality;
148  // cppcheck-suppress objectIndex
149  m_qualProv[1] = provenance;
150 }
151 
152 inline
155 
156 inline
159 
160 inline
161 const HWIdentifier &
163 
164 inline
165 int
166 LArRawChannel::energy() const { return m_energy; }
167 
168 inline
169 int
170 LArRawChannel::time() const { return m_time; }
171 
172 inline
173 uint16_t
174 LArRawChannel::quality() const { return m_qualProv[0]; }
175 
176 inline
177 uint16_t
179 {
180  // cppcheck-suppress objectIndex
181  return m_qualProv[1];
182 }
183 
184 inline
186 LArRawChannel::gain() const { return m_gain;}
187 
188 #endif
189 
190 
LArRawChannel::LArRawChannel
LArRawChannel(const LArRawChannel &)=default
Default copy/move ctor/assignment.
LArRawChannel::m_qualProv
uint16_t m_qualProv[2]
Definition: LArRawChannel.h:113
LArRawChannel::LArRawChannel
LArRawChannel(LArRawChannel &&)=default
LArRawChannel::channelID
HWIdentifier channelID() const
Definition: LArRawChannel.h:158
LArRawChannel::m_time
int m_time
time in ps
Definition: LArRawChannel.h:100
LArRawChannel::operator=
LArRawChannel & operator=(LArRawChannel &&)=default
LArRawChannel::identify
HWIdentifier identify() const
Definition: LArRawChannel.h:154
CaloCondBlobAlgs_fillNoiseFromASCII.gain
gain
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:110
LArRawChannel::m_channelID
HWIdentifier m_channelID
online identifier
Definition: LArRawChannel.h:96
LArRawChannel::quality
uint16_t quality() const
Definition: LArRawChannel.h:174
HWIdentifier
Definition: HWIdentifier.h:13
CaloGain
Definition: CaloGain.h:10
LArRawChannel::m_quality
int m_quality
Definition: LArRawChannel.h:112
ParticleGun_FastCalo_ChargeFlip_Config.energy
energy
Definition: ParticleGun_FastCalo_ChargeFlip_Config.py:78
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
LArRawChannel
Liquid Argon ROD output object base class.
Definition: LArRawChannel.h:40
LArRawChannel::m_gain
CaloGain::CaloGain m_gain
gain information
Definition: LArRawChannel.h:118
LArRawChannel::~LArRawChannel
~LArRawChannel()=default
destructor
HWIdentifier.h
LArRawChannel::hardwareID
const HWIdentifier & hardwareID() const
Definition: LArRawChannel.h:162
CaloGain::CaloGain
CaloGain
Definition: CaloGain.h:11
LArRawChannel::LArRawChannel
LArRawChannel()
default constructor for persistenty
Definition: LArRawChannel.h:126
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
LArRawChannel::time
int time() const
Definition: LArRawChannel.h:170
LArRawChannel::energy
int energy() const
Definition: LArRawChannel.h:166
LArRawChannel::operator=
LArRawChannel & operator=(const LArRawChannel &)=default
LArRawChannel::gain
CaloGain::CaloGain gain() const
Definition: LArRawChannel.h:186
CaloGain.h
LArRawChannel::m_energy
int m_energy
energy in MeV
Definition: LArRawChannel.h:98
LArRawChannel::provenance
uint16_t provenance() const
Definition: LArRawChannel.h:178