CMS 3D CMS Logo

HcalHistogramDigi Class Reference

Date
2005/11/14 22:46:50
Revision
1.1
More...

#include <DataFormats/HcalDigi/interface/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

typedef HcalDetId HcalHistogramDigi::key_type

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.

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

HcalHistogramDigi::HcalHistogramDigi ( const HcalDetId id  )  [explicit]

Definition at line 9 of file HcalHistogramDigi.cc.

References bins_, BINS_PER_HISTOGRAM, and i.

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


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

00014                                                         {
00015   return bins_[(capid%4)*BINS_PER_HISTOGRAM+(bin%BINS_PER_HISTOGRAM)];
00016 }

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

Referenced by HcalUnpacker::unpack().

00025                                                {
00026   int offset=(capid%4)*BINS_PER_HISTOGRAM;
00027   return &(bins_[offset]);
00028 }

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

00018                                            {
00019   return (int)(bins_[(bin%BINS_PER_HISTOGRAM)])+
00020     (int)(bins_[BINS_PER_HISTOGRAM+(bin%BINS_PER_HISTOGRAM)])+
00021     (int)(bins_[BINS_PER_HISTOGRAM*2+(bin%BINS_PER_HISTOGRAM)])+
00022     (int)(bins_[BINS_PER_HISTOGRAM*3+(bin%BINS_PER_HISTOGRAM)]);
00023 }

const HcalDetId& HcalHistogramDigi::id ( void   )  const [inline]

Definition at line 21 of file HcalHistogramDigi.h.

References id_.

Referenced by operator<<().

00021 { return id_; }


Member Data Documentation

uint16_t HcalHistogramDigi::bins_[BINS_PER_HISTOGRAM *4] [private]

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

HcalDetId HcalHistogramDigi::id_ [private]

Definition at line 32 of file HcalHistogramDigi.h.

Referenced by id().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:23:42 2009 for CMSSW by  doxygen 1.5.4