CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_1/src/DQM/BeamMonitor/plugins/BeamSpotProblemMonitor.h

Go to the documentation of this file.
00001 #ifndef BeamSpotProblemMonitor_H
00002 #define BeamSpotProblemMonitor_H
00003 
00012 // C++
00013 #include <string>
00014 // CMS
00015 #include "FWCore/Framework/interface/Frameworkfwd.h"
00016 #include "FWCore/Framework/interface/EDAnalyzer.h"
00017 #include "FWCore/Framework/interface/Event.h"
00018 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00019 #include "DQMServices/Core/interface/DQMStore.h"
00020 #include "DQMServices/Core/interface/MonitorElement.h"
00021 #include "RecoVertex/BeamSpotProducer/interface/BSTrkParameters.h"
00022 #include "RecoVertex/BeamSpotProducer/interface/BeamFitter.h"
00023 #include <fstream>
00024 
00025 
00026 //
00027 // class declaration
00028 //
00029 
00030 class BeamSpotProblemMonitor : public edm::EDAnalyzer {
00031   public:
00032 
00033     BeamSpotProblemMonitor( const edm::ParameterSet& );
00034     ~BeamSpotProblemMonitor();
00035 
00036   protected:
00037 
00038     //The order it runs
00039 
00040 
00041     // BeginJob
00042     void beginJob();
00043 
00044     // BeginRun
00045     void beginRun(const edm::Run& r, const edm::EventSetup& c);
00046     void analyze(const edm::Event& e, const edm::EventSetup& c) ;
00047     void beginLuminosityBlock(const edm::LuminosityBlock& lumiSeg,
00048         const edm::EventSetup& context) ;
00049     void endLuminosityBlock(const edm::LuminosityBlock& lumiSeg,
00050         const edm::EventSetup& c);
00051     // EndRun
00052     void endRun(const edm::Run& r, const edm::EventSetup& c);
00053     // Endjob
00054     void endJob(const edm::LuminosityBlock& lumiSeg, const edm::EventSetup& c);
00055 
00056   
00057   private:
00058 
00059     void FillPlots(const edm::LuminosityBlock& lumiSeg,int&,int&,int&);
00060     edm::ParameterSet parameters_;
00061     std::string monitorName_;
00062     edm::InputTag scalertag_; // scalar colleciton
00063     edm::InputTag trkSrc_; //  track collection
00064 
00065     int Ntracks_;
00066     int nCosmicTrk_;
00067     int fitNLumi_;
00068     int intervalInSec_;
00069     bool debug_;
00070     bool onlineMode_;
00071     bool doTest_;
00072     int  alarmONThreshold_;
00073     int  alarmOFFThreshold_;
00074 
00075     DQMStore* dbe_;
00076 
00077     int lastlumi_; // previous LS processed
00078     int nextlumi_; // next LS of Fit
00079     int nFitElements_;
00080     bool processed_;
00081 
00082     //Alarm Variable  
00083     bool ALARM_ON_;
00084     double BeamSpotStatus_;  
00085     int BeamSpotFromDB_;
00086     bool dcsTk[6];
00087 
00088     // MonitorElements:
00089     std::map<TString, MonitorElement*> hs;
00090     MonitorElement * BeamSpotError;
00091 
00092 };
00093 
00094 #endif
00095