CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1ExtraRecoDQM.cc
Go to the documentation of this file.
1 
17 // this class header
19 
20 // system include files
21 #include <iostream>
22 #include <iomanip>
23 #include <memory>
24 #include <string>
25 
26 // user include files
28 
29 // constructor
31  //
32  m_retrieveL1Extra(
33  paramSet.getParameter<edm::ParameterSet> (
34  "L1ExtraInputTags")),
35  m_dirName(
36  paramSet.getUntrackedParameter("DirName",
37  std::string("L1T/L1ExtraRecoDQM"))),
38  //
39  m_nrBxInEventGmt(paramSet.getParameter<int> ("NrBxInEventGmt")),
40  m_nrBxInEventGct(paramSet.getParameter<int> ("NrBxInEventGct")),
41  //
42  m_dbe(0), m_resetModule(true), m_currentRun(-99),
43  //
44  m_nrEvJob(0), m_nrEvRun(0)
45 
46 {
47 
48  //
49  if ((m_nrBxInEventGmt > 0) && ((m_nrBxInEventGmt % 2) == 0)) {
51 
52  edm::LogInfo("L1ExtraRecoDQM")
53  << "\nWARNING: Number of bunch crossing to be monitored for GMT rounded to: "
55  << "\n The number must be an odd number!\n"
56  << std::endl;
57  }
58 
59  if ((m_nrBxInEventGct > 0) && ((m_nrBxInEventGct % 2) == 0)) {
61 
62  edm::LogInfo("L1ExtraRecoDQM")
63  << "\nWARNING: Number of bunch crossing to be monitored for GCT rounded to: "
65  << "\n The number must be an odd number!\n"
66  << std::endl;
67  }
68 
70  if (m_dbe == 0) {
71  edm::LogInfo("L1ExtraRecoDQM") << "\n Unable to get DQMStore service.";
72  } else {
73 
74  if (paramSet.getUntrackedParameter<bool> ("DQMStore", false)) {
75  m_dbe->setVerbose(0);
76  }
77 
79 
80  }
81 
82 }
83 
84 // destructor
86 
87  // empty
88 
89 }
90 
91 //
93 
94 }
95 
97  const edm::EventSetup& evSetup) {
98 
99  m_nrEvRun = 0;
100 
101  DQMStore* dbe = 0;
102  dbe = edm::Service<DQMStore>().operator->();
103 
104  // clean up directory
105  if (dbe) {
107  if (dbe->dirExists(m_dirName)) {
108  dbe->rmdir(m_dirName);
109  }
111  }
112 
113 }
114 
116  const edm::EventSetup& evSetup) {
117 
118  //
119 
120 
121 }
122 
123 
124 //
126  const edm::EventSetup& evSetup) {
127 
128  ++m_nrEvJob;
129  ++m_nrEvRun;
130 
131  //
132  m_retrieveL1Extra.retrieveL1ExtraObjects(iEvent, evSetup);
133 
134 }
135 
136 // end section
138  const edm::EventSetup& evSetup) {
139 
140  // empty
141 
142 }
143 
144 void L1ExtraRecoDQM::endRun(const edm::Run& run, const edm::EventSetup& evSetup) {
145 
146  //
147 
148 }
149 
151 
152  edm::LogInfo("L1ExtraRecoDQM")
153  << "\n\nTotal number of events analyzed in this job: " << m_nrEvJob
154  << "\n" << std::endl;
155 
156  return;
157 }
158 
159 //define this as a plug-in
T getUntrackedParameter(std::string const &, T const &) const
virtual void endLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &)
end section
void rmdir(const std::string &fullpath)
Definition: DQMStore.cc:2535
virtual void beginRun(const edm::Run &, const edm::EventSetup &)
virtual void analyze(const edm::Event &, const edm::EventSetup &)
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
virtual void endRun(const edm::Run &, const edm::EventSetup &)
virtual void beginJob()
int iEvent
Definition: GenABIO.cc:243
int m_nrBxInEventGmt
number of bunch crosses in event to be monitored
virtual ~L1ExtraRecoDQM()
virtual void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &)
L1RetrieveL1Extra m_retrieveL1Extra
input parameters
void setVerbose(unsigned level)
Definition: DQMStore.cc:398
std::string m_dirName
directory name for L1Extra plots
bool dirExists(const std::string &path) const
true if directory exists
Definition: DQMStore.cc:498
DQMStore * m_dbe
internal members
virtual void endJob()
L1ExtraRecoDQM(const edm::ParameterSet &)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
void retrieveL1ExtraObjects(const edm::Event &, const edm::EventSetup &)
Definition: Run.h:36