Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:07:19

0001 #ifndef EnergyTask_H
0002 #define EnergyTask_H
0003 
0004 #include "DQWorkerTask.h"
0005 
0006 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
0007 
0008 namespace ecaldqm {
0009 
0010   class EnergyTask : public DQWorkerTask {
0011   public:
0012     EnergyTask();
0013     ~EnergyTask() override {}
0014 
0015     bool filterRunType(short const*) override;
0016 
0017     void beginEvent(edm::Event const&, edm::EventSetup const&, bool const&, bool&) override;
0018     bool analyze(void const*, Collections) override;
0019 
0020     void runOnRecHits(EcalRecHitCollection const&);
0021 
0022   private:
0023     void setParams(edm::ParameterSet const&) override;
0024 
0025     bool isPhysicsRun_;
0026     //    float threshS9_;
0027   };
0028 
0029   inline bool EnergyTask::analyze(void const* _p, Collections _collection) {
0030     switch (_collection) {
0031       case kEBRecHit:
0032       case kEERecHit:
0033         if (_p)
0034           runOnRecHits(*static_cast<EcalRecHitCollection const*>(_p));
0035         return true;
0036         break;
0037       default:
0038         break;
0039     }
0040 
0041     return false;
0042   }
0043 
0044 }  // namespace ecaldqm
0045 
0046 #endif