test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HcalTPGCompressor.cc
Go to the documentation of this file.
3 
5 }
6 
7 void HcalTPGCompressor::compress(const IntegerCaloSamples& ics, const std::vector<bool>& 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
virtual HcalTriggerPrimitiveSample hcalCompress(const HcalTrigTowerDetId &id, unsigned int sample, bool fineGrain) const =0
Compression from linear samples+fine grain in the HTR.
int size() const
get the size
HcalTPGCompressor(const CaloTPGTranscoder *coder)
void compress(const IntegerCaloSamples &ics, const std::vector< bool > &fineGrain, HcalTriggerPrimitiveDigi &digi) const
DetId id() const
get the (generic) id
const CaloTPGTranscoder * coder_