CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HcalDCSInfo.cc
Go to the documentation of this file.
4 
7 
9 
10 #include <iostream>
11 #include <iomanip>
12 #include <stdio.h>
13 #include <string>
14 #include <sstream>
15 #include <math.h>
16 
17 //
18 // -- Constructor
19 //
21 
22  debug_ = pSet.getUntrackedParameter<int>("debug",0);
23  rootFolder_ = pSet.getUntrackedParameter<std::string>("subSystemFolder","Hcal");
24  // Create MessageSender
25  edm::LogInfo( "HcalDCSInfo") << "HcalDCSInfo::Creating HcalDCSInfo ";
26 
27  // get back-end interface
29 }
30 
32 {
33  edm::LogInfo("HcalDCSInfo") << "HcalDCSInfo::Deleting HcalDCSInfo ";
34 
35 } // destructor
36 
37 //
38 // -- Begin Job
39 //
41 
42 
43  dqmStore_->setCurrentFolder(rootFolder_+"/EventInfo/");
44 
45  // Book MEs for Hcal DCS fractions
46 
47  DCSFraction_= dqmStore_->bookFloat("DCSSummary");
48 
49  DCSSummaryMap_ = dqmStore_->book2D("DCSSummaryMap","HcalDCSSummaryMap",7,0.,7.,1,0.,1.);
51  DCSSummaryMap_->setBinLabel(1,"HB");
52  DCSSummaryMap_->setBinLabel(2,"HE");
53  DCSSummaryMap_->setBinLabel(3,"HO");
54  DCSSummaryMap_->setBinLabel(4,"HF");
55  DCSSummaryMap_->setBinLabel(5,"H00");
56  DCSSummaryMap_->setBinLabel(6,"H012");
57  DCSSummaryMap_->setBinLabel(7,"HFlumi");
58  DCSSummaryMap_->setBinLabel(1,"Status",2);
59 
60  dqmStore_->setCurrentFolder(rootFolder_+"/EventInfo/DCSContents");
61  DCSFractionHB_= dqmStore_->bookFloat("Hcal_HB");
62  DCSFractionHE_= dqmStore_->bookFloat("Hcal_HE");
63  DCSFractionHO_= dqmStore_->bookFloat("Hcal_HO");
64  DCSFractionHF_= dqmStore_->bookFloat("Hcal_HF");
65  DCSFractionHO0_= dqmStore_->bookFloat("Hcal_HO0");
66  DCSFractionHO12_= dqmStore_->bookFloat("Hcal_HO12");
67  DCSFractionHFlumi_= dqmStore_->bookFloat("Hcal_HFlumi");
68 
69 }
70 
71 //
72 // -- Begin Run
73 //
74 void HcalDCSInfo::beginRun(edm::Run const& run, edm::EventSetup const& eSetup)
75 {
76  edm::LogInfo ("HcalDCSInfo") <<"HcalDCSInfo:: Begining of Run";
77  return;
78 }
79 
80 //
81 // -- Analyze
82 //
84 {
85 }
86 
87 //
88 // -- Begin Luminosity Block
89 //
91 {
92  edm::LogInfo ("HcalDCSInfo") <<"HcalDCSInfo:: Luminosity Block";
93 }
94 
96 {
97  edm::LogInfo ("HcalDCSInfo") <<"HcalDCSInfo:: Luminosity Block";
98 
99  // Fill them with -1 to start with
100 
101  for (int ii=0;ii<7;ii++) DCSSummaryMap_->setBinContent(ii+1,1,-1.0);
102  DCSFraction_->Fill(-1.0);
103  DCSFractionHB_->Fill(-1.0);
104  DCSFractionHE_->Fill(-1.0);
105  DCSFractionHO_->Fill(-1.0);
106  DCSFractionHF_->Fill(-1.0);
107  DCSFractionHO0_->Fill(-1.0);
108  DCSFractionHO12_->Fill(-1.0);
109  DCSFractionHFlumi_->Fill(-1.0);
110 
111  // Fill them with 1
112 
113  for (int ii=0;ii<7;ii++) DCSSummaryMap_->setBinContent(ii+1,1,1.0);
114  DCSFraction_->Fill(1.0);
115  DCSFractionHB_->Fill(1.0);
116  DCSFractionHE_->Fill(1.0);
117  DCSFractionHO_->Fill(1.0);
118  DCSFractionHF_->Fill(1.0);
119  DCSFractionHO0_->Fill(1.0);
120  DCSFractionHO12_->Fill(1.0);
121  DCSFractionHFlumi_->Fill(1.0);
122 }
123 
T getUntrackedParameter(std::string const &, T const &) const
void setBinContent(int binx, double content)
set content of bin (1-D)
void beginJob()
BeginJob.
Definition: HcalDCSInfo.cc:40
void analyze(edm::Event const &, edm::EventSetup const &)
Analyze.
Definition: HcalDCSInfo.cc:83
void setAxisRange(double xmin, double xmax, int axis=1)
set x-, y- or z-axis range (axis=1, 2, 3 respectively)
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
void beginRun(edm::Run const &run, edm::EventSetup const &eSetup)
Begin Run.
Definition: HcalDCSInfo.cc:74
HcalDCSInfo(const edm::ParameterSet &ps)
Constructor.
Definition: HcalDCSInfo.cc:20
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)
void beginLuminosityBlock(edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &iSetup)
Begin Of Luminosity.
Definition: HcalDCSInfo.cc:90
virtual ~HcalDCSInfo()
Destructor.
Definition: HcalDCSInfo.cc:31
int ii
Definition: cuy.py:588
MonitorElement * bookFloat(const char *name)
Book float.
Definition: DQMStore.cc:943
void Fill(long long x)
MonitorElement * DCSFraction_
Definition: HcalDCSInfo.h:78
virtual void endLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &)
End Luminosity Block.
Definition: HcalDCSInfo.cc:95
std::string rootFolder_
Definition: HcalDCSInfo.h:88
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
MonitorElement * DCSFractionHO_
Definition: HcalDCSInfo.h:81
MonitorElement * DCSFractionHO0_
Definition: HcalDCSInfo.h:83
MonitorElement * DCSFractionHB_
Definition: HcalDCSInfo.h:79
MonitorElement * DCSFractionHE_
Definition: HcalDCSInfo.h:80
MonitorElement * DCSFractionHO12_
Definition: HcalDCSInfo.h:84
MonitorElement * DCSSummaryMap_
Definition: HcalDCSInfo.h:77
MonitorElement * DCSFractionHFlumi_
Definition: HcalDCSInfo.h:85
DQMStore * dqmStore_
Definition: HcalDCSInfo.h:76
MonitorElement * DCSFractionHF_
Definition: HcalDCSInfo.h:82
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:1134
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:719
Definition: Run.h:41