CMS 3D CMS Logo

DTOccupancyTestML.h
Go to the documentation of this file.
1 #ifndef DTOccupancyTestML_H
2 #define DTOccupancyTestML_H
3 
21 
23 
25 
26 #include "TH2F.h"
27 
28 #include <iostream>
29 #include <string>
30 #include <map>
31 
32 class DTGeometry;
33 class DTChamberId;
34 
35 #include "TFile.h"
36 #include "TNtuple.h"
37 
39 public:
42 
44  ~DTOccupancyTestML() override;
45 
46 protected:
48  void beginRun(edm::Run const &run, edm::EventSetup const &context) override;
49 
51  void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override;
52 
54 
57  edm::LuminosityBlock const &,
58  edm::EventSetup const &) override;
59 
60 private:
63 
65  std::string getMEName(std::string histoTag, const DTChamberId &chId);
66 
67  int getIntegral(TH2F *histo, int, int, int, int, bool);
68 
69  // Run the test on the occupancy histos
70  int runOccupancyTest(TH2F *histo,
71  const DTChamberId &chId,
72  float &chamberPercentage,
73  tensorflow::GraphDef *graphDef,
74  tensorflow::Session *session);
75 
76  std::vector<float> interpolateLayers(std::vector<float> const &inputs, int size, int targetSize);
77 
78  std::string topFolder(bool isBooking) const;
79 
80  int nevents;
81 
83 
84  // wheel summary histograms
85  std::map<int, MonitorElement *> wheelHistos;
88 
89  std::set<DTLayerId> monitoredLayers;
90 
91  int lsCounter;
92  int nMinEvts;
95 
97  TFile *rootFile;
98  TNtuple *ntuple;
99  bool tpMode;
100 
105 
107 
110 };
111 
112 #endif
size
Write out results.
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
Endjob.
int getIntegral(TH2F *histo, int, int, int, int, bool)
void bookHistos(DQMStore::IBooker &, const int wheelId, std::string folder, std::string histoTag)
book the summary histograms
std::vector< float > interpolateLayers(std::vector< float > const &inputs, int size, int targetSize)
MonitorElement * summaryHisto
void dqmEndLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override
DQM Client Diagnostic.
std::string getMEName(std::string histoTag, const DTChamberId &chId)
Get the ME name.
void beginRun(edm::Run const &run, edm::EventSetup const &context) override
BeginRun.
std::string topFolder(bool isBooking) const
MonitorElement * glbSummaryHisto
int runOccupancyTest(TH2F *histo, const DTChamberId &chId, float &chamberPercentage, tensorflow::GraphDef *graphDef, tensorflow::Session *session)
std::set< DTLayerId > monitoredLayers
~DTOccupancyTestML() override
Destructor.
edm::ESHandle< DTGeometry > muonGeom
std::map< int, MonitorElement * > wheelHistos
std::string nameMonitoredHisto
DTOccupancyTestML(const edm::ParameterSet &ps)
Constructor.
Definition: Run.h:45