ATLAS Offline Software
Public Types | Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
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 (const std::string &thisBPCName)
 standard constructor More...
 
 TBBPCRaw (const std::string &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 (const std::string &tbBeamDetectorName)
 
virtual void setOverflow ()
 
virtual void setOverflow (bool overflow)
 
const std::string & getDetectorName () const
 
virtual void resetOverflow ()
 

Protected Attributes

bool m_overflow
 Detector Name. More...
 

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 32 of file TBBPCRaw.h.

Member Typedef Documentation

◆ adc_signal_type

Definition at line 40 of file TBBPCRaw.h.

◆ adc_store_iterator

typedef adc_store_type::const_iterator TBBPCRaw::adc_store_iterator

Definition at line 42 of file TBBPCRaw.h.

◆ adc_store_type

Definition at line 41 of file TBBPCRaw.h.

◆ tdc_signal_type

Definition at line 36 of file TBBPCRaw.h.

◆ tdc_store_iterator

typedef tdc_store_type::const_iterator TBBPCRaw::tdc_store_iterator

Definition at line 38 of file TBBPCRaw.h.

◆ tdc_store_type

Definition at line 37 of file TBBPCRaw.h.

Member Enumeration Documentation

◆ SignalSource

Enumerator
tdcLeft 
tdcRight 
tdcUp 
tdcDown 
adcHorizontal 
adcVertical 
unknown 

Definition at line 44 of file TBBPCRaw.h.

44  { tdcLeft = 0,
45  tdcRight = 1,
46  tdcUp = 2,
47  tdcDown = 3,
48  adcHorizontal = 4,
49  adcVertical = 5,
50  unknown = 6 };

Constructor & Destructor Documentation

◆ TBBPCRaw() [1/3]

TBBPCRaw::TBBPCRaw ( )

Definition at line 22 of file TBBPCRaw.cxx.

22  : TBBeamDetector()
23 { }

◆ TBBPCRaw() [2/3]

TBBPCRaw::TBBPCRaw ( const std::string &  thisBPCName)
inline

standard constructor

Definition at line 60 of file TBBPCRaw.h.

60  : TBBeamDetector(thisBPCName)
61  {}

◆ TBBPCRaw() [3/3]

TBBPCRaw::TBBPCRaw ( const std::string &  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 }

◆ ~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 211 of file TBBPCRaw.h.

212 {
213  return m_adcSignals.begin();
214 }

◆ adc_end()

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

Definition at line 215 of file TBBPCRaw.h.

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

◆ findIndex() [1/2]

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

Definition at line 145 of file TBBPCRaw.h.

146  {
147  adc_store_type::const_iterator firstInStore = theStore.begin();
148  adc_store_type::const_iterator lastInStore = theStore.end();
149  size_t theIndex = 0;
150  while ( firstInStore != theIterator && firstInStore != lastInStore )
151  {
152  ++theIndex;
153  ++firstInStore;
154  }
155  if ( firstInStore == lastInStore ) theIndex = size_t(-1);
156  return theIndex;
157  }

◆ findIndex() [2/2]

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

Definition at line 132 of file TBBPCRaw.h.

133  {
134  tdc_store_type::const_iterator firstInStore = theStore.begin();
135  tdc_store_type::const_iterator lastInStore = theStore.end();
136  size_t theIndex = 0;
137  while ( firstInStore != theIterator && firstInStore != lastInStore )
138  {
139  ++theIndex;
140  ++firstInStore;
141  }
142  if ( firstInStore == lastInStore ) theIndex = size_t(-1);
143  return theIndex;
144  }

◆ getADCHorizontal()

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

Definition at line 192 of file TBBPCRaw.h.

193 {
195 }

◆ 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 }

◆ getADCVertical()

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

Definition at line 197 of file TBBPCRaw.h.

198 {
199  return this->getADCSignal(TBBPCRaw::adcVertical);
200 }

◆ getDetectorName()

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

Definition at line 61 of file TBBeamDetector.h.

62  { return 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 }

◆ 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 }

◆ getTDCDown()

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

Definition at line 187 of file TBBPCRaw.h.

188 {
189  return this->getTDCSignal(TBBPCRaw::tdcDown);
190 }

◆ getTDCLeft()

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

Definition at line 172 of file TBBPCRaw.h.

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

◆ getTDCRight()

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

Definition at line 177 of file TBBPCRaw.h.

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

◆ 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  {
105  case TBBPCRaw::tdcLeft:
106  case TBBPCRaw::tdcRight:
107  case TBBPCRaw::tdcUp:
108  case TBBPCRaw::tdcDown:
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 }

◆ getTDCUp()

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

Definition at line 182 of file TBBPCRaw.h.

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

◆ isOverflow() [1/2]

bool TBBPCRaw::isOverflow ( ) const
inlinevirtual

