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.

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() [2/2]

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

◆ 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.

References bins_, BINS_PER_HISTOGRAM, and HLT_IsoTrack_cff::offset.

Referenced by 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]

◆ 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.

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

18  {
22 }
static const int BINS_PER_HISTOGRAM
uint16_t bins_[BINS_PER_HISTOGRAM *4]

◆ id()

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

◆ 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().