CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_2_9_HLT1_bphpatch4/src/CalibFormats/HcalObjects/interface/HcalTPGCoder.h

Go to the documentation of this file.
00001 #ifndef CALIBFORMATS_HCALOBJECTS_HCALTPGCODER_H
00002 #define CALIBFORMATS_HCALOBJECTS_HCALTPGCODER_H 1
00003 
00004 #include "CalibFormats/CaloObjects/interface/IntegerCaloSamples.h"
00005 #include "DataFormats/HcalDigi/interface/HBHEDataFrame.h"
00006 #include "DataFormats/HcalDigi/interface/HFDataFrame.h"
00007 #include "DataFormats/HcalDigi/interface/HcalTriggerPrimitiveDigi.h"
00008 
00009 // forward declaration of EventSetup is all that is needed here
00010 namespace edm {
00011   class EventSetup; 
00012 }
00013 
00026 class HcalTPGCoder {
00027 public:
00028   virtual void adc2Linear(const HBHEDataFrame& df, IntegerCaloSamples& ics) const = 0;
00029   virtual void adc2Linear(const HFDataFrame& df, IntegerCaloSamples& ics) const = 0;
00030   virtual unsigned short adc2Linear(HcalQIESample sample,HcalDetId id) const = 0;
00031   unsigned short adc2Linear(unsigned char adc, HcalDetId id) const { return adc2Linear(HcalQIESample(adc,0,0,0),id); }
00032   virtual void compress(const IntegerCaloSamples& ics, const std::vector<bool>& featureBits, HcalTriggerPrimitiveDigi& tp) const = 0;
00033   virtual float getLUTPedestal(HcalDetId id) const = 0;
00034   virtual float getLUTGain(HcalDetId id) const = 0;
00038   virtual std::vector<unsigned short> getLinearizationLUT(HcalDetId id) const;
00039 };
00040 
00041 #endif