CMS 3D CMS Logo

EcalTPGCompressor.cc
Go to the documentation of this file.
3 
5 }
6 
7 void EcalTPGCompressor::compress(const IntegerCaloSamples& ics, const std::vector<bool>& fineGrain, EcalTriggerPrimitiveDigi& digi) const {
8  digi.setSize(ics.size());
9  for (int i=0; i<ics.size(); i++)
10  digi.setSample(i,coder_->ecalCompress(ics.id(),ics[i],fineGrain[i]));
11 }
12 
13 EcalTriggerPrimitiveSample EcalTPGCompressor::compress(const EcalTrigTowerDetId& id, unsigned int sample, bool fineGrain) const {
14  return coder_->ecalCompress(id, sample, fineGrain);
15 }
EcalTPGCompressor(const CaloTPGTranscoder *coder)
int size() const
get the size
void setSample(int i, const EcalTriggerPrimitiveSample &sam)
void compress(const IntegerCaloSamples &ics, const std::vector< bool > &fineGrain, EcalTriggerPrimitiveDigi &digi) const
const CaloTPGTranscoder * coder_
virtual EcalTriggerPrimitiveSample ecalCompress(const EcalTrigTowerDetId &id, unsigned int sample, bool fineGrain) const =0
Compression from linear samples+fine grain in the ECAL.
DetId id() const
get the (generic) id