CMS 3D CMS Logo

DTOccupancyTest.h

Go to the documentation of this file.
00001 #ifndef DTOccupancyTest_H
00002 #define DTOccupancyTest_H
00003 
00004 
00016 #include "FWCore/Framework/interface/Frameworkfwd.h"
00017 #include <FWCore/Framework/interface/EDAnalyzer.h>
00018 #include <FWCore/Framework/interface/ESHandle.h>
00019 #include "DQMServices/Core/interface/MonitorElement.h"
00020 #include <DataFormats/MuonDetId/interface/DTLayerId.h>
00021 
00022 #include "TH2F.h"
00023 
00024 #include <iostream>
00025 #include <string>
00026 #include <map>
00027 
00028 class DTGeometry;
00029 class DTChamberId;
00030 class DQMStore;
00031 
00032 #include "TFile.h"
00033 #include "TNtuple.h"
00034 
00035 class DTOccupancyTest: public edm::EDAnalyzer{
00036 
00037 public:
00038 
00040   DTOccupancyTest(const edm::ParameterSet& ps);
00041   
00043   virtual ~DTOccupancyTest();
00044 
00045 protected:
00046 
00048   void beginJob(const edm::EventSetup& context);
00049 
00050 
00052   void endJob();
00053 
00054   
00055   void beginLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& context) ;
00056 
00058   void endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& context);
00059 
00060 
00062   void analyze(const edm::Event& event, const edm::EventSetup& context);
00063 
00064 private:
00065 
00067   void bookHistos(const int wheelId, std::string folder, std::string histoTag);
00068 
00070   std::string getMEName(std::string histoTag, const DTChamberId& chId);
00071 
00072   // Run the test on the occupancy histos
00073   int runOccupancyTest(TH2F *histo, const DTChamberId& chId);
00074 
00075   std::string topFolder() const;
00076 
00077   int nevents;
00078 
00079   DQMStore* dbe;
00080 
00081   edm::ESHandle<DTGeometry> muonGeom;
00082 
00083   // wheel summary histograms  
00084   std::map< int, MonitorElement* > wheelHistos;  
00085   MonitorElement* summaryHisto;
00086 
00087   std::set<DTLayerId> monitoredLayers;
00088 
00089   int lsCounter;
00090   
00091   bool writeRootFile;
00092   TFile *rootFile;
00093   TNtuple *ntuple;
00094   bool tpMode;
00095 
00096   bool runOnAllHitsOccupancies;
00097   bool runOnNoiseOccupancies;
00098   bool runOnInTimeOccupancies;
00099   std::string nameMonitoredHisto;
00100 
00101 };
00102 
00103 #endif

Generated on Tue Jun 9 17:32:35 2009 for CMSSW by  doxygen 1.5.4