CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
EcalTBHodoscopePlaneRawHits Class Reference

#include <EcalTBHodoscopePlaneRawHits.h>

Public Member Functions

void addHit (unsigned int i)
 
unsigned int channels () const
 Get Methods. More...
 
 EcalTBHodoscopePlaneRawHits ()
 
 EcalTBHodoscopePlaneRawHits (unsigned int channels)
 
const std::vector< bool > & hits () const
 
bool isChannelFired (unsigned int i) const
 
unsigned int numberOfFiredHits () const
 
bool operator[] (unsigned int i) const
 
void setChannels (unsigned int size)
 Set methods. More...
 
void setHit (unsigned int i, bool status)
 

Private Attributes

std::vector< bool > rawChannelHits_
 

Detailed Description

Simple container for rawHits

Definition at line 13 of file EcalTBHodoscopePlaneRawHits.h.

Constructor & Destructor Documentation

EcalTBHodoscopePlaneRawHits::EcalTBHodoscopePlaneRawHits ( )
inline

Definition at line 15 of file EcalTBHodoscopePlaneRawHits.h.

15 : rawChannelHits_(0){};
EcalTBHodoscopePlaneRawHits::EcalTBHodoscopePlaneRawHits ( unsigned int  channels)
inline

Definition at line 17 of file EcalTBHodoscopePlaneRawHits.h.

References channels(), mps_fire::i, and rawChannelHits_.

17  {
18  rawChannelHits_.reserve(channels);
19  for (unsigned int i = 0; i < channels; i++)
20  rawChannelHits_[i] = false;
21  }
unsigned int channels() const
Get Methods.

Member Function Documentation

void EcalTBHodoscopePlaneRawHits::addHit ( unsigned int  i)
inline

Definition at line 41 of file EcalTBHodoscopePlaneRawHits.h.

References mps_fire::i, and rawChannelHits_.

Referenced by FakeTBHodoscopeRawInfoProducer::produce().

41  {
42  if (rawChannelHits_.size() < i + 1)
43  rawChannelHits_.resize(i + 1);
44  rawChannelHits_[i] = true;
45  };
unsigned int EcalTBHodoscopePlaneRawHits::channels ( ) const
inline

Get Methods.

Definition at line 24 of file EcalTBHodoscopePlaneRawHits.h.

References rawChannelHits_.

Referenced by EcalTBHodoscopePlaneRawHits(), and operator<<().

24 { return rawChannelHits_.size(); }
const std::vector<bool>& EcalTBHodoscopePlaneRawHits::hits ( void  ) const
inline

Definition at line 25 of file EcalTBHodoscopePlaneRawHits.h.

References rawChannelHits_.

25 { return rawChannelHits_; }
bool EcalTBHodoscopePlaneRawHits::isChannelFired ( unsigned int  i) const
inline

Definition at line 36 of file EcalTBHodoscopePlaneRawHits.h.

References mps_fire::i, and rawChannelHits_.

36 { return rawChannelHits_[i]; }
unsigned int EcalTBHodoscopePlaneRawHits::numberOfFiredHits ( ) const
inline

Definition at line 27 of file EcalTBHodoscopePlaneRawHits.h.

References mps_fire::i, and rawChannelHits_.

27  {
28  int numberOfHits = 0;
29  for (unsigned int i = 0; i < rawChannelHits_.size(); i++)
30  if (rawChannelHits_[i])
31  numberOfHits++;
32  return numberOfHits;
33  }
bool EcalTBHodoscopePlaneRawHits::operator[] ( unsigned int  i) const
inline

Definition at line 35 of file EcalTBHodoscopePlaneRawHits.h.

References mps_fire::i, and rawChannelHits_.

35 { return rawChannelHits_[i]; }
void EcalTBHodoscopePlaneRawHits::setChannels ( unsigned int  size)
inline

Set methods.

Definition at line 39 of file EcalTBHodoscopePlaneRawHits.h.

References rawChannelHits_.

Referenced by CamacTBDataFormatter::interpretRawData().

39 { rawChannelHits_.resize(size); };
tuple size
Write out results.
void EcalTBHodoscopePlaneRawHits::setHit ( unsigned int  i,
bool  status 
)
inline

Definition at line 47 of file EcalTBHodoscopePlaneRawHits.h.

References mps_fire::i, rawChannelHits_, and mps_update::status.

Referenced by CamacTBDataFormatter::interpretRawData(), and TBHodoActiveVolumeRawInfoProducer::produce().

47  {
48  if (rawChannelHits_.size() < i + 1)
49  rawChannelHits_.resize(i + 1);
51  };
list status
Definition: mps_update.py:107

Member Data Documentation

std::vector<bool> EcalTBHodoscopePlaneRawHits::rawChannelHits_
private