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 
15 // this class header
17 
18 // system include files
19 #include <iostream>
20 #include <iomanip>
21 #include <memory>
22 #include <string>
23 
24 // user include files
26 
27 // constructor
29  //
30  m_retrieveL1Extra(
31  paramSet.getParameter<edm::ParameterSet> (
32  "L1ExtraInputTags"),consumesCollector()),
33  m_dirName(
34  paramSet.getUntrackedParameter("DirName",
35  std::string("L1T/L1ExtraRecoDQM"))),
36  //
37  m_nrBxInEventGmt(paramSet.getParameter<int> ("NrBxInEventGmt")),
38  m_nrBxInEventGct(paramSet.getParameter<int> ("NrBxInEventGct")),
39  //
40  m_dbe(0), m_resetModule(true), m_currentRun(-99),
41  //
42  m_nrEvJob(0), m_nrEvRun(0)
43 
44 {
45 
46  //
47  if ((m_nrBxInEventGmt > 0) && ((m_nrBxInEventGmt % 2) == 0)) {
49 
50  edm::LogInfo("L1ExtraRecoDQM")
51  << "\nWARNING: Number of bunch crossing to be monitored for GMT rounded to: "
53  << "\n The number must be an odd number!\n"
54  << std::endl;
55  }
56 
57  if ((m_nrBxInEventGct > 0) && ((m_nrBxInEventGct % 2) == 0)) {
59 
60  edm::LogInfo("L1ExtraRecoDQM")
61  << "\nWARNING: Number of bunch crossing to be monitored for GCT rounded to: "
63  << "\n The number must be an odd number!\n"
64  << std::endl;
65  }
66 
68  if (m_dbe == 0) {
69  edm::LogInfo("L1ExtraRecoDQM") << "\n Unable to get DQMStore service.";
70  } else {
71 
72  if (paramSet.getUntrackedParameter<bool> ("DQMStore", false)) {
73  m_dbe->setVerbose(0);
74  }
75 
77 
78  }
79 
80 }
81 
82 // destructor
84 
85  // empty
86 
87 }
88 
89 //
91 
92 }
93 
95  const edm::EventSetup& evSetup) {
96 
97  m_nrEvRun = 0;
98 
99  DQMStore* dbe = 0;
100  dbe = edm::Service<DQMStore>().operator->();
101 
102  // clean up directory
103  if (dbe) {
105  if (dbe->dirExists(m_dirName)) {
106  dbe->rmdir(m_dirName);
107  }
109  }
110 
111 }
112 
114  const edm::EventSetup& evSetup) {
115 
116  //
117 
118 
119 }
120 
121 
122 //
124  const edm::EventSetup& evSetup) {
125 
126  ++m_nrEvJob;
127  ++m_nrEvRun;
128 
129  //
130  m_retrieveL1Extra.retrieveL1ExtraObjects(iEvent, evSetup);
131 
132 }
133 
134 // end section
136  const edm::EventSetup& evSetup) {
137 
138  // empty
139 
140 }
141 
142 void L1ExtraRecoDQM::endRun(const edm::Run& run, const edm::EventSetup& evSetup) {
143 
144  //
145 
146 }
147 
149 
150  edm::LogInfo("L1ExtraRecoDQM")
151  << "\n\nTotal number of events analyzed in this job: " << m_nrEvJob
152  << "\n" << std::endl;
153 
154  return;
155 }
156 
157 //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:3101
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:230
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:631
std::string m_dirName
directory name for L1Extra plots
bool dirExists(const std::string &path) const
true if directory exists
Definition: DQMStore.cc:732
DQMStore * m_dbe
internal members
virtual void endJob()
L1ExtraRecoDQM(const edm::ParameterSet &)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:667
void retrieveL1ExtraObjects(const edm::Event &, const edm::EventSetup &)
Definition: Run.h:41