CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/DQM/EcalBarrelMonitorTasks/interface/TimingTask.h

Go to the documentation of this file.
00001 #ifndef TimingTask_H
00002 #define TimingTask_H
00003 
00004 #include "DQM/EcalCommon/interface/DQWorkerTask.h"
00005 
00006 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
00007 
00008 namespace ecaldqm {
00009 
00010   class TimingTask : public DQWorkerTask {
00011   public:
00012     TimingTask(const edm::ParameterSet &, const edm::ParameterSet &);
00013     ~TimingTask();
00014 
00015     bool filterRunType(const std::vector<short>&);
00016 
00017     void analyze(const void*, Collections);
00018 
00019     void runOnRecHits(const EcalRecHitCollection &, Collections);
00020 
00021     enum MESets {
00022       kTimeMap,
00023       kTimeAmp,
00024       kTimeAll,
00025       kTimeAllMap,
00026       kTimeAmpAll,
00027       nMESets
00028     };
00029 
00030     static void setMEData(std::vector<MEData>&);
00031 
00032   private:
00033     float energyThresholdEB_;
00034     float energyThresholdEE_;
00035   };
00036 
00037   inline void TimingTask::analyze(const void* _p, Collections _collection){
00038     switch(_collection){
00039     case kEBRecHit:
00040     case kEERecHit:
00041       runOnRecHits(*static_cast<const EcalRecHitCollection*>(_p), _collection);
00042       break;
00043     default:
00044       break;
00045     }
00046   }
00047 
00048 }
00049 
00050 #endif
00051