CMS 3D CMS Logo

DTOccupancyTest.h
Go to the documentation of this file.
1 #ifndef DTOccupancyTest_H
2 #define DTOccupancyTest_H
3 
4 
22 
24 
25 
26 #include "TH2F.h"
27 
28 #include <iostream>
29 #include <string>
30 #include <map>
31 
32 class DTGeometry;
33 class DTChamberId;
34 class DQMStore;
35 
36 #include "TFile.h"
37 #include "TNtuple.h"
38 
40 
41 public:
42 
45 
47  ~DTOccupancyTest() override;
48 
49 protected:
50 
52  void beginRun(edm::Run const& run, edm::EventSetup const& context) override ;
53 
55  void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override;
56 
58 
60 
61 private:
62 
64  void bookHistos(DQMStore::IBooker &, const int wheelId, std::string folder, std::string histoTag);
65 
67  std::string getMEName(std::string histoTag, const DTChamberId& chId);
68 
69  int getIntegral(TH2F *histo, int, int, int, int, bool);
70 
71  // Run the test on the occupancy histos
72  int runOccupancyTest(TH2F *histo, const DTChamberId& chId, float& chamberPercentage);
73 
74  std::string topFolder() const;
75 
76  int nevents;
77 
79 
80  // wheel summary histograms
81  std::map< int, MonitorElement* > wheelHistos;
84 
85  std::set<DTLayerId> monitoredLayers;
86 
87  int lsCounter;
88  int nMinEvts;
91 
93  TFile *rootFile;
94  TNtuple *ntuple;
95  bool tpMode;
96 
101 
103 
106 
107 };
108 
109 #endif
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
Endjob.
std::map< int, MonitorElement * > wheelHistos
int runOccupancyTest(TH2F *histo, const DTChamberId &chId, float &chamberPercentage)
MonitorElement * summaryHisto
std::string nameMonitoredHisto
int getIntegral(TH2F *histo, int, int, int, int, bool)
void dqmEndLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override
DQM Client Diagnostic.
DTOccupancyTest(const edm::ParameterSet &ps)
Constructor.
void bookHistos(DQMStore::IBooker &, const int wheelId, std::string folder, std::string histoTag)
book the summary histograms
std::string getMEName(std::string histoTag, const DTChamberId &chId)
Get the ME name.
bool runOnAllHitsOccupancies
void beginRun(edm::Run const &run, edm::EventSetup const &context) override
BeginRun.
edm::ESHandle< DTGeometry > muonGeom
~DTOccupancyTest() override
Destructor.
std::set< DTLayerId > monitoredLayers
std::string topFolder() const
Definition: Run.h:45
MonitorElement * glbSummaryHisto