ATLAS Offline Software
Loading...
Searching...
No Matches
TBBPCRaw Class Reference

raw data class for BPC measurement More...

#include <TBBPCRaw.h>

Inheritance diagram for TBBPCRaw:
Collaboration diagram for TBBPCRaw:

Public Types

enum  SignalSource {
  tdcLeft = 0 , tdcRight = 1 , tdcUp = 2 , tdcDown = 3 ,
  adcHorizontal = 4 , adcVertical = 5 , unknown = 6
}
typedef TBTDCRaw::signal_type tdc_signal_type
typedef std::vector< ElementLink< TBTDCRawCont > > tdc_store_type
typedef tdc_store_type::const_iterator tdc_store_iterator
typedef TBADCRaw::signal_type adc_signal_type
typedef std::vector< ElementLink< TBADCRawCont > > adc_store_type
typedef adc_store_type::const_iterator adc_store_iterator

Public Member Functions

 TBBPCRaw ()
 TBBPCRaw (std::string_view thisBPCName)
 standard constructor
 TBBPCRaw (std::string_view thisBPCName, const TBTDCRawCont *theTDCCont, const std::vector< const TBTDCRaw * > &theTDCs, const TBADCRawCont *theADCCont, const std::vector< const TBADCRaw * > &theADCs)
 ~TBBPCRaw ()
void setSignals (const TBTDCRawCont *theTDCCont, const std::vector< const TBTDCRaw * > &theTDCs, const TBADCRawCont *theADCCont, const std::vector< const TBADCRaw * > &theADCs)
tdc_signal_type getTDCLeft () const
tdc_signal_type getTDCRight () const
tdc_signal_type getTDCUp () const
tdc_signal_type getTDCDown () const
tdc_signal_type getTDCSignal (SignalSource theSource) const
adc_signal_type getADCHorizontal () const
adc_signal_type getADCVertical () const
adc_signal_type getADCSignal (SignalSource theSource) const
virtual bool isOverflow () const
virtual bool isOverflow (SignalSource theSource) const
tdc_store_iterator tdc_begin () const
tdc_store_iterator tdc_end () const
SignalSource getSignalSource (tdc_store_iterator &theTDCIterator) const
adc_store_iterator adc_begin () const
adc_store_iterator adc_end () const
SignalSource getSignalSource (adc_store_iterator &theADCIterator) const
virtual void setDetectorName (std::string_view tbBeamDetectorName)
virtual void setOverflow ()
virtual void setOverflow (bool overflow)
const std::string & getDetectorName () const
virtual void resetOverflow ()

Protected Attributes

bool m_overflow
 Detector Name.

Private Member Functions

size_t findIndex (const tdc_store_type &theStore, tdc_store_iterator &theIterator) const
size_t findIndex (const adc_store_type &theStore, adc_store_type::const_iterator &theIterator) const

Private Attributes

tdc_store_type m_tdcSignals
adc_store_type m_adcSignals
std::string m_tbDetectorName

Detailed Description

raw data class for BPC measurement

The TBBPCRaw class provides the object characteristics for the raw data from the BPCs, i.e. four time and two pulse height measurements.

Author
Peter Loch loch@.nosp@m.phys.nosp@m.ics.a.nosp@m.rizo.nosp@m.na.ed.nosp@m.u
Pierre-Antoine Delsart delsa.nosp@m.rt@l.nosp@m.ps.um.nosp@m.ontr.nosp@m.eal.c.nosp@m.a
Date
May 20, 2004 - first implementation of new design

Definition at line 33 of file TBBPCRaw.h.

Member Typedef Documentation

◆ adc_signal_type

Definition at line 41 of file TBBPCRaw.h.

◆ adc_store_iterator

typedef adc_store_type::const_iterator TBBPCRaw::adc_store_iterator

Definition at line 43 of file TBBPCRaw.h.

◆ adc_store_type

Definition at line 42 of file TBBPCRaw.h.

◆ tdc_signal_type

Definition at line 37 of file TBBPCRaw.h.

◆ tdc_store_iterator

typedef tdc_store_type::const_iterator TBBPCRaw::tdc_store_iterator

Definition at line 39 of file TBBPCRaw.h.

◆ tdc_store_type

Definition at line 38 of file TBBPCRaw.h.

