Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef CSCMonitorModule_H
00021 #define CSCMonitorModule_H
00022
00024 #include <iostream>
00025 #include <cstring>
00026 #include <vector>
00027 #include <map>
00028 #include <set>
00029
00031 #include <FWCore/Framework/interface/EDAnalyzer.h>
00032 #include <FWCore/ParameterSet/interface/ParameterSet.h>
00033 #include <DQMServices/Core/interface/DQMStore.h>
00034 #include <DQMServices/Core/interface/MonitorElement.h>
00035 #include <FWCore/ServiceRegistry/interface/Service.h>
00036 #include <FWCore/Framework/interface/ESHandle.h>
00037 #include <FWCore/Framework/interface/EventSetup.h>
00038
00040 #include "DataFormats/MuonDetId/interface/CSCDetId.h"
00041 #include "CondFormats/CSCObjects/interface/CSCCrateMap.h"
00042 #include "CondFormats/DataRecord/interface/CSCCrateMapRcd.h"
00043 #include "DataFormats/Scalers/interface/DcsStatus.h"
00044
00046 #include "DQM/CSCMonitorModule/interface/CSCDQM_Logger.h"
00047 #include "DQM/CSCMonitorModule/interface/CSCDQM_Configuration.h"
00048 #include "DQM/CSCMonitorModule/interface/CSCDQM_Dispatcher.h"
00049
00051 #include "DQM/CSCMonitorModule/interface/CSCMonitorObject.h"
00052
00054 static const char INPUT_TAG_LABEL[] = "source";
00055 static const char DIR_EVENTINFO[] = "CSC/EventInfo/";
00056 static const char DIR_DCSINFO[] = "CSC/EventInfo/DCSContents/";
00057 static const char DIR_DAQINFO[] = "CSC/EventInfo/DAQContents/";
00058 static const char DIR_CRTINFO[] = "CSC/EventInfo/CertificationContents/";
00059
00060 static const unsigned int MIN_CRATE_ID = 1;
00061 static const unsigned int MAX_CRATE_ID = 60;
00062 static const unsigned int MIN_DMB_SLOT = 1;
00063 static const unsigned int MAX_DMB_SLOT = 10;
00064
00069 class CSCMonitorModule: public edm::EDAnalyzer, public cscdqm::MonitorObjectProvider {
00070
00075 public:
00076
00077 CSCMonitorModule(const edm::ParameterSet& ps);
00078 virtual ~CSCMonitorModule();
00079
00080 private:
00081
00082 cscdqm::Configuration config;
00083 cscdqm::Dispatcher *dispatcher;
00084 DQMStore *dbe;
00085 edm::InputTag inputTag;
00086 bool prebookEffParams;
00087 bool processDcsScalers;
00088
00090 const CSCCrateMap* pcrate;
00091
00096 public:
00097
00098 bool getCSCDetId(const unsigned int crateId, const unsigned int dmbId, CSCDetId& detId) const {
00099
00100 if (crateId < MIN_CRATE_ID || crateId > MAX_CRATE_ID || dmbId < MIN_DMB_SLOT || dmbId > MAX_DMB_SLOT) {
00101 return false;
00102 }
00103 detId = pcrate->detId(crateId, dmbId, 0, 0);
00104 return (detId.rawId() != 0);
00105 }
00106
00107 cscdqm::MonitorObject *bookMonitorObject (const cscdqm::HistoBookRequest& p_req);
00108
00113 protected:
00114
00115 void beginJob() { }
00116 void beginRun(const edm::Run& r, const edm::EventSetup& c);
00117 void setup() { }
00118 void analyze(const edm::Event& e, const edm::EventSetup& c);
00119 void beginLuminosityBlock(const edm::LuminosityBlock& lumiSeg, const edm::EventSetup& context) { }
00120 void endRun(const edm::Run& r, const edm::EventSetup& c) { }
00121 void endJob() { }
00122
00123 };
00124
00125 #endif