CMS 3D CMS Logo

HcalTPGCompressor.cc
Go to the documentation of this file.
3 
5 }
6 
7 void HcalTPGCompressor::compress(const IntegerCaloSamples& ics, const std::vector<int>& fineGrain, HcalTriggerPrimitiveDigi& digi) const {
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 }
13 
14 HcalTriggerPrimitiveSample HcalTPGCompressor::compress(const HcalTrigTowerDetId& id, unsigned int sample, bool fineGrain) const {
15  return coder_->hcalCompress(id, sample, fineGrain);
16 }
int i
Definition: DBlmapReader.cc:9
void setSample(int i, const HcalTriggerPrimitiveSample &sam)
int presamples() const
access presample information
int size() const
get the size
HcalTPGCompressor(const CaloTPGTranscoder *coder)
void compress(const IntegerCaloSamples &ics, const std::vector< int > &fineGrain, HcalTriggerPrimitiveDigi &digi) const
virtual HcalTriggerPrimitiveSample hcalCompress(const HcalTrigTowerDetId &id, unsigned int sample, int fineGrain) const =0
Compression from linear samples+fine grain in the HTR.
DetId id() const
get the (generic) id
const CaloTPGTranscoder * coder_