CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_1/src/DQM/EcalBarrelMonitorTasks/interface/IntegrityTask.h

Go to the documentation of this file.
00001 #ifndef IntegrityTask_H
00002 #define IntegrityTask_H
00003 
00004 #include "DQM/EcalCommon/interface/DQWorkerTask.h"
00005 
00006 #include "DataFormats/DetId/interface/DetIdCollection.h"
00007 #include "DataFormats/EcalDetId/interface/EcalDetIdCollections.h"
00008 
00009 namespace ecaldqm {
00010 
00011   class IntegrityTask : public DQWorkerTask {
00012   public:
00013     IntegrityTask(const edm::ParameterSet &, const edm::ParameterSet&);
00014     ~IntegrityTask();
00015 
00016     void bookMEs();
00017 
00018     void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &);
00019 
00020     void analyze(const void*, Collections);
00021 
00022     void runOnErrors(const DetIdCollection &, Collections);
00023     void runOnErrors(const EcalElectronicsIdCollection &, Collections);
00024 
00025     enum MESets {
00026       kByLumi,
00027       kTotal,
00028       kGain,
00029       kChId,
00030       kGainSwitch,
00031       kBlockSize,
00032       kTowerId,
00033       kFEDNonFatal,
00034       nMESets
00035     };
00036 
00037     static void setMEData(std::vector<MEData>&);
00038 
00039   private:
00040     int hltTaskMode_; // 0 -> Do not produce FED plots; 1 -> Only produce FED plots; 2 -> Do both
00041     std::string hltTaskFolder_;
00042   };
00043 
00044   inline void IntegrityTask::analyze(const void* _p, Collections _collection){
00045     switch(_collection){
00046     case kGainErrors:
00047     case kChIdErrors:
00048     case kGainSwitchErrors:
00049       runOnErrors(*static_cast<const DetIdCollection*>(_p), _collection);
00050       break;
00051     case kTowerIdErrors:
00052     case kBlockSizeErrors:
00053       runOnErrors(*static_cast<const EcalElectronicsIdCollection*>(_p), _collection);
00054       break;
00055     default:
00056       break;
00057     }
00058   }
00059 
00060 }
00061 
00062 #endif
00063