test
CMS 3D CMS Logo

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

#include <HcalTPGCompressor.h>

Public Member Functions

void compress (const IntegerCaloSamples &ics, const std::vector< int > &fineGrain, HcalTriggerPrimitiveDigi &digi) const
 
HcalTriggerPrimitiveSample compress (const HcalTrigTowerDetId &id, unsigned int sample, bool fineGrain) const
 
 HcalTPGCompressor (const CaloTPGTranscoder *coder)
 

Private Attributes

const CaloTPGTranscodercoder_
 

Detailed Description

Author
J. Mans - Minnesota

Definition at line 12 of file HcalTPGCompressor.h.

Constructor & Destructor Documentation

HcalTPGCompressor::HcalTPGCompressor ( const CaloTPGTranscoder coder)

Definition at line 4 of file HcalTPGCompressor.cc.

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

Member Function Documentation

void HcalTPGCompressor::compress ( const IntegerCaloSamples ics,
const std::vector< int > &  fineGrain,
HcalTriggerPrimitiveDigi digi 
) const

Definition at line 7 of file HcalTPGCompressor.cc.

References coder_, CaloTPGTranscoder::hcalCompress(), i, IntegerCaloSamples::id(), IntegerCaloSamples::presamples(), HcalTriggerPrimitiveDigi::setPresamples(), HcalTriggerPrimitiveDigi::setSample(), HcalTriggerPrimitiveDigi::setSize(), and IntegerCaloSamples::size().

Referenced by HcalTriggerPrimitiveAlgo::analyze(), HcalTriggerPrimitiveAlgo::analyzeHF(), and HcalTriggerPrimitiveAlgo::analyzeHFV1().

7  {
8  digi.setSize(ics.size());
9  digi.setPresamples(ics.presamples());
10  for (int i=0; i<ics.size(); i++)
11  digi.setSample(i,coder_->hcalCompress(ics.id(),ics[i],fineGrain[i]));
12 }
int i
Definition: DBlmapReader.cc:9
virtual HcalTriggerPrimitiveSample hcalCompress(const HcalTrigTowerDetId &id, unsigned int sample, int fineGrain) const =0
Compression from linear samples+fine grain in the HTR.
void setSample(int i, const HcalTriggerPrimitiveSample &sam)
int presamples() const
access presample information
int size() const
get the size
DetId id() const
get the (generic) id
const CaloTPGTranscoder * coder_
HcalTriggerPrimitiveSample HcalTPGCompressor::compress ( const HcalTrigTowerDetId id,
unsigned int  sample,
bool  fineGrain 
) const

Definition at line 14 of file HcalTPGCompressor.cc.

References coder_, and CaloTPGTranscoder::hcalCompress().

14  {
15  return coder_->hcalCompress(id, sample, fineGrain);
16 }
virtual HcalTriggerPrimitiveSample hcalCompress(const HcalTrigTowerDetId &id, unsigned int sample, int fineGrain) const =0
Compression from linear samples+fine grain in the HTR.
const CaloTPGTranscoder * coder_

Member Data Documentation

const CaloTPGTranscoder* HcalTPGCompressor::coder_
private

Definition at line 18 of file HcalTPGCompressor.h.

Referenced by compress().