CMS 3D CMS Logo

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() [1/2]

EcalTBHodoscopePlaneRawHits::EcalTBHodoscopePlaneRawHits ( )
inline

Definition at line 15 of file EcalTBHodoscopePlaneRawHits.h.

15 : rawChannelHits_(0) {}

◆ EcalTBHodoscopePlaneRawHits() [2/2]

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

◆ addHit()

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

◆ channels()

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(); }

◆ hits()

const std::vector<bool>& EcalTBHodoscopePlaneRawHits::hits ( void  ) const
inline

Definition at line 25 of file EcalTBHodoscopePlaneRawHits.h.

References rawChannelHits_.

25 { return rawChannelHits_; }

◆ isChannelFired()

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]; }

◆ numberOfFiredHits()

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  }

◆ operator[]()

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]; }

◆ setChannels()

void EcalTBHodoscopePlaneRawHits::setChannels ( unsigned int  size)
inline

Set methods.

Definition at line 39 of file EcalTBHodoscopePlaneRawHits.h.

References rawChannelHits_, and findQualityFiles::size.

Referenced by CamacTBDataFormatter::interpretRawData().

39 { rawChannelHits_.resize(size); };
size
Write out results.

◆ setHit()

void EcalTBHodoscopePlaneRawHits::setHit ( unsigned int  i,
bool  status 
)
inline

Member Data Documentation

◆ rawChannelHits_

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