CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 i.

4  : id_(0) {
5  for (int i=0; i<BINS_PER_HISTOGRAM*4; i++)
6  bins_[i]=0;
7 }
int i
Definition: DBlmapReader.cc:9
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 i.

9  : id_(id) {
10  for (int i=0; i<BINS_PER_HISTOGRAM*4; i++)
11  bins_[i]=0;
12 }
int i
Definition: DBlmapReader.cc:9
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 25 of file HcalHistogramDigi.cc.

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

Referenced by HcalUnpacker::unpack().

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

18  {
19  return (int)(bins_[(bin%BINS_PER_HISTOGRAM)])+
21  (int)(bins_[BINS_PER_HISTOGRAM*2+(bin%BINS_PER_HISTOGRAM)])+
22  (int)(bins_[BINS_PER_HISTOGRAM*3+(bin%BINS_PER_HISTOGRAM)]);
23 }
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 id_.

Referenced by operator<<().

19 { return id_; }

Member Data Documentation

uint16_t HcalHistogramDigi::bins_[BINS_PER_HISTOGRAM *4]
private

Definition at line 31 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 30 of file HcalHistogramDigi.h.

Referenced by id().