ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
TestBeam
TBEvent
TBEvent
TBBPCRaw.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef TBEVENT_TBBPCRAW_H
6
#define TBEVENT_TBBPCRAW_H
19
20
#include "
TBEvent/TBBeamDetector.h
"
21
22
#include "
TBEvent/TBTDCRawCont.h
"
23
#include "
TBEvent/TBADCRawCont.h
"
24
25
#include "AthLinks/ElementLink.h"
26
27
#include <string>
28
#include <string_view>
29
#include <vector>
30
31
32
33
class
TBBPCRaw
:
public
TBBeamDetector
34
{
35
public
:
36
37
typedef
TBTDCRaw::signal_type
tdc_signal_type
;
38
typedef
std::vector< ElementLink<TBTDCRawCont> >
tdc_store_type
;
39
typedef
tdc_store_type::const_iterator
tdc_store_iterator
;
40
41
typedef
TBADCRaw::signal_type
adc_signal_type
;
42
typedef
std::vector< ElementLink<TBADCRawCont> >
adc_store_type
;
43
typedef
adc_store_type::const_iterator
adc_store_iterator
;
44
45
enum
SignalSource
{
tdcLeft
= 0,
46
tdcRight
= 1,
47
tdcUp
= 2,
48
tdcDown
= 3,
49
adcHorizontal
= 4,
50
adcVertical
= 5,
51
unknown
= 6 };
52
54
// Constructors and Destructor //
56
57
TBBPCRaw
();
58
60
61
TBBPCRaw
(std::string_view thisBPCName) :
TBBeamDetector
(thisBPCName)
62
{}
63
64
TBBPCRaw
(std::string_view thisBPCName,
65
const
TBTDCRawCont
* theTDCCont,
66
const
std::vector<const TBTDCRaw*>& theTDCs,
67
const
TBADCRawCont
* theADCCont,
68
const
std::vector<const TBADCRaw*>& theADCs);
69
70
~TBBPCRaw
();
71
73
// Data Access //
75
void
setSignals
(
const
TBTDCRawCont
* theTDCCont,
76
const
std::vector<const TBTDCRaw*>& theTDCs,
77
const
TBADCRawCont
* theADCCont,
78
const
std::vector<const TBADCRaw*>& theADCs);
79
80
tdc_signal_type
getTDCLeft
()
const
;
81
tdc_signal_type
getTDCRight
()
const
;
82
tdc_signal_type
getTDCUp
()
const
;
83
tdc_signal_type
getTDCDown
()
const
;
84
tdc_signal_type
getTDCSignal
(
SignalSource
theSource)
const
;
85
86
adc_signal_type
getADCHorizontal
()
const
;
87
adc_signal_type
getADCVertical
()
const
;
88
adc_signal_type
getADCSignal
(
SignalSource
theSource)
const
;
89
90
// access overflow
91
virtual
bool
isOverflow
()
const
;
92
virtual
bool
isOverflow
(
SignalSource
theSource)
const
;
93
94
// iterator on time measurements
95
tdc_store_iterator
tdc_begin
()
const
;
96
tdc_store_iterator
tdc_end
()
const
;
97
SignalSource
getSignalSource
(
tdc_store_iterator
& theTDCIterator)
const
;
98
99
// iterator on amplitude mesaurement
100
adc_store_iterator
adc_begin
()
const
;
101
adc_store_iterator
adc_end
()
const
;
102
SignalSource
getSignalSource
(
adc_store_iterator
& theADCIterator)
const
;
103
104
private
:
105
107
// Private Data //
109
110
tdc_store_type
m_tdcSignals
;
111
adc_store_type
m_adcSignals
;
112
114
// Private Functions //
116
117
/* template<typename T> */
118
/* size_t findIndex(const T& theStore,T::const_iterator& theIterator) */
119
/* { */
120
/* T::const_iterator firstInStore = theStore.begin(); */
121
/* T::const_iterator lastInStore = theStore.end(); */
122
/* size_t theIndex = 0; */
123
/* while ( firstInStore != theIterator && firstInStore != lastInStore ) */
124
/* { */
125
/* theIndex++; */
126
/* firstInStore++; */
127
/* } */
128
/* if ( firstInStore == lastInStore ) theIndex = size_t(-1); */
129
/* return theIndex; */
130
/* } */
131
132
133
size_t
findIndex
(
const
tdc_store_type
& theStore,
tdc_store_iterator
& theIterator)
const
134
{
135
tdc_store_type::const_iterator firstInStore = theStore.begin();
136
tdc_store_type::const_iterator lastInStore = theStore.end();
137
size_t
theIndex = 0;
138
while
( firstInStore != theIterator && firstInStore != lastInStore )
139
{
140
++theIndex;
141
++firstInStore;
142
}
143
if
( firstInStore == lastInStore ) theIndex = size_t(-1);
144
return
theIndex;
145
}
146
size_t
findIndex
(
const
adc_store_type
& theStore,adc_store_type::const_iterator& theIterator)
const
147
{
148
adc_store_type::const_iterator firstInStore = theStore.begin();
149
adc_store_type::const_iterator lastInStore = theStore.end();
150
size_t
theIndex = 0;
151
while
( firstInStore != theIterator && firstInStore != lastInStore )
152
{
153
++theIndex;
154
++firstInStore;
155
}
156
if
( firstInStore == lastInStore ) theIndex = size_t(-1);
157
return
theIndex;
158
}
159
160
};
161
163
// Inline Functions //
165
166
// global overflow
167
inline
bool
TBBPCRaw::isOverflow
()
const
168
{
169
return
m_overflow
;
170
}
171
172
// specific signals
173
inline
TBBPCRaw::tdc_signal_type
TBBPCRaw::getTDCLeft
()
const
174
{
175
return
this->
getTDCSignal
(
TBBPCRaw::tdcLeft
);
176
}
177
178
inline
TBBPCRaw::tdc_signal_type
TBBPCRaw::getTDCRight
()
const
179
{
180
return
this->
getTDCSignal
(
TBBPCRaw::tdcRight
);
181
}
182
183
inline
TBBPCRaw::tdc_signal_type
TBBPCRaw::getTDCUp
()
const
184
{
185
return
this->
getTDCSignal
(
TBBPCRaw::tdcUp
);
186
}
187
188
inline
TBBPCRaw::tdc_signal_type
TBBPCRaw::getTDCDown
()
const
189
{
190
return
this->
getTDCSignal
(
TBBPCRaw::tdcDown
);
191
}
192
193
inline
TBBPCRaw::tdc_signal_type
TBBPCRaw::getADCHorizontal
()
const
194
{
195
return
this->
getADCSignal
(
TBBPCRaw::adcHorizontal
);
196
}
197
198
inline
TBBPCRaw::tdc_signal_type
TBBPCRaw::getADCVertical
()
const
199
{
200
return
this->
getADCSignal
(
TBBPCRaw::adcVertical
);
201
}
202
203
// iterators
204
inline
TBBPCRaw::tdc_store_iterator
TBBPCRaw::tdc_begin
()
const
205
{
206
return
m_tdcSignals
.begin();
207
}
208
inline
TBBPCRaw::tdc_store_iterator
TBBPCRaw::tdc_end
()
const
209
{
210
return
m_tdcSignals
.end();
211
}
212
inline
TBBPCRaw::adc_store_iterator
TBBPCRaw::adc_begin
()
const
213
{
214
return
m_adcSignals
.begin();
215
}
216
inline
TBBPCRaw::adc_store_iterator
TBBPCRaw::adc_end
()
const
217
{
218
return
m_adcSignals
.end();
219
}
220
#endif
TBADCRawCont.h
TBBeamDetector.h
TBTDCRawCont.h
TBADCRawCont
"TBEvent/TBADCRawCont.h"
Definition
TBADCRawCont.h:20
TBADCRaw::signal_type
unsigned int signal_type
Definition
TBADCRaw.h:24
TBBPCRaw::adc_begin
adc_store_iterator adc_begin() const
Definition
TBBPCRaw.h:212
TBBPCRaw::SignalSource
SignalSource
Definition
TBBPCRaw.h:45
TBBPCRaw::tdcLeft
@ tdcLeft
Definition
TBBPCRaw.h:45
TBBPCRaw::unknown
@ unknown
Definition
TBBPCRaw.h:51
TBBPCRaw::tdcDown
@ tdcDown
Definition
TBBPCRaw.h:48
TBBPCRaw::adcVertical
@ adcVertical
Definition
TBBPCRaw.h:50
TBBPCRaw::tdcUp
@ tdcUp
Definition
TBBPCRaw.h:47
TBBPCRaw::tdcRight
@ tdcRight
Definition
TBBPCRaw.h:46
TBBPCRaw::adcHorizontal
@ adcHorizontal
Definition
TBBPCRaw.h:49
TBBPCRaw::getSignalSource
SignalSource getSignalSource(tdc_store_iterator &theTDCIterator) const
Definition
TBBPCRaw.cxx:144
TBBPCRaw::findIndex
size_t findIndex(const adc_store_type &theStore, adc_store_type::const_iterator &theIterator) const
Definition
TBBPCRaw.h:146
TBBPCRaw::getTDCSignal
tdc_signal_type getTDCSignal(SignalSource theSource) const
Definition
TBBPCRaw.cxx:100
TBBPCRaw::getADCSignal
adc_signal_type getADCSignal(SignalSource theSource) const
Definition
TBBPCRaw.cxx:123
TBBPCRaw::findIndex
size_t findIndex(const tdc_store_type &theStore, tdc_store_iterator &theIterator) const
Definition
TBBPCRaw.h:133
TBBPCRaw::getTDCUp
tdc_signal_type getTDCUp() const
Definition
TBBPCRaw.h:183
TBBPCRaw::m_adcSignals
adc_store_type m_adcSignals
Definition
TBBPCRaw.h:111
TBBPCRaw::isOverflow
virtual bool isOverflow() const
Definition
TBBPCRaw.h:167
TBBPCRaw::~TBBPCRaw
~TBBPCRaw()
Definition
TBBPCRaw.cxx:60
TBBPCRaw::adc_store_type
std::vector< ElementLink< TBADCRawCont > > adc_store_type
Definition
TBBPCRaw.h:42
TBBPCRaw::adc_end
adc_store_iterator adc_end() const
Definition
TBBPCRaw.h:216
TBBPCRaw::getTDCDown
tdc_signal_type getTDCDown() const
Definition
TBBPCRaw.h:188
TBBPCRaw::getTDCRight
tdc_signal_type getTDCRight() const
Definition
TBBPCRaw.h:178
TBBPCRaw::TBBPCRaw
TBBPCRaw()
Definition
TBBPCRaw.cxx:22
TBBPCRaw::tdc_end
tdc_store_iterator tdc_end() const
Definition
TBBPCRaw.h:208
TBBPCRaw::tdc_store_iterator
tdc_store_type::const_iterator tdc_store_iterator
Definition
TBBPCRaw.h:39
TBBPCRaw::TBBPCRaw
TBBPCRaw(std::string_view thisBPCName)
standard constructor
Definition
TBBPCRaw.h:61
TBBPCRaw::m_tdcSignals
tdc_store_type m_tdcSignals
Definition
TBBPCRaw.h:110
TBBPCRaw::tdc_store_type
std::vector< ElementLink< TBTDCRawCont > > tdc_store_type
Definition
TBBPCRaw.h:38
TBBPCRaw::adc_signal_type
TBADCRaw::signal_type adc_signal_type
Definition
TBBPCRaw.h:41
TBBPCRaw::getTDCLeft
tdc_signal_type getTDCLeft() const
Definition
TBBPCRaw.h:173
TBBPCRaw::tdc_signal_type
TBTDCRaw::signal_type tdc_signal_type
Definition
TBBPCRaw.h:37
TBBPCRaw::tdc_begin
tdc_store_iterator tdc_begin() const
Definition
TBBPCRaw.h:204
TBBPCRaw::getADCHorizontal
adc_signal_type getADCHorizontal() const
Definition
TBBPCRaw.h:193
TBBPCRaw::setSignals
void setSignals(const TBTDCRawCont *theTDCCont, const std::vector< const TBTDCRaw * > &theTDCs, const TBADCRawCont *theADCCont, const std::vector< const TBADCRaw * > &theADCs)
Definition
TBBPCRaw.cxx:35
TBBPCRaw::adc_store_iterator
adc_store_type::const_iterator adc_store_iterator
Definition
TBBPCRaw.h:43
TBBPCRaw::getADCVertical
adc_signal_type getADCVertical() const
Definition
TBBPCRaw.h:198
TBBeamDetector::m_overflow
bool m_overflow
Detector Name.
Definition
TBBeamDetector.h:82
TBBeamDetector::TBBeamDetector
TBBeamDetector()
Definition
TBBeamDetector.h:24
TBTDCRawCont
"TBEvent/TBTDCRawCont.h"
Definition
TBTDCRawCont.h:21
TBTDCRaw::signal_type
unsigned int signal_type
Definition
TBTDCRaw.h:24
Generated on
for ATLAS Offline Software by
1.17.0