ATLAS Offline Software
Loading...
Searching...
No Matches
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
40class LArRawChannel final{
41
42public:
43
47 LArRawChannel(const LArRawChannel&) = default;
52 ~LArRawChannel() = default;
53
54
64 int energy,
65 int time,
66 uint16_t quality,
67 uint16_t provenance,
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
92
93private:
94
102
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 {
113 uint16_t m_qualProv[2];
114 };
115#endif
116
119
120};
121
122
124
125inline
127 :
128 m_channelID(0),
129 m_energy(0),
130 m_time(0),
131 m_quality(0),
133{ }
134
135inline
137 int energy,
138 int time,
139 uint16_t quality,
140 uint16_t provenance,
142 :
143 m_channelID(chan_id),
145 m_time(time),
146 m_gain(gain)
147{ m_qualProv[0] = quality;
148 // cppcheck-suppress objectIndex
150}
151
152inline
155
156inline
159
160inline
161const HWIdentifier &
163
164inline
165int
167
168inline
169int
170LArRawChannel::time() const { return m_time; }
171
172inline
173uint16_t
174LArRawChannel::quality() const { return m_qualProv[0]; }
175
176inline
177uint16_t
179{
180 // cppcheck-suppress objectIndex
181 return m_qualProv[1];
182}
183
184inline
186LArRawChannel::gain() const { return m_gain;}
187
188#endif
189
190
uint16_t provenance() const
HWIdentifier identify() const
LArRawChannel(LArRawChannel &&)=default
LArRawChannel & operator=(const LArRawChannel &)=default
const HWIdentifier & hardwareID() const
CaloGain::CaloGain m_gain
gain information
int m_energy
energy in MeV
CaloGain::CaloGain gain() const
int time() const
LArRawChannel(const LArRawChannel &)=default
Default copy/move ctor/assignment.
uint16_t quality() const
LArRawChannel()
default constructor for persistenty
int m_time
time in ps
uint16_t m_qualProv[2]
HWIdentifier channelID() const
LArRawChannel & operator=(LArRawChannel &&)=default
int energy() const
HWIdentifier m_channelID
online identifier
~LArRawChannel()=default
destructor