00001 #ifndef DQM_HCALMONITORTASKS_HCALBASEMONITOR_H
00002 #define DQM_HCALMONITORTASKS_HCALBASEMONITOR_H
00003
00004
00005 #define ETABINS 87
00006 #define PHIBINS 72
00007
00008 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00009 #include "DQMServices/Core/interface/DQMStore.h"
00010 #include "DataFormats/HcalDetId/interface/HcalDetId.h"
00011 #include "CalibFormats/HcalObjects/interface/HcalCoderDb.h"
00012 #include "CalibFormats/HcalObjects/interface/HcalCalibrations.h"
00013 #include "CalibFormats/HcalObjects/interface/HcalDbService.h"
00014 #include "CalibFormats/HcalObjects/interface/HcalDbRecord.h"
00015 #include "CondFormats/HcalObjects/interface/HcalQIECoder.h"
00016 #include "CalibFormats/HcalObjects/interface/HcalCoder.h"
00017 #include "TH1F.h"
00018 #include "TH2F.h"
00019 #include <map>
00020
00021 #include "DataFormats/HcalDigi/interface/HcalDigiCollections.h"
00022 #include "DataFormats/HcalRecHit/interface/HcalRecHitCollections.h"
00023 #include "EventFilter/HcalRawToDigi/interface/HcalDCCHeader.h"
00024 #include "CondFormats/HcalObjects/interface/HcalElectronicsMap.h"
00025 #include "FWCore/Utilities/interface/CPUTimer.h"
00026
00027 #include "DQMServices/Core/interface/DQMStore.h"
00028 #include "DQMServices/Core/interface/MonitorElement.h"
00029
00030 #include <iostream>
00031
00032
00033 #include "CalibFormats/HcalObjects/interface/HcalCalibrationWidths.h"
00034
00035 using namespace std;
00042 class HcalBaseMonitor {
00043 public:
00044 HcalBaseMonitor();
00045 virtual ~HcalBaseMonitor();
00046
00047 virtual void setup(const edm::ParameterSet& ps, DQMStore* dbe);
00048 virtual void done();
00049 virtual void clearME();
00050
00051 void setVerbosity(int verb) { fVerbosity = verb; }
00052 int getVerbosity() const { return fVerbosity; }
00053
00054 void setDiagnostics(bool myval) { makeDiagnostics=myval;}
00055 bool getDiagnostics() const { return makeDiagnostics;}
00056
00057 bool vetoCell(HcalDetId id);
00058 bool validDetId(HcalSubdetector subdet, int tower_ieta, int tower_iphi, int depth);
00059
00060
00061
00062 void setupDepthHists2D(MonitorElement* &h, std::vector<MonitorElement*> &hh, char* Name, char* Units);
00063 void setupDepthHists2D(std::vector<MonitorElement*> &hh, char* Name, char* Units);
00064
00065 void setupDepthHists2D(MonitorElement* &h, std::vector<MonitorElement*> &hh, char* Name, char* Units,
00066 int nbinsx, int lowboundx, int highboundx,
00067 int nbinsy, int lowboundy, int highboundy);
00068
00069 void setupDepthHists2D(std::vector<MonitorElement*> &hh, char* Name, char* Units,
00070 int nbinsx, int lowboundx, int highboundx,
00071 int nbinsy, int lowboundy, int highboundy);
00072
00073 void setMinMaxHists2D(std::vector<MonitorElement*> &hh, double min, double max);
00074
00075
00076 void setupDepthHists1D(MonitorElement* &h, std::vector<MonitorElement*> &hh, char* Name, char* Units, int lowbound, int highbound, int Nbins);
00077 void setupDepthHists1D(std::vector<MonitorElement*> &hh, char* Name, char* Units, int lowbound, int highbound, int Nbins);
00078 void setMinMaxHists1D(std::vector<MonitorElement*> &hh, double min, double max);
00079 void FillUnphysicalHEHFBins(std::vector<MonitorElement*> &hh);
00080 void FillUnphysicalHEHFBins(MonitorElement* hh);
00081
00082 protected:
00083
00084 int fVerbosity;
00085 bool showTiming;
00086 bool dump2database;
00087 int checkNevents_;
00088
00089 double etaMax_, etaMin_;
00090 double phiMax_, phiMin_;
00091 int etaBins_, phiBins_;
00092 double minErrorFlag_;
00093 bool checkHB_, checkHE_, checkHO_, checkHF_;
00094
00095 edm::CPUTimer cpu_timer;
00096
00097 bool makeDiagnostics;
00098 bool fillUnphysical_;
00099
00100 DQMStore* m_dbe;
00101 vector<string> hotCells_;
00102 string rootFolder_;
00103 string baseFolder_;
00104
00105 };
00106
00107 #endif