Definition at line 166 of file TBBPCRaw.h.

167 {
168  return m_overflow;
169 }

◆ 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  {
73  case TBBPCRaw::tdcLeft:
74  case TBBPCRaw::tdcRight:
75  case TBBPCRaw::tdcUp:
76  case TBBPCRaw::tdcDown:
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 }

◆ resetOverflow()

virtual void TBBeamDetector::resetOverflow ( )
inlinevirtualinherited

Reimplemented in TBMWPCRaw.

Definition at line 67 of file TBBeamDetector.h.

68  { m_overflow = false; }

◆ setDetectorName()

virtual void TBBeamDetector::setDetectorName ( const std::string &  tbBeamDetectorName)
inlinevirtualinherited

Definition at line 48 of file TBBeamDetector.h.

49  { m_tbDetectorName = tbBeamDetectorName; }

◆ setOverflow() [1/2]

virtual void TBBeamDetector::setOverflow ( )
inlinevirtualinherited

Reimplemented in TBMWPCRaw.

Definition at line 51 of file TBBeamDetector.h.

52  { m_overflow = true; }

◆ setOverflow() [2/2]

virtual void TBBeamDetector::setOverflow ( bool  overflow)
inlinevirtualinherited

Reimplemented in TBMWPCRaw.

Definition at line 54 of file TBBeamDetector.h.

55  { 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  {
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  {
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 203 of file TBBPCRaw.h.

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

◆ tdc_end()

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

Definition at line 207 of file TBBPCRaw.h.

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

Member Data Documentation

◆ m_adcSignals

adc_store_type TBBPCRaw::m_adcSignals
private

Definition at line 110 of file TBBPCRaw.h.

◆ m_overflow

bool TBBeamDetector::m_overflow
protectedinherited

Detector Name.

Definition at line 81 of file TBBeamDetector.h.

◆ m_tbDetectorName

std::string TBBeamDetector::m_tbDetectorName
privateinherited

Definition at line 76 of file TBBeamDetector.h.

◆ m_tdcSignals

tdc_store_type TBBPCRaw::m_tdcSignals
private

Definition at line 109 of file TBBPCRaw.h.


The documentation for this class was generated from the following files:
TBTDCRaw
Definition: TBTDCRaw.h:21
TBBPCRaw::getTDCSignal
tdc_signal_type getTDCSignal(SignalSource theSource) const
Definition: TBBPCRaw.cxx:100
TBADCRaw
Definition: TBADCRaw.h:21
TBBPCRaw::SignalSource
SignalSource
Definition: TBBPCRaw.h:44
TrigInDetValidation_Base.test
test
Definition: TrigInDetValidation_Base.py:147
TBBPCRaw::tdcUp
@ tdcUp
Definition: TBBPCRaw.h:46
TBBPCRaw::adcVertical
@ adcVertical
Definition: TBBPCRaw.h:49
TBBPCRaw::unknown
@ unknown
Definition: TBBPCRaw.h:50
TBBPCRaw::m_adcSignals
adc_store_type m_adcSignals
Definition: TBBPCRaw.h:110
TBBPCRaw::tdc_signal_type
TBTDCRaw::signal_type tdc_signal_type
Definition: TBBPCRaw.h:36
TBBPCRaw::getADCSignal
adc_signal_type getADCSignal(SignalSource theSource) const
Definition: TBBPCRaw.cxx:123
TBBPCRaw::adcHorizontal
@ adcHorizontal
Definition: TBBPCRaw.h:48
TBBPCRaw::tdcDown
@ tdcDown
Definition: TBBPCRaw.h:47
TBBPCRaw::findIndex
size_t findIndex(const tdc_store_type &theStore, tdc_store_iterator &theIterator) const
Definition: TBBPCRaw.h:132
TBBPCRaw::tdcLeft
@ tdcLeft
Definition: TBBPCRaw.h:44
TBBeamDetector::TBBeamDetector
TBBeamDetector()
Definition: TBBeamDetector.h:23
TBBPCRaw::m_tdcSignals
tdc_store_type m_tdcSignals
Definition: TBBPCRaw.h:109
TBBPCRaw::adc_signal_type
TBADCRaw::signal_type adc_signal_type
Definition: TBBPCRaw.h:40
TBBeamDetector::m_overflow
bool m_overflow
Detector Name.
Definition: TBBeamDetector.h:81
ReadFloatFromCool.adc
adc
Definition: ReadFloatFromCool.py:48
TBBPCRaw::tdcRight
@ tdcRight
Definition: TBBPCRaw.h:45
TBBeamDetector::m_tbDetectorName
std::string m_tbDetectorName
Definition: TBBeamDetector.h:76
TBBeamDetector::isOverflow
bool isOverflow() const
Definition: TBBeamDetector.h:64
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