CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
25 
26 #include <vector>
27 #include <string>
28 
29 class DQMStore;
30 class MonitorElement;
31 
32 
34 
35 public:
36  struct SumHistBinData {
37  std::string name;
38  std::vector<std::string> qTestPatterns;
39  };
40 
41  private:
42  DQMStore* dbe_; //dbe seems to be the standard name for this, I dont know why. We of course dont own it
43  std::string dirName_;
44  std::string egHLTSumHistName_;
45 
46  std::vector<std::string> eleHLTFilterNames_;//names of the filters monitored using electrons to make plots for
47  std::vector<std::string> phoHLTFilterNames_;//names of the filters monitored using photons to make plots for
48  std::vector<std::string> egHLTFiltersToMon_;//names of the filters to include in summary histogram
49 
50  std::vector<std::string> eleHLTFilterNamesForSumBit_; //names of the filters to include in the summary bit
51  std::vector<std::string> phoHLTFilterNamesForSumBit_; //names of the filters to include in the summary bit
52 
53 
54  //the name of the bin label and the regex pattern to search for the quality tests to pass
55  std::vector<SumHistBinData> egHLTSumHistXBins_;
56  std::vector<SumHistBinData> eleQTestsForSumBit_;
57  std::vector<SumHistBinData> phoQTestsForSumBit_;
58 
62 
63  std::vector<std::string> egHLTFiltersToMonPaths_;
65 
67  bool isSetup_;
68  std::string hltTag_;
69 
70 
71  //disabling copying/assignment (in theory this is copyable but lets not just in case)
74 
75  public:
78 
79 
80  virtual void beginJob();
81  virtual void analyze(const edm::Event&, const edm::EventSetup&); //dummy
82  virtual void endJob();
83  virtual void beginRun(const edm::Run& run, const edm::EventSetup& c);
84  virtual void endRun(const edm::Run& run, const edm::EventSetup& c);
85 
86 
87  virtual void beginLuminosityBlock(const edm::LuminosityBlock& lumiSeg,const edm::EventSetup& context){}
88  // DQM Client Diagnostic
89  virtual void endLuminosityBlock(const edm::LuminosityBlock& lumiSeg,const edm::EventSetup& c);
90 
91 
92 
93 private:
94  void runClient_(); //master function which runs the client
95 
97 
98  //takes a vector of strings of the form stringA:stringB and splits them into pairs containing stringA stringB
99  void splitStringsToPairs_(const std::vector<std::string>& stringsToSplit,std::vector<std::pair<std::string,std::string> >& splitStrings);
100 
101  MonitorElement* getEgHLTSumHist_(); //makes our histogram
102  //gets a list of filters we are monitoring
103  //the reason we pass in ele and photon triggers seperately and then combine rather than passsing in a combined
104  //list is to be able to share the declearation with the rest of the E/g HLT DQM Offline modules
105  void getEgHLTFiltersToMon_(std::vector<std::string>& filterNames)const;
106 
107 
108 
109  //gets the quality tests for the filter matching pattern, if any of them fail it returns a 0, otherwise a 1
110  //it does not care if the tests exist and in this situation will return a 1 (default to good)
111  int getQTestResults_(const std::string& filterName,const std::vector<std::string>& pattern)const;
112 
113  static void fillQTestData_(const edm::ParameterSet& iConfig,std::vector<SumHistBinData>& qTests,const std::string& label);
114 };
115 
116 #endif
std::vector< std::string > phoHLTFilterNamesForSumBit_
virtual void analyze(const edm::Event &, const edm::EventSetup &)
void splitStringsToPairs_(const std::vector< std::string > &stringsToSplit, std::vector< std::pair< std::string, std::string > > &splitStrings)
std::vector< std::string > egHLTFiltersToMonPaths_
void getEgHLTFiltersToMon_(std::vector< std::string > &filterNames) const
std::vector< std::string > eleHLTFilterNamesForSumBit_
std::vector< SumHistBinData > egHLTSumHistXBins_
std::vector< std::string > eleHLTFilterNames_
std::vector< SumHistBinData > eleQTestsForSumBit_
std::vector< std::string > egHLTFiltersToMon_
virtual void beginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &context)
virtual void beginRun(const edm::Run &run, const edm::EventSetup &c)
virtual void endLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
EgHLTOfflineSummaryClient & operator=(const EgHLTOfflineSummaryClient &rhs)
std::vector< SumHistBinData > phoQTestsForSumBit_
virtual void endRun(const edm::Run &run, const edm::EventSetup &c)
std::vector< std::string > phoHLTFilterNames_
int getQTestResults_(const std::string &filterName, const std::vector< std::string > &pattern) const
EgHLTOfflineSummaryClient(const EgHLTOfflineSummaryClient &rhs)
int getQTestBinData_(const edm::ParameterSet &)
Definition: Run.h:33
static void fillQTestData_(const edm::ParameterSet &iConfig, std::vector< SumHistBinData > &qTests, const std::string &label)