CMS 3D CMS Logo

L1TOccupancyClientHistogramService.h
Go to the documentation of this file.
1 #ifndef DQM_L1TMONITORCLIENT_L1TOCCUPANCYCLIENTHISTOGRAMSERVICE_H
2 #define DQM_L1TMONITORCLIENT_L1TOCCUPANCYCLIENTHISTOGRAMSERVICE_H
3 
10 
12 
13 #include <memory>
14 #include <iostream>
15 #include <fstream>
16 #include <string>
17 #include <map>
18 #include <TH1F.h>
19 #include <TH1D.h>
20 #include <TH2F.h>
21 
23 public:
26 
28  L1TOccupancyClientHistogramService(const edm::ParameterSet& iParameters, DQMStore::IBooker& ibooker, bool iVerbose);
29 
30  //loads the histo of test into histos_
32 
33  //updates histo (i.e. calculates differential to previous LS and adds it to cumulatice histo)
35  void updateHistogramEndRun(std::string iHistName);
36 
37  //resets the cumulative histo (after performing the test in L1TOccupancyClient)
39 
40  // Masks channels of histo in specific strip to perform L1TOccupancyClient::getAvrg()
41  int maskBins(std::string test, TH2F* histo, int strip, int axis);
42 
43  bool isMasked(std::string test, int x, int y); //checks if cells is masked
44  bool isStripMasked(std::string test, int binStrip, int axis); //checks if a whole strip is masked
45 
47  const std::vector<edm::ParameterSet>& mask); //set masked channels specified in python
48  std::vector<std::pair<int, int> > getMaskedBins(std::string test); //returns masked channels of test
49 
50  unsigned int getNBinsMasked(std::string test); // Get number of masked bins in test
51  unsigned int getNBinsHistogram(std::string test); // Get actual number of bins in test (i.e. nBins-nMaskedBins)
52  TH2F* getDifferentialHistogram(std::string test); // Get cumulative histogram
54  std::string iHistName,
55  std::string iHistLocation); // Get rebinned version of the hist
56 
57  std::vector<int> getLSCertification(std::string iHistName); // Get list of tested LS for test iHistName
58 
59 private:
60  //DQMStore* mDBE; // storage service
61  bool mVerbose; // verbose mode
62  edm::ParameterSet mParameters; // Copy of the parameters
63 
64  // Maps
65  std::map<std::string, bool> mHistValid; // Map of valid histograms (i.e. that exist)
66  std::map<std::string, std::pair<TH2F*, TH2F*> > mHistograms; // The cumulative histograms
67  std::map<std::string, std::vector<std::pair<int, int> >*> mMaskedBins; // Marked Bins
68  std::map<std::string, TH2F*> mHistDiffMinus1; // Last already closed LS Block Histogram Diff
69  std::map<std::string, std::vector<int> > mLSListDiff; // LS list of current block
70  std::map<std::string, std::vector<int> > mLSListDiffMinus1; // LS list of block -1
71 };
72 
73 #endif
L1TOccupancyClientHistogramService::mHistograms
std::map< std::string, std::pair< TH2F *, TH2F * > > mHistograms
Definition: L1TOccupancyClientHistogramService.h:66
L1TOccupancyClientHistogramService::resetHisto
void resetHisto(std::string test)
Definition: L1TOccupancyClientHistogramService.cc:415
DDAxes::y
L1TOccupancyClientHistogramService::updateHistogramEndRun
void updateHistogramEndRun(std::string iHistName)
Definition: L1TOccupancyClientHistogramService.cc:401
LuminosityBlock.h
digitizers_cfi.strip
strip
Definition: digitizers_cfi.py:19
L1TOccupancyClientHistogramService::mLSListDiffMinus1
std::map< std::string, std::vector< int > > mLSListDiffMinus1
Definition: L1TOccupancyClientHistogramService.h:70
L1TOccupancyClientHistogramService::mHistDiffMinus1
std::map< std::string, TH2F * > mHistDiffMinus1
Definition: L1TOccupancyClientHistogramService.h:68
timingPdfMaker.histo
histo
Definition: timingPdfMaker.py:278
DQMStore.h
dqm::legacy::MonitorElement
Definition: MonitorElement.h:462
EDAnalyzer.h
DDAxes::x
L1TOccupancyClientHistogramService
Definition: L1TOccupancyClientHistogramService.h:22
L1TOccupancyClientHistogramService::getNBinsHistogram
unsigned int getNBinsHistogram(std::string test)
Definition: L1TOccupancyClientHistogramService.cc:45
MakerMacros.h
test
Definition: SmallWORMDict.h:13
L1TOccupancyClientHistogramService::updateHistogramEndLS
void updateHistogramEndLS(DQMStore::IGetter &igetter, std::string test, std::string histo, int iLS)
Definition: L1TOccupancyClientHistogramService.cc:374
dqm::legacy::DQMStore
Definition: DQMStore.h:728
L1TOccupancyClientHistogramService::getNBinsMasked
unsigned int getNBinsMasked(std::string test)
Definition: L1TOccupancyClientHistogramService.cc:175
L1TOccupancyClientHistogramService::getDifferentialHistogram
TH2F * getDifferentialHistogram(std::string test)
Definition: L1TOccupancyClientHistogramService.cc:449
L1TOccupancyClientHistogramService::MonitorElement
dqm::legacy::MonitorElement MonitorElement
Definition: L1TOccupancyClientHistogramService.h:25
L1TOccupancyClientHistogramService::mParameters
edm::ParameterSet mParameters
Definition: L1TOccupancyClientHistogramService.h:62
L1TOccupancyClientHistogramService::isMasked
bool isMasked(std::string test, int x, int y)
Definition: L1TOccupancyClientHistogramService.cc:232
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
L1TOccupancyClientHistogramService::getRebinnedHistogram
TH2F * getRebinnedHistogram(DQMStore::IGetter &igetter, std::string iHistName, std::string iHistLocation)
Definition: L1TOccupancyClientHistogramService.cc:327
L1TOccupancyClientHistogramService::loadHisto
TH2F * loadHisto(DQMStore::IGetter &igetter, std::string test, std::string histo)
Definition: L1TOccupancyClientHistogramService.cc:294
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
L1TOccupancyClientHistogramService::mMaskedBins
std::map< std::string, std::vector< std::pair< int, int > > * > mMaskedBins
Definition: L1TOccupancyClientHistogramService.h:67
L1TOccupancyClientHistogramService::getLSCertification
std::vector< int > getLSCertification(std::string iHistName)
Definition: L1TOccupancyClientHistogramService.cc:439
L1TOccupancyClientHistogramService::getMaskedBins
std::vector< std::pair< int, int > > getMaskedBins(std::string test)
Definition: L1TOccupancyClientHistogramService.cc:163
Frameworkfwd.h
dqm::implementation::IGetter
Definition: DQMStore.h:484
L1TOccupancyClientHistogramService::L1TOccupancyClientHistogramService
L1TOccupancyClientHistogramService()
Definition: L1TOccupancyClientHistogramService.cc:18
L1TOccupancyClientHistogramService::isStripMasked
bool isStripMasked(std::string test, int binStrip, int axis)
Definition: L1TOccupancyClientHistogramService.cc:257
L1TOccupancyClientHistogramService::maskBins
int maskBins(std::string test, TH2F *histo, int strip, int axis)
Definition: L1TOccupancyClientHistogramService.cc:190
L1TOccupancyClientHistogramService::mVerbose
bool mVerbose
Definition: L1TOccupancyClientHistogramService.h:61
L1TOccupancyClientHistogramService::mHistValid
std::map< std::string, bool > mHistValid
Definition: L1TOccupancyClientHistogramService.h:65
dqm::implementation::IBooker
Definition: DQMStore.h:43
L1TOccupancyClientHistogramService::setMaskedBins
void setMaskedBins(std::string test, const std::vector< edm::ParameterSet > &mask)
Definition: L1TOccupancyClientHistogramService.cc:63
ParameterSet.h
L1TOccupancyClientHistogramService::DQMStore
dqm::legacy::DQMStore DQMStore
Definition: L1TOccupancyClientHistogramService.h:24
L1TOccupancyClientHistogramService::mLSListDiff
std::map< std::string, std::vector< int > > mLSListDiff
Definition: L1TOccupancyClientHistogramService.h:69