Member Enumeration Documentation

◆ SignalSource

Enumerator
tdcLeft 
tdcRight 
tdcUp 
tdcDown 
adcHorizontal 
adcVertical 
unknown 

Definition at line 45 of file TBBPCRaw.h.

45 { tdcLeft = 0,
46 tdcRight = 1,
47 tdcUp = 2,
48 tdcDown = 3,
49 adcHorizontal = 4,
50 adcVertical = 5,
51 unknown = 6 };
@ tdcLeft
Definition TBBPCRaw.h:45
@ unknown
Definition TBBPCRaw.h:51
@ tdcDown
Definition TBBPCRaw.h:48
@ adcVertical
Definition TBBPCRaw.h:50
@ tdcRight
Definition TBBPCRaw.h:46
@ adcHorizontal
Definition TBBPCRaw.h:49

Constructor & Destructor Documentation

◆ TBBPCRaw() [1/3]

TBBPCRaw::TBBPCRaw ( )

Definition at line 22 of file TBBPCRaw.cxx.

23{ }

◆ TBBPCRaw() [2/3]

TBBPCRaw::TBBPCRaw ( std::string_view thisBPCName)
inline

standard constructor

Definition at line 61 of file TBBPCRaw.h.

61 : TBBeamDetector(thisBPCName)
62 {}

◆ TBBPCRaw() [3/3]

TBBPCRaw::TBBPCRaw ( std::string_view thisBPCName,
const TBTDCRawCont * theTDCCont,
const std::vector< const TBTDCRaw * > & theTDCs,
const TBADCRawCont * theADCCont,
const std::vector< const TBADCRaw * > & theADCs )

Definition at line 25 of file TBBPCRaw.cxx.

30 : TBBeamDetector(thisBPCName)
31{
32 setSignals(theTDCCont,theTDCs,theADCCont,theADCs);
33}
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()

TBBPCRaw::~TBBPCRaw ( )

Definition at line 60 of file TBBPCRaw.cxx.

61{ }

Member Function Documentation

◆ adc_begin()

TBBPCRaw::adc_store_iterator TBBPCRaw::adc_begin ( ) const
inline

Definition at line 212 of file TBBPCRaw.h.

213{
214 return m_adcSignals.begin();
215}
adc_store_type m_adcSignals
Definition TBBPCRaw.h:111

◆ adc_end()

TBBPCRaw::adc_store_iterator TBBPCRaw::adc_end ( ) const
inline

Definition at line 216 of file TBBPCRaw.h.

217{
218 return m_adcSignals.end();
219}

◆ findIndex() [1/2]

size_t TBBPCRaw::findIndex ( const adc_store_type & theStore,
adc_store_type::const_iterator & theIterator ) const
inlineprivate

Definition at line 146 of file TBBPCRaw.h.

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 }

◆ findIndex() [2/2]

size_t TBBPCRaw::findIndex ( const tdc_store_type & theStore,
tdc_store_iterator & theIterator ) const
inlineprivate

Definition at line 133 of file TBBPCRaw.h.

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 }

◆ getADCHorizontal()

TBBPCRaw::tdc_signal_type TBBPCRaw::getADCHorizontal ( ) const
inline

Definition at line 193 of file TBBPCRaw.h.

194{
196}
adc_signal_type getADCSignal(SignalSource theSource) const
Definition TBBPCRaw.cxx:123

◆ getADCSignal()

TBBPCRaw::adc_signal_type TBBPCRaw::getADCSignal ( TBBPCRaw::SignalSource theSource) const

Definition at line 123 of file TBBPCRaw.cxx.

124{
125 adc_signal_type theSignal;
126 switch ( theSource )
127 {
130 {
131 size_t theIndex = (size_t)theSource - (size_t)TBBPCRaw::adcHorizontal;
132 theSignal = (*(*m_adcSignals[theIndex])).getADC();
133 }
134 break;
135 default:
136 theSignal = 0;
137 break;
138 }
139 return theSignal;
140}
float getADC(const AFP_SiDigi &digi)
Definition AFP_SiDigi.h:29
TBADCRaw::signal_type adc_signal_type
Definition TBBPCRaw.h:41

◆ getADCVertical()

TBBPCRaw::tdc_signal_type TBBPCRaw::getADCVertical ( ) const
inline

