CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
HLTEventInfoClient Class Reference

#include <HLTEventInfoClient.h>

Inheritance diagram for HLTEventInfoClient:
edm::EDAnalyzer

Public Member Functions

 HLTEventInfoClient (const edm::ParameterSet &ps)
 Constructor. More...
 
virtual ~HLTEventInfoClient ()
 Destructor. More...
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
 Fake Analyze. More...
 
void beginJob ()
 BeginJob. More...
 
void beginLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &context)
 
void beginRun (const edm::Run &r, const edm::EventSetup &c)
 BeginRun. More...
 
void endJob ()
 Endjob. More...
 
void endLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
 DQM Client Diagnostic. More...
 
void endRun (const edm::Run &r, const edm::EventSetup &c)
 EndRun. More...
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

Private Member Functions

TH1F * get1DHisto (std::string meName, DQMStore *dbi)
 
TProfile * get1DProfile (std::string meName, DQMStore *dbi)
 
TH2F * get2DHisto (std::string meName, DQMStore *dbi)
 
TProfile2D * get2DProfile (std::string meName, DQMStore *dbi)
 
void initialize ()
 

Private Attributes

int counterEvt_
 counter More...
 
int counterLS_
 
DQMStoredbe_
 
std::string monitorDir_
 
int nChannels
 prescale on number of events More...
 
edm::ParameterSet parameters_
 
int prescaleEvt_
 units of lumi sections More...
 
int prescaleLS_
 counter More...
 
Float_t reportSummary
 
MonitorElementreportSummary_
 
MonitorElementreportSummaryContent_ [20]
 
MonitorElementreportSummaryMap_
 
Float_t summaryContent [20]
 
Float_t summarySum
 
bool verbose_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 

Detailed Description

Definition at line 23 of file HLTEventInfoClient.h.

Constructor & Destructor Documentation

HLTEventInfoClient::HLTEventInfoClient ( const edm::ParameterSet ps)

Constructor.

Definition at line 30 of file HLTEventInfoClient.cc.

31 {
32  parameters_=ps;
33  initialize();
34 }
edm::ParameterSet parameters_
HLTEventInfoClient::~HLTEventInfoClient ( )
virtual

Destructor.

Definition at line 36 of file HLTEventInfoClient.cc.

References gather_cfg::cout.

36  {
37  if(verbose_) std::cout <<"[TriggerDQM]: ending... " << std::endl;
38 }
tuple cout
Definition: gather_cfg.py:41

Member Function Documentation

void HLTEventInfoClient::analyze ( const edm::Event e,
const edm::EventSetup c 
)
protectedvirtual

Fake Analyze.

Implements edm::EDAnalyzer.

Definition at line 226 of file HLTEventInfoClient.cc.

References gather_cfg::cout.

226  {
227 
228  counterEvt_++;
229  if (prescaleEvt_<1) return;
230  if (prescaleEvt_>0 && counterEvt_%prescaleEvt_ != 0) return;
231 
232  if(verbose_) std::cout << "HLTEventInfoClient::analyze" << std::endl;
233 
234 
235 }
int prescaleEvt_
units of lumi sections
tuple cout
Definition: gather_cfg.py:41
void HLTEventInfoClient::beginJob ( void  )
protectedvirtual

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 66 of file HLTEventInfoClient.cc.

References DQMStore::book2D(), DQMStore::bookFloat(), gather_cfg::cout, dbe_, MonitorElement::Fill(), DQMStore::get(), trackerHits::histo, gen::k, n, cmsCodeRules.cppFunctionSkipper::operator, DQMStore::removeElement(), MonitorElement::setAxisTitle(), and DQMStore::setCurrentFolder().

