CMS 3D CMS Logo

Public Member Functions | Private Attributes

EcalTBHodoscopePlaneRawHits Class Reference

#include <EcalTBHodoscopePlaneRawHits.h>

List of all members.

Public Member Functions

void addHit (unsigned int i)
unsigned int channels () const
 Get Methods.
 EcalTBHodoscopePlaneRawHits (unsigned int channels)
 EcalTBHodoscopePlaneRawHits ()
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.
void setHit (unsigned int i, bool status)

Private Attributes

std::vector< bool > rawChannelHits_

Detailed Description

Simple container for rawHits

Id:
EcalTBHodoscopePlaneRawHits.h,v 1.3 2006/06/06 15:37:00 meridian Exp

Definition at line 16 of file EcalTBHodoscopePlaneRawHits.h.


Constructor & Destructor Documentation

EcalTBHodoscopePlaneRawHits::EcalTBHodoscopePlaneRawHits ( ) [inline]

Definition at line 18 of file EcalTBHodoscopePlaneRawHits.h.

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

Definition at line 20 of file EcalTBHodoscopePlaneRawHits.h.

References channels(), i, and rawChannelHits_.

    {
      rawChannelHits_.reserve(channels);
      for (unsigned int i=0;i<channels;i++)
        rawChannelHits_[i]=0;
    }

Member Function Documentation

void EcalTBHodoscopePlaneRawHits::addHit ( unsigned int  i) [inline]

Definition at line 49 of file EcalTBHodoscopePlaneRawHits.h.

References i, and rawChannelHits_.

Referenced by FakeTBHodoscopeRawInfoProducer::produce().

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

Get Methods.

Definition at line 28 of file EcalTBHodoscopePlaneRawHits.h.

References rawChannelHits_.

Referenced by EBBeamHodoTask::analyze(), EEBeamHodoTask::analyze(), EcalTBHodoscopePlaneRawHits(), and operator<<().

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

Definition at line 29 of file EcalTBHodoscopePlaneRawHits.h.

References rawChannelHits_.

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

Definition at line 41 of file EcalTBHodoscopePlaneRawHits.h.

References i, and rawChannelHits_.

Referenced by EBBeamHodoTask::analyze(), and EEBeamHodoTask::analyze().

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

Definition at line 31 of file EcalTBHodoscopePlaneRawHits.h.

References i, and rawChannelHits_.

Referenced by EBBeamHodoTask::analyze(), and EEBeamHodoTask::analyze().

    {
      int numberOfHits=0;
      for (unsigned int i=0;i<rawChannelHits_.size();i++)
        if (rawChannelHits_[i])
          numberOfHits++;
      return numberOfHits;
    }
bool EcalTBHodoscopePlaneRawHits::operator[] ( unsigned int  i) const [inline]

Definition at line 40 of file EcalTBHodoscopePlaneRawHits.h.

References i, and rawChannelHits_.

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

Set methods.

Definition at line 44 of file EcalTBHodoscopePlaneRawHits.h.

References rawChannelHits_.

Referenced by CamacTBDataFormatter::interpretRawData().

    {
      rawChannelHits_.resize(size);
    };
void EcalTBHodoscopePlaneRawHits::setHit ( unsigned int  i,
bool  status 
) [inline]

Member Data Documentation

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