Definition at line 198 of file TBBPCRaw.h.

199{
201}

◆ getDetectorName()

const std::string & TBBeamDetector::getDetectorName ( ) const
inlineinherited

Definition at line 62 of file TBBeamDetector.h.

63 { return m_tbDetectorName; }
std::string m_tbDetectorName

◆ getSignalSource() [1/2]

TBBPCRaw::SignalSource TBBPCRaw::getSignalSource ( adc_store_iterator & theADCIterator) const

Definition at line 170 of file TBBPCRaw.cxx.

171{
172 size_t theIndex = this->findIndex(m_adcSignals,theIterator);
173 SignalSource theSource;
174 switch ( theIndex )
175 {
176 case 0:
177 theSource = TBBPCRaw::adcHorizontal;
178 break;
179 case 1 :
180 theSource = TBBPCRaw::adcVertical;
181 break;
182 default:
183 theSource = TBBPCRaw::unknown;
184 break;
185 }
186 return theSource;
187}
size_t findIndex(const tdc_store_type &theStore, tdc_store_iterator &theIterator) const
Definition TBBPCRaw.h:133

◆ getSignalSource() [2/2]

TBBPCRaw::SignalSource TBBPCRaw::getSignalSource ( TBBPCRaw::tdc_store_iterator & theIterator) const

Definition at line 144 of file TBBPCRaw.cxx.

145{
146 size_t theIndex = this->findIndex(m_tdcSignals,theIterator);
147 SignalSource theSource;
148 switch ( theIndex )
149 {
150 case 0:
151 theSource = TBBPCRaw::tdcLeft;
152 break;
153 case 1:
154 theSource = TBBPCRaw::tdcRight;
155 break;
156 case 2:
157 theSource = TBBPCRaw::tdcUp;
158 break;
159 case 3:
160 theSource = TBBPCRaw::tdcDown;
161 break;
162 default:
163 theSource = TBBPCRaw::unknown;
164 break;
165 }
166 return theSource;
167}
tdc_store_type m_tdcSignals
Definition TBBPCRaw.h:110

◆ getTDCDown()

TBBPCRaw::tdc_signal_type TBBPCRaw::getTDCDown ( ) const
inline

Definition at line 188 of file TBBPCRaw.h.

189{
190 return this->getTDCSignal(TBBPCRaw::tdcDown);
191}
tdc_signal_type getTDCSignal(SignalSource theSource) const
Definition TBBPCRaw.cxx:100

◆ getTDCLeft()

TBBPCRaw::tdc_signal_type TBBPCRaw::getTDCLeft ( ) const
inline

Definition at line 173 of file TBBPCRaw.h.

174{
175 return this->getTDCSignal(TBBPCRaw::tdcLeft);
176}

◆ getTDCRight()

TBBPCRaw::tdc_signal_type TBBPCRaw::getTDCRight ( ) const
inline

Definition at line 178 of file TBBPCRaw.h.

179{
180 return this->getTDCSignal(TBBPCRaw::tdcRight);
181}

◆ getTDCSignal()

TBBPCRaw::tdc_signal_type TBBPCRaw::getTDCSignal ( TBBPCRaw::SignalSource theSource) const

Definition at line 100 of file TBBPCRaw.cxx.

101{
102 tdc_signal_type theSignal;
103 switch ( theSource )
104 {
107 case TBBPCRaw::tdcUp:
109 {
110 size_t theIndex = (size_t)theSource;
111 theSignal = (*(*m_tdcSignals[theIndex])).getTDC();
112 }
113 break;
114 default:
115 theSignal = 0;
116 break;
117 }
118 return theSignal;
119}
float getTDC(const AFP_SiDigi &digi)
Definition AFP_SiDigi.h:25
TBTDCRaw::signal_type tdc_signal_type
Definition TBBPCRaw.h:37

◆ getTDCUp()

TBBPCRaw::tdc_signal_type TBBPCRaw::getTDCUp ( ) const
inline

Definition at line 183 of file TBBPCRaw.h.

184{
185 return this->getTDCSignal(TBBPCRaw::tdcUp);
186}

◆ isOverflow() [1/2]

bool TBBPCRaw::isOverflow ( ) const
inlinevirtual

Definition at line 167 of file TBBPCRaw.h.

