CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch2/src/DQM/DTMonitorClient/src/DTRunConditionVarClient.h

Go to the documentation of this file.
00001 #ifndef DTMonitorClient_DTRunConditionVarClient_H
00002 #define DTMonitorClient_DTRunConditionVarClient_H
00003 
00004 
00018 #include "FWCore/Framework/interface/Frameworkfwd.h"
00019 #include <FWCore/Framework/interface/EDAnalyzer.h>
00020 #include "DataFormats/Common/interface/Handle.h"
00021 #include <FWCore/Framework/interface/ESHandle.h>
00022 #include <FWCore/Framework/interface/Event.h>
00023 #include <FWCore/Framework/interface/MakerMacros.h>
00024 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00025 #include <FWCore/Framework/interface/LuminosityBlock.h>
00026 
00027 #include "CondFormats/DTObjects/interface/DTMtime.h"
00028 
00029 #include "DQMServices/Core/interface/DQMStore.h"
00030 #include "DQMServices/Core/interface/MonitorElement.h"
00031 #include "FWCore/ServiceRegistry/interface/Service.h"
00032 
00033 #include <memory>
00034 #include <iostream>
00035 #include <fstream>
00036 #include <string>
00037 #include <vector>
00038 #include <map>
00039 
00040 class DTGeometry;
00041 class DTChamberId;
00042 class DTLayerId;
00043 
00044 class DTRunConditionVarClient: public edm::EDAnalyzer{
00045 
00046   public:
00047 
00049     DTRunConditionVarClient(const edm::ParameterSet& ps);
00050 
00052     virtual ~DTRunConditionVarClient();
00053 
00054   protected:
00055 
00056     void beginJob();
00057     void analyze(const edm::Event& e, const edm::EventSetup& c);
00058     void endJob();
00059 
00061     void bookWheelHistos(std::string histoType, std::string subfolder, int wh, int nbins, float min, float max, bool isVDCorr=false);
00062 
00064     void beginLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& context);
00065     void endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& c);
00066 
00067     void beginRun(const edm::Run& run, const edm::EventSetup& setup);
00068     void endRun(edm::Run const& run, edm::EventSetup const& c);
00069 
00070     // 
00071     float varQuality(float var, float maxGood, float minBad);
00072 
00073     //
00074     void percDevVDrift(DTChamberId indexCh, float meanVD, float sigmaVD, float& devVD, float& errdevVD);
00075 
00076   private:
00077 
00078     MonitorElement* getChamberHistos(const DTChamberId&, std::string);
00079 
00080     int nevents;      
00081 
00082     float minRangeVDrift;
00083     float maxRangeVDrift; 
00084     float minRangeT0;
00085     float maxRangeT0;
00086 
00087     float maxGoodVDriftDev;
00088     float minBadVDriftDev; 
00089     float maxGoodT0;       
00090     float minBadT0;       
00091 
00092     float maxGoodVDriftSigma;
00093     float minBadVDriftSigma;
00094     float maxGoodT0Sigma;
00095     float minBadT0Sigma;
00096 
00097     edm::ESHandle<DTMtime> mTime;
00098     const DTMtime* mTimeMap_;
00099 
00100     DQMStore* theDbe;
00101 
00102     MonitorElement* glbVDriftSummary;
00103     MonitorElement* glbT0Summary;
00104 
00105     std::map<int, std::map<std::string, MonitorElement*> > wheelHistos;
00106     std::map<std::string, MonitorElement *> summaryHistos;
00107     std::map<std::string, MonitorElement *> allwheelHistos;
00108 
00109 };
00110 
00111 #endif