CMS 3D CMS Logo

EgHLTOfflineSummaryClient.h
Go to the documentation of this file.
1 #ifndef DQMOFFLINE_TRIGGER_EGHLTOFFLINESUMMARYCLIENT
2 #define DQMOFFLINE_TRIGGER_EGHLTOFFLINESUMMARYCLIENT
3 
4 // -*- C++ -*-
5 //
6 // Package: EgammaHLTOfflineSummaryClient
7 // Class: EgammaHLTOffline
8 //
9 /*
10  Description: This module makes the summary histogram of the E/g HLT offline
11 
12  Notes:
13  this takes the results of the quality tests and produces a module summarising each one. There are two summary histograms, one with each E/g trigger which is either green or red and one eta/phi bad/good region
14 
15 */
16 //
17 // Original Author: Sam Harper
18 // Created: March 2009
19 //
20 //
21 //
22 
26 
27 #include <vector>
28 #include <string>
29 
31 public:
34 
35  struct SumHistBinData {
37  std::vector<std::string> qTestPatterns;
38  };
39 
40 private:
41  DQMStore* dbe_; //dbe seems to be the standard name for this, I dont know why. We of course dont own it
44 
45  std::vector<std::string> eleHLTFilterNames_; //names of the filters monitored using electrons to make plots for
46  std::vector<std::string> phoHLTFilterNames_; //names of the filters monitored using photons to make plots for
47  std::vector<std::string> egHLTFiltersToMon_; //names of the filters to include in summary histogram
48 
49  std::vector<std::string> eleHLTFilterNamesForSumBit_; //names of the filters to include in the summary bit
50  std::vector<std::string> phoHLTFilterNamesForSumBit_; //names of the filters to include in the summary bit
51 
52  //the name of the bin label and the regex pattern to search for the quality tests to pass
53  std::vector<SumHistBinData> egHLTSumHistXBins_;
54  std::vector<SumHistBinData> eleQTestsForSumBit_;
55  std::vector<SumHistBinData> phoQTestsForSumBit_;
56 
60 
61  std::vector<std::string> egHLTFiltersToMonPaths_;
63 
65  bool isSetup_;
67 
68  //disabling copying/assignment (in theory this is copyable but lets not just in case)
71 
72 public:
74  ~EgHLTOfflineSummaryClient() override;
75 
76  void beginJob() override;
77  void analyze(const edm::Event&, const edm::EventSetup&) override; //dummy
78  void endJob() override;
79  void beginRun(const edm::Run& run, const edm::EventSetup& c) override;
80  void endRun(const edm::Run& run, const edm::EventSetup& c) override;
81 
82  void beginLuminosityBlock(const edm::LuminosityBlock& lumiSeg, const edm::EventSetup& context) override {}
83  // DQM Client Diagnostic
84  void endLuminosityBlock(const edm::LuminosityBlock& lumiSeg, const edm::EventSetup& c) override;
85 
86 private:
87  void runClient_(); //master function which runs the client
88 
90 
91  //takes a vector of strings of the form stringA:stringB and splits them into pairs containing stringA stringB
92  void splitStringsToPairs_(const std::vector<std::string>& stringsToSplit,
93  std::vector<std::pair<std::string, std::string> >& splitStrings);
94 
95  MonitorElement* getEgHLTSumHist_(); //makes our histogram
96  //gets a list of filters we are monitoring
97  //the reason we pass in ele and photon triggers seperately and then combine rather than passsing in a combined
98  //list is to be able to share the declearation with the rest of the E/g HLT DQM Offline modules
99  void getEgHLTFiltersToMon_(std::vector<std::string>& filterNames) const;
100 
101  //gets the quality tests for the filter matching pattern, if any of them fail it returns a 0, otherwise a 1
102  //it does not care if the tests exist and in this situation will return a 1 (default to good)
103  int getQTestResults_(const std::string& filterName, const std::vector<std::string>& pattern) const;
104 
105  static void fillQTestData_(const edm::ParameterSet& iConfig,
106  std::vector<SumHistBinData>& qTests,
107  const std::string& label);
108 };
109 
110 #endif
EgHLTOfflineSummaryClient::runClientEndLumiBlock_
bool runClientEndLumiBlock_
Definition: EgHLTOfflineSummaryClient.h:57
EgHLTOfflineSummaryClient::eleHLTFilterNamesForSumBit_
std::vector< std::string > eleHLTFilterNamesForSumBit_
Definition: EgHLTOfflineSummaryClient.h:49
EgHLTOfflineSummaryClient::getQTestResults_
int getQTestResults_(const std::string &filterName, const std::vector< std::string > &pattern) const
Definition: EgHLTOfflineSummaryClient.cc:222
EgHLTOfflineSummaryClient::endLuminosityBlock
void endLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c) override
Definition: EgHLTOfflineSummaryClient.cc:102
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
edm::Run
Definition: Run.h:45
EgHLTOfflineSummaryClient::phoHLTFilterNamesForSumBit_
std::vector< std::string > phoHLTFilterNamesForSumBit_
Definition: EgHLTOfflineSummaryClient.h:50
DQMStore.h
dqm::legacy::MonitorElement
Definition: MonitorElement.h:461
EDAnalyzer.h
EgHLTOfflineSummaryClient::egHLTFiltersToMonPaths_
std::vector< std::string > egHLTFiltersToMonPaths_
Definition: EgHLTOfflineSummaryClient.h:61
EgHLTOfflineSummaryClient::beginJob
void beginJob() override
Definition: EgHLTOfflineSummaryClient.cc:59
EgHLTOfflineSummaryClient
Definition: EgHLTOfflineSummaryClient.h:30
edm::EDAnalyzer
Definition: EDAnalyzer.h:29
EgHLTOfflineSummaryClient::eleHLTFilterNames_
std::vector< std::string > eleHLTFilterNames_
Definition: EgHLTOfflineSummaryClient.h:45
dqm::legacy::DQMStore
Definition: DQMStore.h:727
EgHLTOfflineSummaryClient::endRun
void endRun(const edm::Run &run, const edm::EventSetup &c) override
Definition: EgHLTOfflineSummaryClient.cc:94
EgHLTOfflineSummaryClient::hltTag_
std::string hltTag_
Definition: EgHLTOfflineSummaryClient.h:66
EgHLTOfflineSummaryClient::~EgHLTOfflineSummaryClient
~EgHLTOfflineSummaryClient() override
EgHLTOfflineSummaryClient::fillQTestData_
static void fillQTestData_(const edm::ParameterSet &iConfig, std::vector< SumHistBinData > &qTests, const std::string &label)
Definition: EgHLTOfflineSummaryClient.cc:251
EgHLTOfflineSummaryClient::EgHLTOfflineSummaryClient
EgHLTOfflineSummaryClient(const EgHLTOfflineSummaryClient &rhs)
Definition: EgHLTOfflineSummaryClient.h:69
EgHLTOfflineSummaryClient::egHLTSumHistName_
std::string egHLTSumHistName_
Definition: EgHLTOfflineSummaryClient.h:43
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EgHLTOfflineSummaryClient::splitStringsToPairs_
void splitStringsToPairs_(const std::vector< std::string > &stringsToSplit, std::vector< std::pair< std::string, std::string > > &splitStrings)
Definition: EgHLTOfflineSummaryClient.cc:148
EgHLTOfflineSummaryClient::phoQTestsForSumBit_
std::vector< SumHistBinData > phoQTestsForSumBit_
Definition: EgHLTOfflineSummaryClient.h:55
EgHLTOfflineSummaryClient::isSetup_
bool isSetup_
Definition: EgHLTOfflineSummaryClient.h:65
edm::ParameterSet
Definition: ParameterSet.h:36
EgHLTOfflineSummaryClient::egHLTFiltersToMon_
std::vector< std::string > egHLTFiltersToMon_
Definition: EgHLTOfflineSummaryClient.h:47
EgHLTOfflineSummaryClient::endJob
void endJob() override
Definition: EgHLTOfflineSummaryClient.cc:61
EgHLTOfflineSummaryClient::MonitorElement
dqm::legacy::MonitorElement MonitorElement
Definition: EgHLTOfflineSummaryClient.h:32
EgHLTOfflineSummaryClient::getEgHLTFiltersToMon_
void getEgHLTFiltersToMon_(std::vector< std::string > &filterNames) const
Definition: EgHLTOfflineSummaryClient.cc:208
EgHLTOfflineSummaryClient::SumHistBinData
Definition: EgHLTOfflineSummaryClient.h:35
EgHLTOfflineSummaryClient::egHLTSumHistXBins_
std::vector< SumHistBinData > egHLTSumHistXBins_
Definition: EgHLTOfflineSummaryClient.h:53
EgHLTOfflineSummaryClient::eleQTestsForSumBit_
std::vector< SumHistBinData > eleQTestsForSumBit_
Definition: EgHLTOfflineSummaryClient.h:54
EgHLTOfflineSummaryClient::runClient_
void runClient_()
Definition: EgHLTOfflineSummaryClient.cc:107
topSingleLeptonDQM_PU_cfi.pattern
pattern
Definition: topSingleLeptonDQM_PU_cfi.py:39
EgHLTOfflineSummaryClient::operator=
EgHLTOfflineSummaryClient & operator=(const EgHLTOfflineSummaryClient &rhs)
Definition: EgHLTOfflineSummaryClient.h:70
edm::EventSetup
Definition: EventSetup.h:57
EgHLTOfflineSummaryClient::runClientEndJob_
bool runClientEndJob_
Definition: EgHLTOfflineSummaryClient.h:59
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
EgHLTOfflineSummaryClient::usePathNames_
bool usePathNames_
Definition: EgHLTOfflineSummaryClient.h:62
EgHLTOfflineSummaryClient::SumHistBinData::name
std::string name
Definition: EgHLTOfflineSummaryClient.h:36
EgHLTOfflineSummaryClient::runClientEndRun_
bool runClientEndRun_
Definition: EgHLTOfflineSummaryClient.h:58
pdwgDoubleElectron_cfi.filterName
filterName
Definition: pdwgDoubleElectron_cfi.py:7
EgHLTOfflineSummaryClient::getQTestBinData_
int getQTestBinData_(const edm::ParameterSet &)
writedatasetfile.run
run
Definition: writedatasetfile.py:27
EgHLTOfflineSummaryClient::beginLuminosityBlock
void beginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &context) override
Definition: EgHLTOfflineSummaryClient.h:82
Frameworkfwd.h
EgHLTOfflineSummaryClient::getEgHLTSumHist_
MonitorElement * getEgHLTSumHist_()
Definition: EgHLTOfflineSummaryClient.cc:165
EgHLTOfflineSummaryClient::DQMStore
dqm::legacy::DQMStore DQMStore
Definition: EgHLTOfflineSummaryClient.h:33
EgHLTOfflineSummaryClient::phoHLTFilterNames_
std::vector< std::string > phoHLTFilterNames_
Definition: EgHLTOfflineSummaryClient.h:46
edm::Event
Definition: Event.h:73
EgHLTOfflineSummaryClient::dirName_
std::string dirName_
Definition: EgHLTOfflineSummaryClient.h:42
label
const char * label
Definition: PFTauDecayModeTools.cc:11
EgHLTOfflineSummaryClient::SumHistBinData::qTestPatterns
std::vector< std::string > qTestPatterns
Definition: EgHLTOfflineSummaryClient.h:37
EgHLTOfflineSummaryClient::filterInactiveTriggers_
bool filterInactiveTriggers_
Definition: EgHLTOfflineSummaryClient.h:64
EgHLTOfflineSummaryClient::dbe_
DQMStore * dbe_
Definition: EgHLTOfflineSummaryClient.h:41
EgHLTOfflineSummaryClient::beginRun
void beginRun(const edm::Run &run, const edm::EventSetup &c) override
Definition: EgHLTOfflineSummaryClient.cc:66
EgHLTOfflineSummaryClient::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: EgHLTOfflineSummaryClient.cc:100