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

◆ key_type

For the sorted collection.

Definition at line 14 of file HcalHistogramDigi.h.

Constructor & Destructor Documentation

◆ HcalHistogramDigi() [1/2]

HcalHistogramDigi::HcalHistogramDigi ( )

Definition at line 4 of file HcalHistogramDigi.cc.

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

References bins_, BINS_PER_HISTOGRAM, and mps_fire::i.

◆ HcalHistogramDigi() [2/2]

HcalHistogramDigi::HcalHistogramDigi ( const HcalDetId id)
explicit

Definition at line 9 of file HcalHistogramDigi.cc.

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

References bins_, BINS_PER_HISTOGRAM, and mps_fire::i.

Member Function Documentation

◆ get()

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

◆ getArray()

uint16_t * HcalHistogramDigi::getArray ( int  capid)

get the array for the specified capid

Definition at line 24 of file HcalHistogramDigi.cc.

24  {
25  int offset = (capid % 4) * BINS_PER_HISTOGRAM;
26  return &(bins_[offset]);
27 }

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

Referenced by HcalUnpacker::unpack().

◆ getSum()

int HcalHistogramDigi::getSum ( int  bin) const

get the contents of the specified bin summed over capids

Definition at line 18 of file HcalHistogramDigi.cc.

18  {
22 }

References newFWLiteAna::bin, bins_, BINS_PER_HISTOGRAM, and createfilelist::int.

◆ id()

const HcalDetId& HcalHistogramDigi::id ( ) const
inline

Definition at line 19 of file HcalHistogramDigi.h.

19 { return id_; }

References id_.

Referenced by operator<<().

Member Data Documentation

◆ bins_

uint16_t HcalHistogramDigi::bins_[BINS_PER_HISTOGRAM *4]
private

Definition at line 32 of file HcalHistogramDigi.h.

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

◆ BINS_PER_HISTOGRAM

const int HcalHistogramDigi::BINS_PER_HISTOGRAM = 32
static

Definition at line 28 of file HcalHistogramDigi.h.

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

◆ id_

HcalDetId HcalHistogramDigi::id_
private

Definition at line 31 of file HcalHistogramDigi.h.

Referenced by id().

mps_fire.i
i
Definition: mps_fire.py:355
HcalHistogramDigi::id_
HcalDetId id_
Definition: HcalHistogramDigi.h:31
HcalHistogramDigi::bins_
uint16_t bins_[BINS_PER_HISTOGRAM *4]
Definition: HcalHistogramDigi.h:32
HcalHistogramDigi::BINS_PER_HISTOGRAM
static const int BINS_PER_HISTOGRAM
Definition: HcalHistogramDigi.h:28
createfilelist.int
int
Definition: createfilelist.py:10
newFWLiteAna.bin
bin
Definition: newFWLiteAna.py:161
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:78