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
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) {}
const CaloTPGTranscoder * coder_

Member Function Documentation

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

Definition at line 6 of file HcalTPGCompressor.cc.

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

Referenced by HcalTriggerPrimitiveAlgo::analyze(), HcalTriggerPrimitiveAlgo::analyzeHF(), HcalTriggerPrimitiveAlgo::analyzeHF2016(), HcalTriggerPrimitiveAlgo::analyzeHFQIE10(), and HcalTriggerPrimitiveAlgo::analyzeQIE11().

8  {
9  digi.setSize(ics.size());
10  digi.setPresamples(ics.presamples());
11  for (int i = 0; i < ics.size(); i++)
12  digi.setSample(i, coder_->hcalCompress(ics.id(), ics[i], fineGrain[i]));
13 }
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 15 of file HcalTPGCompressor.cc.

References coder_, and CaloTPGTranscoder::hcalCompress().

17  {
18  return coder_->hcalCompress(id, sample, fineGrain);
19 }
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 19 of file HcalTPGCompressor.h.

Referenced by compress().