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.

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

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

Member Function Documentation

◆ addHit()

void EcalTBHodoscopePlaneRawHits::addHit ( unsigned int  i)
inline

Definition at line 41 of file EcalTBHodoscopePlaneRawHits.h.

41  {
42  if (rawChannelHits_.size() < i + 1)
43  rawChannelHits_.resize(i + 1);
44  rawChannelHits_[i] = true;
45  };

References mps_fire::i, and rawChannelHits_.

Referenced by FakeTBHodoscopeRawInfoProducer::produce().

◆ channels()

unsigned int EcalTBHodoscopePlaneRawHits::channels ( ) const
inline

Get Methods.

Definition at line 24 of file EcalTBHodoscopePlaneRawHits.h.

24 { return rawChannelHits_.size(); }

References rawChannelHits_.

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

◆ hits()

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

Definition at line 25 of file EcalTBHodoscopePlaneRawHits.h.

25 { return rawChannelHits_; }

References rawChannelHits_.

◆ isChannelFired()

bool EcalTBHodoscopePlaneRawHits::isChannelFired ( unsigned int  i) const
inline

Definition at line 36 of file EcalTBHodoscopePlaneRawHits.h.

36 { return rawChannelHits_[i]; }

References mps_fire::i, and rawChannelHits_.

◆ numberOfFiredHits()

unsigned int EcalTBHodoscopePlaneRawHits::numberOfFiredHits ( ) const
inline

Definition at line 27 of file EcalTBHodoscopePlaneRawHits.h.

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  }

References mps_fire::i, and rawChannelHits_.

◆ operator[]()

bool EcalTBHodoscopePlaneRawHits::operator[] ( unsigned int  i) const
inline

Definition at line 35 of file EcalTBHodoscopePlaneRawHits.h.

35 { return rawChannelHits_[i]; }

References mps_fire::i, and rawChannelHits_.

◆ setChannels()

void EcalTBHodoscopePlaneRawHits::setChannels ( unsigned int  size)
inline

Set methods.

Definition at line 39 of file EcalTBHodoscopePlaneRawHits.h.

39 { rawChannelHits_.resize(size); };

References rawChannelHits_, and findQualityFiles::size.

Referenced by CamacTBDataFormatter::interpretRawData().

◆ setHit()

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

Definition at line 47 of file EcalTBHodoscopePlaneRawHits.h.

47  {
48  if (rawChannelHits_.size() < i + 1)
49  rawChannelHits_.resize(i + 1);
51  };

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

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

Member Data Documentation

◆ rawChannelHits_

std::vector<bool> EcalTBHodoscopePlaneRawHits::rawChannelHits_
private
mps_fire.i
i
Definition: mps_fire.py:355
mps_update.status
status
Definition: mps_update.py:69
EcalTBHodoscopePlaneRawHits::rawChannelHits_
std::vector< bool > rawChannelHits_
Definition: EcalTBHodoscopePlaneRawHits.h:51
EcalTBHodoscopePlaneRawHits::channels
unsigned int channels() const
Get Methods.
Definition: EcalTBHodoscopePlaneRawHits.h:24
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443