168{
169 return m_overflow;
170}
bool m_overflow
Detector Name.

◆ isOverflow() [2/2]

bool TBBPCRaw::isOverflow ( SignalSource theSource) const
virtual

Definition at line 68 of file TBBPCRaw.cxx.

69{
70 bool test;
71 switch ( theSource )
72 {
75 case TBBPCRaw::tdcUp:
77 {
78 size_t theIndex = (size_t)theSource;
79 const TBTDCRaw* theTDC = (*m_tdcSignals[theIndex]);
80 test = theTDC->isOverflow();
81 }
82 break;
85 {
86 size_t theIndex = (size_t)theSource - (size_t)TBBPCRaw::adcHorizontal;
87 const TBADCRaw* theADC = (*m_adcSignals[theIndex]);
88 test = theADC->isOverflow();
89 }
90 break;
91 default:
92 test = false;
93 break;
94 }
95 return test;
96}
bool isOverflow() const

◆ resetOverflow()

virtual void TBBeamDetector::resetOverflow ( )
inlinevirtualinherited

Reimplemented in TBMWPCRaw.

Definition at line 68 of file TBBeamDetector.h.

69 { m_overflow = false; }

◆ setDetectorName()

virtual void TBBeamDetector::setDetectorName ( std::string_view tbBeamDetectorName)
inlinevirtualinherited

Definition at line 49 of file TBBeamDetector.h.

50 { m_tbDetectorName.assign(tbBeamDetectorName); }

◆ setOverflow() [1/2]

virtual void TBBeamDetector::setOverflow ( )
inlinevirtualinherited

Reimplemented in TBMWPCRaw.

Definition at line 52 of file TBBeamDetector.h.

53 { m_overflow = true; }

◆ setOverflow() [2/2]

virtual void TBBeamDetector::setOverflow ( bool overflow)
inlinevirtualinherited

Reimplemented in TBMWPCRaw.

Definition at line 55 of file TBBeamDetector.h.

56 { m_overflow = overflow; }

◆ setSignals()

void TBBPCRaw::setSignals ( const TBTDCRawCont * theTDCCont,
const std::vector< const TBTDCRaw * > & theTDCs,
const TBADCRawCont * theADCCont,
const std::vector< const TBADCRaw * > & theADCs )

Definition at line 35 of file TBBPCRaw.cxx.

39{
40 // store TDC measurement
41 for (const TBTDCRaw* tdc : theTDCs)
42 {
43 ElementLink<TBTDCRawCont> theLink;
44 // const TBTDCRaw* tbtdc= tdc;
45 theLink.toContainedElement(*theTDCCont,tdc);
46 m_tdcSignals.push_back(theLink);
47 m_overflow = m_overflow || tdc->isOverflow();
48 }
49
50 // store ADC measurement
51 for (const TBADCRaw* adc : theADCs)
52 {
53 ElementLink<TBADCRawCont> theLink;
54 theLink.toContainedElement(*theADCCont,adc);
55 m_adcSignals.push_back(theLink);
56 m_overflow = m_overflow || adc->isOverflow();
57 }
58}

◆ tdc_begin()

TBBPCRaw::tdc_store_iterator TBBPCRaw::tdc_begin ( ) const
inline

Definition at line 204 of file TBBPCRaw.h.

205{
206 return m_tdcSignals.begin();
207}

◆ tdc_end()

TBBPCRaw::tdc_store_iterator TBBPCRaw::tdc_end ( ) const
inline

Definition at line 208 of file TBBPCRaw.h.

209{
210 return m_tdcSignals.end();
211}

Member Data Documentation

◆ m_adcSignals

adc_store_type TBBPCRaw::m_adcSignals
private

Definition at line 111 of file TBBPCRaw.h.

◆ m_overflow

bool TBBeamDetector::m_overflow
protectedinherited

Detector Name.

Definition at line 82 of file TBBeamDetector.h.

◆ m_tbDetectorName

std::string TBBeamDetector::m_tbDetectorName
privateinherited

Definition at line 77 of file TBBeamDetector.h.

◆ m_tdcSignals

tdc_store_type TBBPCRaw::m_tdcSignals
private

Definition at line 110 of file TBBPCRaw.h.


The documentation for this class was generated from the following files: