CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Attributes | Private Attributes
HcalHistogramDigi Class Reference

#include <HcalHistogramDigi.h>

Public Types

typedef HcalDetId key_type
 For the sorted collection. More...
 

Public Member Functions

uint16_t get (int capid, int bin) const
 get the contents of the specified bin for the specified capid (0-3) More...
 
uint16_t * getArray (int capid)
 get the array for the specified capid More...
 
int getSum (int bin) const
 get the contents of the specified bin summed over capids More...
 
 HcalHistogramDigi ()
 
 HcalHistogramDigi (const HcalDetId &id)
 
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

Author
J. Mans - Minnesota

Definition at line 12 of file HcalHistogramDigi.h.

Member Typedef Documentation

For the sorted collection.

Definition at line 14 of file HcalHistogramDigi.h.

Constructor & Destructor Documentation

HcalHistogramDigi::HcalHistogramDigi ( )

Definition at line 4 of file HcalHistogramDigi.cc.

References bins_, BINS_PER_HISTOGRAM, and mps_fire::i.

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

Definition at line 9 of file HcalHistogramDigi.cc.

References bins_, BINS_PER_HISTOGRAM, and mps_fire::i.

9  : id_(id) {
10  for (int i = 0; i < BINS_PER_HISTOGRAM * 4; i++)
11  bins_[i] = 0;
12 }
static const int BINS_PER_HISTOGRAM
uint16_t bins_[BINS_PER_HISTOGRAM *4]

Member Function Documentation

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

get the array for the specified capid

Definition at line 24 of file HcalHistogramDigi.cc.

References bins_, BINS_PER_HISTOGRAM, and hltrates_dqm_sourceclient-live_cfg::offset.

Referenced by id(), and HcalUnpacker::unpack().

24  {
25  int offset = (capid % 4) * BINS_PER_HISTOGRAM;
26  return &(bins_[offset]);
27 }
static const int BINS_PER_HISTOGRAM
uint16_t bins_[BINS_PER_HISTOGRAM *4]
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_, BINS_PER_HISTOGRAM, and createfilelist::int.

Referenced by id().

18  {
20  (int)(bins_[BINS_PER_HISTOGRAM * 2 + (bin % BINS_PER_HISTOGRAM)]) +
21  (int)(bins_[BINS_PER_HISTOGRAM * 3 + (bin % BINS_PER_HISTOGRAM)]);
22 }
static const int BINS_PER_HISTOGRAM
uint16_t bins_[BINS_PER_HISTOGRAM *4]
const HcalDetId& HcalHistogramDigi::id ( ) const
inline

Definition at line 19 of file HcalHistogramDigi.h.

References newFWLiteAna::bin, getArray(), getSum(), and id_.

Referenced by operator<<().

19 { return id_; }

Member Data Documentation

uint16_t HcalHistogramDigi::bins_[BINS_PER_HISTOGRAM *4]
private

Definition at line 32 of file HcalHistogramDigi.h.

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

const int HcalHistogramDigi::BINS_PER_HISTOGRAM = 32
static

Definition at line 28 of file HcalHistogramDigi.h.

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

HcalDetId HcalHistogramDigi::id_
private

Definition at line 31 of file HcalHistogramDigi.h.

Referenced by id().