CMS 3D CMS Logo

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

#include <IntegerCaloSamples.h>

Public Member Functions

DetId id () const
 get the (generic) id More...
 
 IntegerCaloSamples ()
 
 IntegerCaloSamples (const DetId &id, int size)
 
uint32_t & operator[] (int i)
 mutable operator to access samples More...
 
uint32_t operator[] (int i) const
 const operator to access samples More...
 
int presamples () const
 access presample information More...
 
void setPresamples (int pre)
 set presample information More...
 
int size () const
 get the size More...
 

Static Public Attributes

static const int MAXSAMPLES = 10
 

Private Attributes

uint32_t data_ [MAXSAMPLES]
 
DetId id_
 
int presamples_
 
int size_
 

Detailed Description

Class which represents the linear charge/voltage measurements of an event/channel, but with defined resolution.

This class uses 32-bit bins, so users should be careful if their calculation implies fewer bins.

Definition at line 16 of file IntegerCaloSamples.h.

Constructor & Destructor Documentation

◆ IntegerCaloSamples() [1/2]

IntegerCaloSamples::IntegerCaloSamples ( )

Definition at line 3 of file IntegerCaloSamples.cc.

3  : id_(), size_(0), presamples_(0) {
4  for (int i = 0; i < MAXSAMPLES; i++)
5  data_[i] = 0;
6 }

References data_, mps_fire::i, and MAXSAMPLES.

◆ IntegerCaloSamples() [2/2]

IntegerCaloSamples::IntegerCaloSamples ( const DetId id,
int  size 
)
explicit

Definition at line 8 of file IntegerCaloSamples.cc.

8  : id_(id), size_(size), presamples_(0) {
9  for (int i = 0; i < MAXSAMPLES; i++)
10  data_[i] = 0;
11 }

References data_, mps_fire::i, and MAXSAMPLES.

Member Function Documentation

◆ id()

DetId IntegerCaloSamples::id ( ) const
inline

get the (generic) id

Definition at line 22 of file IntegerCaloSamples.h.

22 { return id_; }

References id_.

◆ operator[]() [1/2]

uint32_t& IntegerCaloSamples::operator[] ( int  i)
inline

mutable operator to access samples

Definition at line 27 of file IntegerCaloSamples.h.

27 { return data_[i]; }

References data_, and mps_fire::i.

◆ operator[]() [2/2]

uint32_t IntegerCaloSamples::operator[] ( int  i) const
inline

const operator to access samples

Definition at line 29 of file IntegerCaloSamples.h.

29 { return data_[i]; }

References data_, and mps_fire::i.

◆ presamples()

int IntegerCaloSamples::presamples ( ) const
inline

access presample information

Definition at line 32 of file IntegerCaloSamples.h.

32 { return presamples_; }

References presamples_.

◆ setPresamples()

void IntegerCaloSamples::setPresamples ( int  pre)

set presample information

Definition at line 13 of file IntegerCaloSamples.cc.

13 { presamples_ = pre; }

References presamples_.

Referenced by HcalTriggerPrimitiveAlgo::addSignal().

◆ size()

int IntegerCaloSamples::size ( void  ) const
inline

get the size

Definition at line 25 of file IntegerCaloSamples.h.

25 { return size_; }

References size_.

Referenced by ntupleDataFormat._Collection::__iter__(), and ntupleDataFormat._Collection::__len__().

Member Data Documentation

◆ data_

uint32_t IntegerCaloSamples::data_[MAXSAMPLES]
private

Definition at line 40 of file IntegerCaloSamples.h.

Referenced by IntegerCaloSamples(), and operator[]().

◆ id_

DetId IntegerCaloSamples::id_
private

Definition at line 39 of file IntegerCaloSamples.h.

Referenced by id().

◆ MAXSAMPLES

const int IntegerCaloSamples::MAXSAMPLES = 10
static

Definition at line 36 of file IntegerCaloSamples.h.

Referenced by IntegerCaloSamples().

◆ presamples_

int IntegerCaloSamples::presamples_
private

Definition at line 41 of file IntegerCaloSamples.h.

Referenced by presamples(), and setPresamples().

◆ size_

int IntegerCaloSamples::size_
private

Definition at line 41 of file IntegerCaloSamples.h.

Referenced by size().

mps_fire.i
i
Definition: mps_fire.py:428
IntegerCaloSamples::id_
DetId id_
Definition: IntegerCaloSamples.h:39
IntegerCaloSamples::presamples_
int presamples_
Definition: IntegerCaloSamples.h:41
IntegerCaloSamples::size_
int size_
Definition: IntegerCaloSamples.h:41
IntegerCaloSamples::size
int size() const
get the size
Definition: IntegerCaloSamples.h:25
IntegerCaloSamples::data_
uint32_t data_[MAXSAMPLES]
Definition: IntegerCaloSamples.h:40
IntegerCaloSamples::MAXSAMPLES
static const int MAXSAMPLES
Definition: IntegerCaloSamples.h:36