CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/SimCalorimetry/HcalZeroSuppressionAlgos/interface/HcalZeroSuppressionAlgo.h

Go to the documentation of this file.
00001 #ifndef SimCalorimetry_HcalZeroSuppressionAlgos_HCALZEROSUPPESSIONALGO_H
00002 #define SimCalorimetry_HcalZeroSuppressionAlgos_HCALZEROSUPPESSIONALGO_H 1
00003 
00004 #include "DataFormats/HcalDigi/interface/HcalDigiCollections.h"
00005 #include "CalibFormats/HcalObjects/interface/HcalDbService.h"
00006 #include "CalibFormats/HcalObjects/interface/HcalDbRecord.h"
00007 
00015 class HcalDbService;
00016 
00017 class HcalZeroSuppressionAlgo {
00018 public:
00019   void suppress(const HBHEDigiCollection& input, HBHEDigiCollection& output);
00020   void suppress(const HODigiCollection& input, HODigiCollection& output);
00021   void suppress(const HFDigiCollection& input, HFDigiCollection& output);
00022   virtual bool shouldKeep(const HBHEDataFrame& digi) const = 0;
00023   virtual bool shouldKeep(const HODataFrame& digi) const = 0;
00024   virtual bool shouldKeep(const HFDataFrame& digi) const = 0;
00025   void setDbService(const HcalDbService* db) { m_dbService=db; }
00026   void clearDbService() { m_dbService=0; }
00027   //  template <class DIGI> bool keepMe(const DIGI& inp, int threshold);
00028 
00029 protected:
00030   HcalZeroSuppressionAlgo(bool markAndPass);
00031   const HcalDbService* m_dbService;
00032   
00033 private:
00034   bool m_markAndPass;
00035 };
00036 
00037 #endif