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 
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
DTOccupancyTestML::topFolder
std::string topFolder(bool isBooking) const
Definition: DTOccupancyTestML.cc:369
DQMEDHarvester.h
DTGeometry
Definition: DTGeometry.h:28
DTOccupancyTestML::bookHistos
void bookHistos(DQMStore::IBooker &, const int wheelId, std::string folder, std::string histoTag)
book the summary histograms
Definition: DTOccupancyTestML.cc:217
TensorFlow.h
DTOccupancyTestML::nameMonitoredHisto
std::string nameMonitoredHisto
Definition: DTOccupancyTestML.h:104
DTOccupancyTestML::DTOccupancyTestML
DTOccupancyTestML(const edm::ParameterSet &ps)
Constructor.
Definition: DTOccupancyTestML.cc:30
ESHandle.h
DTOccupancyTestML::nMinEvtsPC
int nMinEvtsPC
Definition: DTOccupancyTestML.h:93
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
edm::Run
Definition: Run.h:45
DTLayerId.h
printsummarytable.folder
folder
Definition: printsummarytable.py:7
DTOccupancyTestML::interpolateLayers
std::vector< float > interpolateLayers(std::vector< float > const &inputs, int size, int targetSize)
Definition: DTOccupancyTestML.cc:351
timingPdfMaker.histo
histo
Definition: timingPdfMaker.py:279
DTOccupancyTestML::dqmEndLuminosityBlock
void dqmEndLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override
DQM Client Diagnostic.
Definition: DTOccupancyTestML.cc:74
DTOccupancyTestML::getIntegral
int getIntegral(TH2F *histo, int, int, int, int, bool)
Definition: DTOccupancyTestML.cc:263
DQMStore.h
dqm::legacy::MonitorElement
Definition: MonitorElement.h:461
EDAnalyzer.h
DTOccupancyTestML::runOnInTimeOccupancies
bool runOnInTimeOccupancies
Definition: DTOccupancyTestML.h:103
FileInPath.h
DTOccupancyTestML
Definition: DTOccupancyTestML.h:38
DTOccupancyTestML::tpMode
bool tpMode
Definition: DTOccupancyTestML.h:99
DTOccupancyTestML::nChannelDead
int nChannelDead
Definition: DTOccupancyTestML.h:109
DTOccupancyTestML::glbSummaryHisto
MonitorElement * glbSummaryHisto
Definition: DTOccupancyTestML.h:87
DTOccupancyTestML::summaryHisto
MonitorElement * summaryHisto
Definition: DTOccupancyTestML.h:86
DTOccupancyTestML::getMEName
std::string getMEName(std::string histoTag, const DTChamberId &chId)
Get the ME name.
Definition: DTOccupancyTestML.cc:244
DTOccupancyTestML::nZeroEvtsPC
int nZeroEvtsPC
Definition: DTOccupancyTestML.h:94
edm::ESHandle< DTGeometry >
DTOccupancyTestML::runOccupancyTest
int runOccupancyTest(TH2F *histo, const DTChamberId &chId, float &chamberPercentage, tensorflow::GraphDef *graphDef, tensorflow::Session *session)
Definition: DTOccupancyTestML.cc:278
DTOccupancyTestML::nChannelTotal
int nChannelTotal
Definition: DTOccupancyTestML.h:108
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
DTOccupancyTestML::nevents
int nevents
Definition: DTOccupancyTestML.h:80
edm::ParameterSet
Definition: ParameterSet.h:36
DTOccupancyTestML::rootFile
TFile * rootFile
Definition: DTOccupancyTestML.h:97
dtResolutionTest_cfi.histoTag
histoTag
Definition: dtResolutionTest_cfi.py:21
PixelMapPlotter.inputs
inputs
Definition: PixelMapPlotter.py:490
edm::EventSetup
Definition: EventSetup.h:57
DTOccupancyTestML::beginRun
void beginRun(edm::Run const &run, edm::EventSetup const &context) override
BeginRun.
Definition: DTOccupancyTestML.cc:67
DQMEDHarvester
Definition: DQMEDHarvester.py:1
writedatasetfile.run
run
Definition: writedatasetfile.py:27
DTOccupancyTestML::runOnAllHitsOccupancies
bool runOnAllHitsOccupancies
Definition: DTOccupancyTestML.h:101
DTOccupancyTestML::runOnNoiseOccupancies
bool runOnNoiseOccupancies
Definition: DTOccupancyTestML.h:102
DTOccupancyTestML::nMinEvts
int nMinEvts
Definition: DTOccupancyTestML.h:92
Frameworkfwd.h
dqm::implementation::IGetter
Definition: DQMStore.h:484
DTOccupancyTestML::muonGeom
edm::ESHandle< DTGeometry > muonGeom
Definition: DTOccupancyTestML.h:82
dqm::implementation::IBooker
Definition: DQMStore.h:43
DTOccupancyTestML::bookingdone
bool bookingdone
Definition: DTOccupancyTestML.h:106
DTOccupancyTestML::monitoredLayers
std::set< DTLayerId > monitoredLayers
Definition: DTOccupancyTestML.h:89
DTOccupancyTestML::wheelHistos
std::map< int, MonitorElement * > wheelHistos
Definition: DTOccupancyTestML.h:85
DTOccupancyTestML::dqmEndJob
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
Endjob.
Definition: DTOccupancyTestML.cc:206
DTChamberId
Definition: DTChamberId.h:14
DTOccupancyTestML::writeRootFile
bool writeRootFile
Definition: DTOccupancyTestML.h:96
DTOccupancyTestML::~DTOccupancyTestML
~DTOccupancyTestML() override
Destructor.
Definition: DTOccupancyTestML.cc:63
DTOccupancyTestML::ntuple
TNtuple * ntuple
Definition: DTOccupancyTestML.h:98
DTOccupancyTestML::lsCounter
int lsCounter
Definition: DTOccupancyTestML.h:91
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443