CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DTOccupancyTest.h
Go to the documentation of this file.
1 #ifndef DTOccupancyTest_H
2 #define DTOccupancyTest_H
3 
21 
22 #include "TH2F.h"
23 
24 #include <iostream>
25 #include <string>
26 #include <map>
27 
28 class DTGeometry;
29 class DTChamberId;
30 
31 #include "TFile.h"
32 #include "TNtuple.h"
33 
35 public:
38 
40  ~DTOccupancyTest() override;
41 
42 protected:
44  void beginRun(edm::Run const &run, edm::EventSetup const &context) override;
45 
47  void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override;
48 
50 
53  edm::LuminosityBlock const &,
54  edm::EventSetup const &) override;
55 
56 private:
58  void bookHistos(DQMStore::IBooker &, const int wheelId, std::string folder, std::string histoTag);
59 
61  std::string getMEName(std::string histoTag, const DTChamberId &chId);
62 
63  int getIntegral(TH2F *histo, int, int, int, int, bool);
64 
65  // Run the test on the occupancy histos
66  int runOccupancyTest(TH2F *histo, const DTChamberId &chId, float &chamberPercentage);
67 
68  std::string topFolder() const;
69 
70  int nevents;
71 
74 
75  // wheel summary histograms
76  std::map<int, MonitorElement *> wheelHistos;
79 
80  std::set<DTLayerId> monitoredLayers;
81 
82  int lsCounter;
83  int nMinEvts;
86 
88  TFile *rootFile;
89  TNtuple *ntuple;
90  bool tpMode;
91 
96 
98 
101 };
102 
103 #endif
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
Endjob.
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.
const DTGeometry * muonGeom
~DTOccupancyTest() override
Destructor.
std::set< DTLayerId > monitoredLayers
std::string topFolder() const
std::map< int, MonitorElement * > wheelHistos
edm::ESGetToken< DTGeometry, MuonGeometryRecord > muonGeomToken_
Definition: Run.h:45
MonitorElement * glbSummaryHisto