00001 #ifndef RecoEcal_EgammaClusterProducers_ExampleClusterProducer_h 00002 #define RecoEcal_EgammaClusterProducers_ExampleClusterProducer_h 00003 00013 #include "FWCore/Framework/interface/EDProducer.h" 00014 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00015 #include "FWCore/Framework/interface/Event.h" 00016 #include "FWCore/Framework/interface/EventSetup.h" 00017 00018 class ExampleClusterAlgo; 00019 00020 // ExampleClusterProducer inherits from EDProducer, so it can be a module: 00021 class ExampleClusterProducer : public edm::EDProducer { 00022 00023 public: 00024 00025 ExampleClusterProducer (const edm::ParameterSet& ps); 00026 ~ExampleClusterProducer(); 00027 00028 virtual void produce(edm::Event& evt, const edm::EventSetup& es); 00029 00030 private: 00031 00032 ExampleClusterAlgo* algo_; // algorithm doing the real work 00033 00034 std::string hitProducer_; // name of module/plugin/producer producing hits 00035 std::string hitCollection_; // secondary name given to collection of hits by hitProducer 00036 std::string clusterCollection_; // secondary name to be given to collection of cluster produced in this module 00037 00038 int nMaxPrintout_; // max # of printouts 00039 int nEvt_; // internal counter of events 00040 00041 bool counterExceeded() const { return ((nEvt_ > nMaxPrintout_) || (nMaxPrintout_ < 0)); } 00042 00043 00044 }; 00045 #endif