CMS 3D CMS Logo

Public Types | Public Member Functions | Static Public Attributes | Private Attributes

HcalHistogramDigi Class Reference

#include <HcalHistogramDigi.h>

List of all members.

Public Types

typedef HcalDetId key_type
 For the sorted collection.

Public Member Functions

uint16_t get (int capid, int bin) const
 get the contents of the specified bin for the specified capid (0-3)
uint16_t * getArray (int capid)
 get the array for the specified capid
int getSum (int bin) const
 get the contents of the specified bin summed over capids
 HcalHistogramDigi (const HcalDetId &id)
 HcalHistogramDigi ()
const HcalDetIdid () const

Static Public Attributes

static const int BINS_PER_HISTOGRAM = 32

Private Attributes

uint16_t bins_ [BINS_PER_HISTOGRAM *4]
HcalDetId id_

Detailed Description

Date:
2005/11/14 22:46:50
Revision:
1.1
Author:
J. Mans - Minnesota

Definition at line 14 of file HcalHistogramDigi.h.


Member Typedef Documentation

For the sorted collection.

Definition at line 16 of file HcalHistogramDigi.h.


Constructor & Destructor Documentation

HcalHistogramDigi::HcalHistogramDigi ( )

Definition at line 4 of file HcalHistogramDigi.cc.

References bins_, BINS_PER_HISTOGRAM, and i.

                                     : id_(0) {
  for (int i=0; i<BINS_PER_HISTOGRAM*4; i++) 
    bins_[i]=0;
}
HcalHistogramDigi::HcalHistogramDigi ( const HcalDetId id) [explicit]

Definition at line 9 of file HcalHistogramDigi.cc.

References bins_, BINS_PER_HISTOGRAM, and i.

                                                        : id_(id) {
  for (int i=0; i<BINS_PER_HISTOGRAM*4; i++) 
    bins_[i]=0;
}

Member Function Documentation

uint16_t HcalHistogramDigi::get ( int  capid,
int  bin 
) const

get the contents of the specified bin for the specified capid (0-3)

Definition at line 14 of file HcalHistogramDigi.cc.

References bins_, and BINS_PER_HISTOGRAM.

Referenced by operator<<().

                                                        {
  return bins_[(capid%4)*BINS_PER_HISTOGRAM+(bin%BINS_PER_HISTOGRAM)];
}
uint16_t * HcalHistogramDigi::getArray ( int  capid)

get the array for the specified capid

Definition at line 25 of file HcalHistogramDigi.cc.

References bins_, BINS_PER_HISTOGRAM, and evf::evtn::offset().

Referenced by HcalUnpacker::unpack().

                                               {
  int offset=(capid%4)*BINS_PER_HISTOGRAM;
  return &(bins_[offset]);
}
int HcalHistogramDigi::getSum ( int  bin) const

get the contents of the specified bin summed over capids

Definition at line 18 of file HcalHistogramDigi.cc.

References bins_, and BINS_PER_HISTOGRAM.

                                           {
  return (int)(bins_[(bin%BINS_PER_HISTOGRAM)])+
    (int)(bins_[BINS_PER_HISTOGRAM+(bin%BINS_PER_HISTOGRAM)])+
    (int)(bins_[BINS_PER_HISTOGRAM*2+(bin%BINS_PER_HISTOGRAM)])+
    (int)(bins_[BINS_PER_HISTOGRAM*3+(bin%BINS_PER_HISTOGRAM)]);
}
const HcalDetId& HcalHistogramDigi::id ( void  ) const [inline]

Definition at line 21 of file HcalHistogramDigi.h.

References id_.

Referenced by operator<<().

{ return id_; }

Member Data Documentation

Definition at line 33 of file HcalHistogramDigi.h.

Referenced by get(), getArray(), getSum(), and HcalHistogramDigi().

const int HcalHistogramDigi::BINS_PER_HISTOGRAM = 32 [static]

Definition at line 30 of file HcalHistogramDigi.h.

Referenced by get(), getArray(), getSum(), HcalHistogramDigi(), and operator<<().

Definition at line 32 of file HcalHistogramDigi.h.

Referenced by id().