CMS 3D CMS Logo

CaloSamples Class Reference

Class which represents the charge/voltage measurements of an event/channel with the ADC decoding performed. More...

#include <CalibFormats/CaloObjects/interface/CaloSamples.h>

List of all members.

Public Member Functions

 CaloSamples (const DetId &id, int size)
 CaloSamples ()
DetId id () const
 get the (generic) id
CaloSamplesoperator *= (double value)
 scale all samples
CaloSamplesoperator+= (double value)
 add a value to all samples
double operator[] (int i) const
 const operator to access samples
double & operator[] (int i)
 mutable operator to access samples
int presamples () const
 access presample information
CaloSamplesscale (double value)
 multiply each item by this value
void setPresamples (int pre)
 set presample information
int size () const
 get the size

Static Public Attributes

static const int MAXSAMPLES = 10

Private Attributes

double data_ [MAXSAMPLES]
DetId id_
int presamples_
int size_


Detailed Description

Class which represents the charge/voltage measurements of an event/channel with the ADC decoding performed.

Date
2006/01/05 16:26:05
Revision
1.3

Definition at line 15 of file CaloSamples.h.


Constructor & Destructor Documentation

CaloSamples::CaloSamples (  ) 

Definition at line 3 of file CaloSamples.cc.

References data_, i, and MAXSAMPLES.

00003                          : id_(), size_(0), presamples_(0) {
00004   for (int i=0; i<MAXSAMPLES; i++) data_[i]=0;
00005 }

CaloSamples::CaloSamples ( const DetId id,
int  size 
) [explicit]

Definition at line 7 of file CaloSamples.cc.

References data_, i, and MAXSAMPLES.

00007                                                   : id_(id), size_(size), presamples_(0) {
00008   for (int i=0; i<MAXSAMPLES; i++) data_[i]=0;
00009 }


Member Function Documentation

DetId CaloSamples::id ( void   )  const [inline]

get the (generic) id

Definition at line 21 of file CaloSamples.h.

References id_.

Referenced by CaloHitResponse::add(), HcalAmplifier::amplify(), EcalElectronicsSim::amplify(), CastorAmplifier::amplify(), EcalMixingModuleValidation::computeSDBunchDigi(), HcalElectronicsSim::convert(), CastorElectronicsSim::convert(), EcalCoder::encode(), HcalCoderDb::fC2adc_(), CastorCoderDb::fC2adc_(), HPDNoiseGenerator::fC2pe(), operator<<(), CastorNominalCoderTemplate::process(), and HcalNominalCoderTemplate::process().

00021 { return id_; }

CaloSamples& CaloSamples::operator *= ( double  value  )  [inline]

scale all samples

Definition at line 38 of file CaloSamples.h.

References scale().

00038 { return scale(value); }

CaloSamples & CaloSamples::operator+= ( double  value  ) 

add a value to all samples

Definition at line 20 of file CaloSamples.cc.

References data_, i, and MAXSAMPLES.

00020                                                  {
00021   for (int i=0; i<MAXSAMPLES; i++) data_[i]+=value;
00022   return (*this);
00023 }

double CaloSamples::operator[] ( int  i  )  const [inline]

const operator to access samples

Definition at line 28 of file CaloSamples.h.

References data_.

00028 { return data_[i]; }

double& CaloSamples::operator[] ( int  i  )  [inline]

mutable operator to access samples

Definition at line 26 of file CaloSamples.h.

References data_.

00026 { return data_[i]; }

int CaloSamples::presamples (  )  const [inline]

access presample information

Definition at line 31 of file CaloSamples.h.

References presamples_.

Referenced by CaloHitResponse::add(), HcalCoderDb::fC2adc_(), CastorCoderDb::fC2adc_(), CastorNominalCoderTemplate::process(), and HcalNominalCoderTemplate::process().

00031 { return presamples_; }

CaloSamples & CaloSamples::scale ( double  value  ) 

multiply each item by this value

Definition at line 15 of file CaloSamples.cc.

References data_, i, and MAXSAMPLES.

Referenced by operator *=().

00015                                             {
00016   for (int i=0; i<MAXSAMPLES; i++) data_[i]*=value;
00017   return (*this);
00018 }

void CaloSamples::setPresamples ( int  pre  ) 

set presample information

Definition at line 11 of file CaloSamples.cc.

References presamples_.

Referenced by CastorNominalCoder::adc2fC(), HcalNominalCoder::adc2fC(), HcalCoderDb::adc2fC_(), and CastorCoderDb::adc2fC_().

00011                                        {
00012   presamples_=pre;
00013 }

int CaloSamples::size ( void   )  const [inline]

get the size

Definition at line 24 of file CaloSamples.h.

References size_.

Referenced by CaloHitResponse::add(), HcalAmplifier::amplify(), CastorAmplifier::amplify(), EcalCoder::analogToDigital(), ESElectronicsSim::analogToDigital(), ESElectronicsSimFast::analogToDigital(), HcalElectronicsSim::convert(), CastorElectronicsSim::convert(), HcalMTCCMonitor::dumpDigi(), ESElectronicsSim::encode(), EcalCoder::encode(), ESElectronicsSimFast::fastEncode(), HcalCoderDb::fC2adc_(), CastorCoderDb::fC2adc_(), GlobalDigisAnalyzer::fillHCal(), GlobalDigisProducer::fillHCal(), CaloHitResponse::makeAnalogSignal(), operator<<(), CastorNominalCoderTemplate::process(), HcalNominalCoderTemplate::process(), HcalMTCCMonitor::processEvent(), HcalDigiTester::reco(), HcalSimpleRecAlgoImpl::reco(), CastorSimpleRecAlgoImpl::reco(), HcalSimpleRecAlgo::reconstruct(), and ESElectronicsSimFast::standEncode().

00024 { return size_; }


Member Data Documentation

double CaloSamples::data_[MAXSAMPLES] [private]

Definition at line 46 of file CaloSamples.h.

Referenced by CaloSamples(), operator+=(), operator[](), and scale().

DetId CaloSamples::id_ [private]

Definition at line 45 of file CaloSamples.h.

Referenced by id().

const int CaloSamples::MAXSAMPLES = 10 [static]

Definition at line 43 of file CaloSamples.h.

Referenced by CaloSamples(), EcalMixingModuleValidation::computeSDBunchDigi(), EcalCorrelatedNoiseMatrix::EcalCorrelatedNoiseMatrix(), operator+=(), and scale().

int CaloSamples::presamples_ [private]

Definition at line 47 of file CaloSamples.h.

Referenced by presamples(), and setPresamples().

int CaloSamples::size_ [private]

Definition at line 47 of file CaloSamples.h.

Referenced by size().


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