CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
EcalTPGCompressor Class Reference

#include <EcalTPGCompressor.h>

Public Member Functions

void compress (const IntegerCaloSamples &ics, const std::vector< bool > &fineGrain, EcalTriggerPrimitiveDigi &digi) const
 
EcalTriggerPrimitiveSample compress (const EcalTrigTowerDetId &id, unsigned int sample, bool fineGrain) const
 
 EcalTPGCompressor (const CaloTPGTranscoder *coder)
 

Private Attributes

const CaloTPGTranscodercoder_
 

Detailed Description

Author
J. Mans - Minnesota

Definition at line 12 of file EcalTPGCompressor.h.

Constructor & Destructor Documentation

EcalTPGCompressor::EcalTPGCompressor ( const CaloTPGTranscoder coder)

Definition at line 4 of file EcalTPGCompressor.cc.

4 : coder_(coder) {}
const CaloTPGTranscoder * coder_

Member Function Documentation

void EcalTPGCompressor::compress ( const IntegerCaloSamples ics,
const std::vector< bool > &  fineGrain,
EcalTriggerPrimitiveDigi digi 
) const

Definition at line 6 of file EcalTPGCompressor.cc.

References coder_, CaloTPGTranscoder::ecalCompress(), mps_fire::i, IntegerCaloSamples::id(), EcalTriggerPrimitiveDigi::setSample(), EcalTriggerPrimitiveDigi::setSize(), and IntegerCaloSamples::size().

8  {
9  digi.setSize(ics.size());
10  for (int i = 0; i < ics.size(); i++)
11  digi.setSample(i, coder_->ecalCompress(ics.id(), ics[i], fineGrain[i]));
12 }
int size() const
get the size
void setSample(int i, const EcalTriggerPrimitiveSample &sam)
virtual EcalTriggerPrimitiveSample ecalCompress(const EcalTrigTowerDetId &id, unsigned int sample, bool fineGrain) const =0
Compression from linear samples+fine grain in the ECAL.
const CaloTPGTranscoder * coder_
DetId id() const
get the (generic) id
EcalTriggerPrimitiveSample EcalTPGCompressor::compress ( const EcalTrigTowerDetId id,
unsigned int  sample,
bool  fineGrain 
) const

Definition at line 14 of file EcalTPGCompressor.cc.

References coder_, and CaloTPGTranscoder::ecalCompress().

16  {
17  return coder_->ecalCompress(id, sample, fineGrain);
18 }
virtual EcalTriggerPrimitiveSample ecalCompress(const EcalTrigTowerDetId &id, unsigned int sample, bool fineGrain) const =0
Compression from linear samples+fine grain in the ECAL.
const CaloTPGTranscoder * coder_

Member Data Documentation

const CaloTPGTranscoder* EcalTPGCompressor::coder_
private

Definition at line 21 of file EcalTPGCompressor.h.

Referenced by compress().