66  {
67 
68  if(verbose_) std::cout <<"[TriggerDQM]: Begin Job" << std::endl;
69  // get backendinterface
71 
72  dbe_->setCurrentFolder("HLT/EventInfo");
73 
74 // sprintf(histo, "reportSummary");
75  reportSummary_ = dbe_->get("HLT/EventInfo/reportSumamry");
76  if ( reportSummary_ ) {
78  }
79 
80  reportSummary_ = dbe_->bookFloat("reportSummary");
81 
82  int nSubsystems = 20;
83 
84  //initialize reportSummary to 1
86 
87  dbe_->setCurrentFolder("HLT/EventInfo/reportSummaryContents");
88 
89 
90  char histo[100];
91 
92  for (int n = 0; n < nSubsystems; n++) {
93 
94  switch(n){
95  case 0 : sprintf(histo,"hlt_dqm_EGamma"); break;
96  case 1 : sprintf(histo,"hlt_dqm_Muon"); break;
97  case 2 : sprintf(histo,"hlt_dqm_JetMet"); break;
98  case 3 : sprintf(histo,"hlt_dqm_BJets"); break;
99  case 4 : sprintf(histo,"hlt_dqm_Tau"); break;
100  case 5 : sprintf(histo,"hlt_dqm_Test1"); break;
101  case 6 : sprintf(histo,"hlt_dqm_Test2"); break;
102  case 7 : sprintf(histo,"hlt_dqm_Test3"); break;
103  case 8 : sprintf(histo,"hlt_dqm_Test4"); break;
104  case 9 : sprintf(histo,"hlt_dqm_Test5"); break;
105  case 10 : sprintf(histo,"hlt_dqm_Test6"); break;
106  case 11 : sprintf(histo,"hlt_dqm_Test7"); break;
107  case 12 : sprintf(histo,"hlt_dqm_Test8"); break;
108  case 13 : sprintf(histo,"hlt_dqm_Test9"); break;
109  case 14 : sprintf(histo,"hlt_dqm_Test10"); break;
110  case 15 : sprintf(histo,"hlt_dqm_Test11"); break;
111  case 16 : sprintf(histo,"hlt_dqm_Test12"); break;
112  case 17 : sprintf(histo,"hlt_dqm_Test13"); break;
113  case 18 : sprintf(histo,"hlt_dqm_Test14"); break;
114  case 19 : sprintf(histo,"hlt_dqm_Test15"); break;
115  }
116 
117 
118 
119 
120 
121 
122 
123 
124 
125 
126 
127 
128 
129 
130 
131 
132 
133 
134 
135 
136 
137 
138 
139 // if( reportSummaryContent_[i] = dbe_->get("HLT/EventInfo/reportSummaryContents/" + histo) )
140 // {
141 // dbe_->removeElement(reportSummaryContent_[i]->getName());
142 // }
143 
145  }
146 
147  //initialize reportSummaryContents to 1
148  for (int k = 0; k < nSubsystems; k++) {
149  summaryContent[k] = 1;
151  }
152 
153 
154  dbe_->setCurrentFolder("HLT/EventInfo");
155 
156  reportSummaryMap_ = dbe_->get("HLT/EventInfo/reportSummaryMap");
157  if ( reportSummaryMap_ ) {
159  }
160 
161 
162  reportSummaryMap_ = dbe_->book2D("reportSummaryMap", "reportSummaryMap", 1, 1, 2, 5, 1, 6);
165  reportSummaryMap_->setBinLabel(1,"EGAMMA",2);
166  reportSummaryMap_->setBinLabel(2,"MUON",2);
167  reportSummaryMap_->setBinLabel(3,"JETMET",2);
168  reportSummaryMap_->setBinLabel(4,"BJETS",2);
169  reportSummaryMap_->setBinLabel(5,"TAU",2);
170  reportSummaryMap_->setBinLabel(1," ",1);
171 
172 }
const std::string & getName(void) const
get name of ME
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
tuple histo
Definition: trackerHits.py:12
MonitorElement * bookFloat(const char *name)
Book float.
Definition: DQMStore.cc:451
void Fill(long long x)
MonitorElement * reportSummaryContent_[20]
MonitorElement * reportSummaryMap_
void removeElement(const std::string &name)
Definition: DQMStore.cc:2353
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1265
Float_t summaryContent[20]
int k[5][pyjets_maxn]
tuple cout
Definition: gather_cfg.py:41
MonitorElement * reportSummary_
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:642
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:232
void HLTEventInfoClient::beginLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup context 
)
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 179 of file HLTEventInfoClient.cc.

179  {
180  // optionally reset histograms here
181 }
void HLTEventInfoClient::beginRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

BeginRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 175 of file HLTEventInfoClient.cc.

175  {
176 }
void HLTEventInfoClient::endJob ( void  )
protectedvirtual

Endjob.

Reimplemented from edm::EDAnalyzer.

Definition at line 242 of file HLTEventInfoClient.cc.

242  {
243 }
void HLTEventInfoClient::endLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
protectedvirtual

DQM Client Diagnostic.

Reimplemented from edm::EDAnalyzer.

Definition at line 183 of file HLTEventInfoClient.cc.

References dbe_, DQMStore::get(), MonitorElement::getQReport(), QReport::getQTresult(), gen::k, and m.

184  {
185 
186  MonitorElement *Muon_QHist = dbe_->get("HLT/HLTMonMuon/Summary/Ratio_HLT_L1MuOpen");
187 
188  float muonResult = 0;
189 
190  if(Muon_QHist){
191  const QReport *Muon_QReport = Muon_QHist->getQReport("CompareHist_Shape");
192  if(Muon_QReport) muonResult = Muon_QReport->getQTresult();
193  }
194 
195  int nSubsystems = 20;
196  for (int k = 0; k < nSubsystems; k++) {
197  // mask all HLT applications
198  //if(k == 1 && muonResult != -1){
199  // summaryContent[k] = muonResult;
200  // reportSummaryContent_[k]->Fill(muonResult);
201  //}else{
202  summaryContent[k] = 1;
204  //}
205  }
206  summarySum = 0;
207 
208  for (int m = 0; m < nSubsystems; m++) {
210  }
211 
212 
213  reportSummary = summarySum / nSubsystems;;
215 
216 
222 
223 }
const QReport * getQReport(const std::string &qtname) const
get QReport corresponding to &lt;qtname&gt; (null pointer if QReport does not exist)
void setBinContent(int binx, double content)
set content of bin (1-D)
void Fill(long long x)
MonitorElement * reportSummaryContent_[20]
MonitorElement * reportSummaryMap_
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1265
Float_t summaryContent[20]
int k[5][pyjets_maxn]
float getQTresult(void) const
get test result i.e. prob value
Definition: QReport.h:20
MonitorElement * reportSummary_
void HLTEventInfoClient::endRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 238 of file HLTEventInfoClient.cc.

238  {
239 }
TH1F * HLTEventInfoClient::get1DHisto ( std::string  meName,
DQMStore dbi 
)
private

Definition at line 247 of file HLTEventInfoClient.cc.

References gather_cfg::cout, DQMStore::get(), MonitorElement::getTH1F(), and NULL.

248 {
249 
250  MonitorElement * me_ = dbi->get(meName);
251 
252  if (!me_) {
253  if(verbose_) std::cout << "ME NOT FOUND." << std::endl;
254  return NULL;
255  }
256 
257  return me_->getTH1F();
258 }
#define NULL
Definition: scimark2.h:8
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1265
TH1F * getTH1F(void) const
tuple cout
Definition: gather_cfg.py:41
TProfile * HLTEventInfoClient::get1DProfile ( std::string  meName,
DQMStore dbi 
)
private

Definition at line 291 of file HLTEventInfoClient.cc.

References gather_cfg::cout, DQMStore::get(), MonitorElement::getTProfile(), and NULL.

292 {
293 
294 
295  MonitorElement * me_ = dbi->get(meName);
296 
297  if (!me_) {
298  if(verbose_) std::cout << "ME NOT FOUND." << std::endl;
299  return NULL;
300  }
301 
302  return me_->getTProfile();
303 }
#define NULL
Definition: scimark2.h:8
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1265
TProfile * getTProfile(void) const
tuple cout
Definition: gather_cfg.py:41
TH2F * HLTEventInfoClient::get2DHisto ( std::string  meName,
DQMStore dbi 
)
private

Definition at line 260 of file HLTEventInfoClient.cc.

References gather_cfg::cout, DQMStore::get(), MonitorElement::getTH2F(), and NULL.

