CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch2/src/DQM/EcalCommon/interface/EcalDQMonitorTask.h

Go to the documentation of this file.
00001 #ifndef EcalDQMonitorTask_H
00002 #define EcalDQMonitorTask_H
00003 
00004 #include <map>
00005 
00006 #include "DQM/EcalCommon/interface/EcalDQMonitor.h"
00007 #include "DQM/EcalCommon/interface/Collections.h"
00008 
00009 #include "FWCore/Utilities/interface/InputTag.h"
00010 
00011 namespace edm{
00012   class ParameterSet;
00013   class Run;
00014   class LuminosityBlock;
00015   class Event;
00016   class EventSetup;
00017   class ConfigurationDescriptions;
00018 }
00019 
00020 namespace ecaldqm{
00021   class DQWorkerTask;
00022 }
00023 
00024 class EcalDQMonitorTask : public EcalDQMonitor {
00025  public:
00026   EcalDQMonitorTask(const edm::ParameterSet &);
00027   ~EcalDQMonitorTask();
00028 
00029   static void fillDescriptions(edm::ConfigurationDescriptions &);
00030 
00031  private:
00032   void beginRun(const edm::Run&, const edm::EventSetup&);
00033   void endRun(const edm::Run&, const edm::EventSetup&);
00034 
00035   void beginLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&);
00036   void endLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&);
00037 
00038   void analyze(const edm::Event&, const edm::EventSetup&);
00039 
00040   typedef void (EcalDQMonitorTask::*Processor)(const edm::Event&, ecaldqm::Collections);
00041 
00042   template <class C> void runOnCollection(const edm::Event&, ecaldqm::Collections);
00043 
00044   void formSchedule_(const std::vector<ecaldqm::Collections>&, const std::multimap<ecaldqm::Collections, ecaldqm::Collections>&);
00045 
00046   int ievt_;
00047   // list of workers
00048   std::vector<ecaldqm::DQWorkerTask*> workers_;
00049   // list of InputTags
00050   edm::InputTag collectionTags_[ecaldqm::nCollections];
00051   // schedule of collections to run
00052   std::vector<std::pair<Processor, ecaldqm::Collections> > schedule_;
00053   // which worker runs on each collection? this information is static within a job
00054   std::vector<ecaldqm::DQWorkerTask*> taskLists_[ecaldqm::nCollections];
00055   // which worker is enabled for this event?
00056   std::map<ecaldqm::DQWorkerTask*, bool> enabled_;
00057 
00058   std::map<ecaldqm::DQWorkerTask*, double> taskTimes_;
00059   bool evaluateTime_;
00060 
00061   bool allowMissingCollections_;
00062 };
00063 
00064 #endif