CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 15 of file EcalTBHodoscopePlaneRawHits.h.

Constructor & Destructor Documentation

EcalTBHodoscopePlaneRawHits::EcalTBHodoscopePlaneRawHits ( )
inline

Definition at line 17 of file EcalTBHodoscopePlaneRawHits.h.

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

Definition at line 19 of file EcalTBHodoscopePlaneRawHits.h.

References channels(), i, and rawChannelHits_.

20  {
21  rawChannelHits_.reserve(channels);
22  for (unsigned int i=0;i<channels;i++)
23  rawChannelHits_[i]=0;
24  }
int i
Definition: DBlmapReader.cc:9
unsigned int channels() const
Get Methods.

Member Function Documentation

void EcalTBHodoscopePlaneRawHits::addHit ( unsigned int  i)
inline

Definition at line 48 of file EcalTBHodoscopePlaneRawHits.h.

References i, and rawChannelHits_.

Referenced by FakeTBHodoscopeRawInfoProducer::produce().

49  {
50  if (rawChannelHits_.size() < i+1 )
51  rawChannelHits_.resize(i+1);
52  rawChannelHits_[i]=true;
53  };
int i
Definition: DBlmapReader.cc:9
unsigned int EcalTBHodoscopePlaneRawHits::channels ( ) const
inline

Get Methods.

Definition at line 27 of file EcalTBHodoscopePlaneRawHits.h.

References rawChannelHits_.

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

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

Definition at line 28 of file EcalTBHodoscopePlaneRawHits.h.

References rawChannelHits_.

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

Definition at line 40 of file EcalTBHodoscopePlaneRawHits.h.

References i, and rawChannelHits_.

40 { return rawChannelHits_[i]; }
int i
Definition: DBlmapReader.cc:9
unsigned int EcalTBHodoscopePlaneRawHits::numberOfFiredHits ( ) const
inline

Definition at line 30 of file EcalTBHodoscopePlaneRawHits.h.

References i, and rawChannelHits_.

31  {
32  int numberOfHits=0;
33  for (unsigned int i=0;i<rawChannelHits_.size();i++)
34  if (rawChannelHits_[i])
35  numberOfHits++;
36  return numberOfHits;
37  }
int i
Definition: DBlmapReader.cc:9
bool EcalTBHodoscopePlaneRawHits::operator[] ( unsigned int  i) const
inline

Definition at line 39 of file EcalTBHodoscopePlaneRawHits.h.

References i, and rawChannelHits_.

39 { return rawChannelHits_[i]; }
int i
Definition: DBlmapReader.cc:9
void EcalTBHodoscopePlaneRawHits::setChannels ( unsigned int  size)
inline

Set methods.

Definition at line 43 of file EcalTBHodoscopePlaneRawHits.h.

References rawChannelHits_.

Referenced by CamacTBDataFormatter::interpretRawData().

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

Definition at line 55 of file EcalTBHodoscopePlaneRawHits.h.

References i, rawChannelHits_, and ntuplemaker::status.

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

56  {
57  if (rawChannelHits_.size() < i+1 )
58  rawChannelHits_.resize(i+1);
60  };
int i
Definition: DBlmapReader.cc:9
tuple status
Definition: ntuplemaker.py:245

Member Data Documentation

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