261 {
262 
263 
264  MonitorElement * me_ = dbi->get(meName);
265 
266  if (!me_) {
267  if(verbose_) std::cout << "ME NOT FOUND." << std::endl;
268  return NULL;
269  }
270 
271  return me_->getTH2F();
272 }
#define NULL
Definition: scimark2.h:8
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1265
tuple cout
Definition: gather_cfg.py:41
TH2F * getTH2F(void) const
TProfile2D * HLTEventInfoClient::get2DProfile ( std::string  meName,
DQMStore dbi 
)
private

Definition at line 276 of file HLTEventInfoClient.cc.

References gather_cfg::cout, DQMStore::get(), MonitorElement::getTProfile2D(), and NULL.

277 {
278 
279 
280  MonitorElement * me_ = dbi->get(meName);
281 
282  if (!me_) {
283  if(verbose_) std::cout << "ME NOT FOUND." << std::endl;
284  return NULL;
285  }
286 
287  return me_->getTProfile2D();
288 }
TProfile2D * getTProfile2D(void) const
#define NULL
Definition: scimark2.h:8
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1265
tuple cout
Definition: gather_cfg.py:41
void HLTEventInfoClient::initialize ( )
private

Definition at line 41 of file HLTEventInfoClient.cc.

References gather_cfg::cout, dbe_, and cmsCodeRules.cppFunctionSkipper::operator.

41  {
42 
43  counterLS_=0;
44  counterEvt_=0;
45 
46  // get back-end interface
48 
49  // base folder for the contents of this job
50  verbose_ = parameters_.getUntrackedParameter<bool>("verbose", false);
51 
52  monitorDir_ = parameters_.getUntrackedParameter<std::string>("monitorDir","");
53  if(verbose_) std::cout << "Monitor dir = " << monitorDir_ << std::endl;
54 
55  prescaleLS_ = parameters_.getUntrackedParameter<int>("prescaleLS", -1);
56  if(verbose_) std::cout << "DQM lumi section prescale = " << prescaleLS_ << " lumi section(s)"<< std::endl;
57 
58  prescaleEvt_ = parameters_.getUntrackedParameter<int>("prescaleEvt", -1);
59  if(verbose_) std::cout << "DQM event prescale = " << prescaleEvt_ << " events(s)"<< std::endl;
60 
61 
62 
63 }
T getUntrackedParameter(std::string const &, T const &) const
int prescaleEvt_
units of lumi sections
edm::ParameterSet parameters_
tuple cout
Definition: gather_cfg.py:41

Member Data Documentation

int HLTEventInfoClient::counterEvt_
private

counter

Definition at line 70 of file HLTEventInfoClient.h.

int HLTEventInfoClient::counterLS_
private

Definition at line 69 of file HLTEventInfoClient.h.

DQMStore* HLTEventInfoClient::dbe_
private

Definition at line 66 of file HLTEventInfoClient.h.

std::string HLTEventInfoClient::monitorDir_
private

Definition at line 67 of file HLTEventInfoClient.h.

int HLTEventInfoClient::nChannels
private

prescale on number of events

Definition at line 73 of file HLTEventInfoClient.h.

edm::ParameterSet HLTEventInfoClient::parameters_
private
int HLTEventInfoClient::prescaleEvt_
private

units of lumi sections

Definition at line 72 of file HLTEventInfoClient.h.

int HLTEventInfoClient::prescaleLS_
private

counter

Definition at line 71 of file HLTEventInfoClient.h.

Float_t HLTEventInfoClient::reportSummary
private

Definition at line 74 of file HLTEventInfoClient.h.

MonitorElement* HLTEventInfoClient::reportSummary_
private

Definition at line 79 of file HLTEventInfoClient.h.

MonitorElement* HLTEventInfoClient::reportSummaryContent_[20]
private

Definition at line 80 of file HLTEventInfoClient.h.

MonitorElement* HLTEventInfoClient::reportSummaryMap_
private

Definition at line 81 of file HLTEventInfoClient.h.

Float_t HLTEventInfoClient::summaryContent[20]
private

Definition at line 76 of file HLTEventInfoClient.h.

Float_t HLTEventInfoClient::summarySum
private

Definition at line 75 of file HLTEventInfoClient.h.

bool HLTEventInfoClient::verbose_
private

Definition at line 68 of file HLTEventInfoClient.h.