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 
22 
23 #include "TH2F.h"
24 
25 #include <iostream>
26 #include <string>
27 #include <map>
28 
29 class DTGeometry;
30 class DTChamberId;
31 
32 #include "TFile.h"
33 #include "TNtuple.h"
34 
36 public:
39 
41  ~DTOccupancyTest() override;
42 
43 protected:
45  void beginRun(edm::Run const &run, edm::EventSetup const &context) override;
46 
48  void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override;
49 
51 
54  edm::LuminosityBlock const &,
55  edm::EventSetup const &) override;
56 
57 private:
59  void bookHistos(DQMStore::IBooker &, const int wheelId, std::string folder, std::string histoTag);
60 
62  std::string getMEName(std::string histoTag, const DTChamberId &chId);
63 
64  int getIntegral(TH2F *histo, int, int, int, int, bool);
65 
66  // Run the test on the occupancy histos
67  int runOccupancyTest(TH2F *histo, const DTChamberId &chId, float &chamberPercentage);
68 
69  std::string topFolder() const;
70 
71  int nevents;
72 
75 
76  // wheel summary histograms
77  std::map<int, MonitorElement *> wheelHistos;
80 
81  std::set<DTLayerId> monitoredLayers;
82 
83  int lsCounter;
84  int nMinEvts;
87 
89  TFile *rootFile;
90  TNtuple *ntuple;
91  bool tpMode;
92 
97 
99 
102 };
103 
104 #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