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
L1TGMTClient Class Reference

#include <L1TGMTClient.h>

Inheritance diagram for L1TGMTClient:
DQMEDHarvester edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 L1TGMTClient (const edm::ParameterSet &)
 Constructor. More...
 
virtual ~L1TGMTClient ()
 Destructor. More...
 
- Public Member Functions inherited from DQMEDHarvester
virtual void analyze (edm::Event const &, edm::EventSetup const &) final
 
virtual void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
virtual void beginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDHarvester (void)
 
virtual void endJob () final
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
virtual void endRun (edm::Run const &, edm::EventSetup const &)
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Protected Member Functions

virtual void dqmEndJob (DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter) override
 
virtual void dqmEndLuminosityBlock (DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &evSetup)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Private Member Functions

MonitorElementbookClone1D (DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, const std::string &name, const std::string &title, const std::string &hrefName)
 
MonitorElementbookClone1DVB (DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, const std::string &name, const std::string &title, const std::string &hrefName)
 
MonitorElementbookClone2D (DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, const std::string &name, const std::string &title, const std::string &hrefName)
 
TH1F * get1DHisto (std::string meName, DQMStore::IGetter &igetter)
 
TH2F * get2DHisto (std::string meName, DQMStore::IGetter &igetter)
 
void initialize ()
 
void makeEfficiency1D (DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, MonitorElement *meeff, std::string heName, std::string hiName)
 
void makeEfficiency2D (DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, MonitorElement *meeff, std::string heName, std::string hiName)
 
void makeRatio1D (DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, MonitorElement *mer, std::string h1Name, std::string h2Name)
 
void processHistograms (DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
 

Private Attributes

MonitorElementeff_eta_dtcsc
 
MonitorElementeff_eta_rpc
 
MonitorElementeff_etaphi_dtcsc
 
MonitorElementeff_etaphi_rpc
 
MonitorElementeff_phi_dtcsc
 
MonitorElementeff_phi_rpc
 
std::string input_dir_
 
bool m_runInEndJob
 
bool m_runInEndLumi
 
bool m_runInEndRun
 
bool m_runInEventLoop
 
std::string monitorName_
 
std::string output_dir_
 
edm::ParameterSet parameters_
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Detailed Description

Definition at line 13 of file L1TGMTClient.h.

Constructor & Destructor Documentation

L1TGMTClient::L1TGMTClient ( const edm::ParameterSet ps)

Constructor.

Definition at line 11 of file L1TGMTClient.cc.

References initialize(), and parameters_.

11  {
12  parameters_ = ps;
13  initialize();
14 }
void initialize()
Definition: L1TGMTClient.cc:21
edm::ParameterSet parameters_
Definition: L1TGMTClient.h:42
L1TGMTClient::~L1TGMTClient ( )
virtual

Destructor.

Definition at line 16 of file L1TGMTClient.cc.

References LogDebug.

16  {
17  LogDebug("TriggerDQM") << "[TriggerDQM]: ending... ";
18 }
#define LogDebug(id)

Member Function Documentation

MonitorElement * L1TGMTClient::bookClone1D ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter,
const std::string &  name,
const std::string &  title,
const std::string &  hrefName 
)
private

Definition at line 230 of file L1TGMTClient.cc.

References DQMStore::IBooker::book1D(), get1DHisto(), input_dir_, LogDebug, output_dir_, DQMStore::IBooker::setCurrentFolder(), SiStripMonitorClusterAlca_cfi::xmax, and SiStripMonitorClusterAlca_cfi::xmin.

Referenced by dqmEndJob().

230  {
231 
232  MonitorElement* me;
233 
234  TH1F* href = get1DHisto(input_dir_ + "/" + hrefName, igetter);
235 
236  if (href) {
237  LogDebug("TriggerDQM")
238  << "\nL1TGMTClient::bookClone1D: booking histogram "
239  << hrefName << std::endl;
240  const unsigned nbx = href->GetNbinsX();
241  const double xmin = href->GetXaxis()->GetXmin();
242  const double xmax = href->GetXaxis()->GetXmax();
243  ibooker.setCurrentFolder(output_dir_);
244  me = ibooker.book1D(name, title, nbx, xmin, xmax);
245  } else {
246  LogDebug("TriggerDQM")
247  << "\nL1TGMTClient::bookClone1D: not able to clone histogram "
248  << hrefName << std::endl;
249  me = 0;
250  }
251 
252  return me;
253 }
#define LogDebug(id)
std::string input_dir_
Definition: L1TGMTClient.h:44
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:276
std::string output_dir_
Definition: L1TGMTClient.h:45
TH1F * get1DHisto(std::string meName, DQMStore::IGetter &igetter)
MonitorElement * L1TGMTClient::bookClone1DVB ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter,
const std::string &  name,
const std::string &  title,
const std::string &  hrefName 
)
private

Definition at line 256 of file L1TGMTClient.cc.

References DQMStore::IBooker::book1D(), get1DHisto(), i, input_dir_, LogDebug, output_dir_, DQMStore::IBooker::setCurrentFolder(), and fw3dlego::xbins.

Referenced by dqmEndJob().

256  {
257 
258  MonitorElement* me;
259 
260  TH1F* href = get1DHisto(input_dir_ + "/" + hrefName, igetter);
261 
262  if (href) {
263  LogDebug("TriggerDQM")
264  << "\nL1TGMTClient::bookClone1DVB: booking histogram "
265  << hrefName << std::endl;
266  int nbx = href->GetNbinsX();
267  if (nbx > 99)
268  nbx = 99;
269  float xbins[100];
270  for (int i = 0; i < nbx; i++) {
271  xbins[i] = href->GetBinLowEdge(i + 1);
272  }
273  xbins[nbx] = href->GetXaxis()->GetXmax();
274 
275  ibooker.setCurrentFolder(output_dir_);
276  me = ibooker.book1D(name, title, nbx, xbins);
277 
278  } else {
279  LogDebug("TriggerDQM")
280  << "\nL1TGMTClient::bookClone1DVB: not able to clone histogram "
281  << hrefName << std::endl;
282  me = 0;
283  }
284 
285  return me;
286 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
const double xbins[]
std::string input_dir_
Definition: L1TGMTClient.h:44
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:276
std::string output_dir_
Definition: L1TGMTClient.h:45
TH1F * get1DHisto(std::string meName, DQMStore::IGetter &igetter)
MonitorElement * L1TGMTClient::bookClone2D ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter,
const std::string &  name,
const std::string &  title,
const std::string &  hrefName 
)
private

Definition at line 289 of file L1TGMTClient.cc.

References DQMStore::IBooker::book2D(), get2DHisto(), input_dir_, LogDebug, output_dir_, DQMStore::IBooker::setCurrentFolder(), SiStripMonitorClusterAlca_cfi::xmax, SiStripMonitorClusterAlca_cfi::xmin, SiStripMonitorClusterAlca_cfi::ymax, and SiStripMonitorClusterAlca_cfi::ymin.

Referenced by dqmEndJob().

290  {
291 
292  MonitorElement* me;
293 
294  TH2F* href = get2DHisto(input_dir_ + "/" + hrefName, igetter);
295 
296  if (href) {
297  LogDebug("TriggerDQM")
298  << "\nL1TGMTClient::bookClone2D: booking histogram "
299  << hrefName << std::endl;
300  const unsigned nbx = href->GetNbinsX();
301  const double xmin = href->GetXaxis()->GetXmin();
302  const double xmax = href->GetXaxis()->GetXmax();
303  const unsigned nby = href->GetNbinsY();
304  const double ymin = href->GetYaxis()->GetXmin();
305  const double ymax = href->GetYaxis()->GetXmax();
306  ibooker.setCurrentFolder(output_dir_);
307  me = ibooker.book2D(name, title, nbx, xmin, xmax, nby, ymin, ymax);
308  } else {
309  LogDebug("TriggerDQM")
310  << "\nL1TGMTClient::bookClone2D: not able to clone histogram "
311  << hrefName << std::endl;
312  me = 0;
313  }
314 
315  return me;
316 }
#define LogDebug(id)
TH2F * get2DHisto(std::string meName, DQMStore::IGetter &igetter)
std::string input_dir_
Definition: L1TGMTClient.h:44
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:276
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
std::string output_dir_
Definition: L1TGMTClient.h:45
void L1TGMTClient::dqmEndJob ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
overrideprotectedvirtual

Implements DQMEDHarvester.

Definition at line 48 of file L1TGMTClient.cc.

References bookClone1D(), bookClone1DVB(), bookClone2D(), eff_eta_dtcsc, eff_eta_rpc, eff_etaphi_dtcsc, eff_etaphi_rpc, eff_phi_dtcsc, eff_phi_rpc, MonitorElement::getTH1F(), MonitorElement::getTH2F(), output_dir_, processHistograms(), MonitorElement::setAxisTitle(), and DQMStore::IBooker::setCurrentFolder().

48  {
49 
50  // booking histograms in the output_dir_
51 
53 
54  eff_eta_dtcsc = bookClone1DVB(ibooker, igetter, "eff_eta_dtcsc", "efficiency DTCSC vs eta",
55  "eta_DTCSC_and_RPC");
56 
57  if (eff_eta_dtcsc != 0) {
58  eff_eta_dtcsc->setAxisTitle("eta", 1);
59  if(eff_eta_dtcsc->getTH1F()->GetSumw2N() == 0) eff_eta_dtcsc->getTH1F()->Sumw2();
60 
61  }
62 
63  eff_eta_rpc = bookClone1DVB(ibooker, igetter, "eff_eta_rpc", "efficiency RPC vs eta",
64  "eta_DTCSC_and_RPC");
65 
66  if (eff_eta_rpc != 0) {
67  eff_eta_rpc->setAxisTitle("eta", 1);
68  if(eff_eta_rpc->getTH1F()->GetSumw2N() == 0) eff_eta_rpc->getTH1F()->Sumw2();
69 
70  }
71 
72  eff_phi_dtcsc = bookClone1D(ibooker, igetter, "eff_phi_dtcsc", "efficiency DTCSC vs phi",
73  "phi_DTCSC_and_RPC");
74 
75  if (eff_phi_dtcsc != 0) {
76  eff_phi_dtcsc->setAxisTitle("phi (deg)", 1);
77  if(eff_phi_dtcsc->getTH1F()->GetSumw2N() == 0) eff_phi_dtcsc->getTH1F()->Sumw2();
78 
79  }
80 
81  eff_phi_rpc = bookClone1D(ibooker, igetter, "eff_phi_rpc", "efficiency RPC vs phi",
82  "phi_DTCSC_and_RPC");
83 
84  if (eff_phi_rpc != 0) {
85  eff_phi_rpc->setAxisTitle("phi (deg)", 1);
86  if(eff_phi_rpc->getTH1F()->GetSumw2N() == 0) eff_phi_rpc->getTH1F()->Sumw2();
87 
88  }
89 
90  eff_etaphi_dtcsc = bookClone2D(ibooker, igetter, "eff_etaphi_dtcsc",
91  "efficiency DTCSC vs eta and phi", "etaphi_DTCSC_and_RPC");
92 
93  if (eff_etaphi_dtcsc != 0) {
94  eff_etaphi_dtcsc->setAxisTitle("eta", 1);
95  eff_etaphi_dtcsc->setAxisTitle("phi (deg)", 2);
96  if(eff_etaphi_dtcsc->getTH2F()->GetSumw2N() == 0) eff_etaphi_dtcsc->getTH2F()->Sumw2();
97 
98  }
99 
100  eff_etaphi_rpc = bookClone2D(ibooker, igetter, "eff_etaphi_rpc",
101  "efficiency RPC vs eta and phi", "etaphi_DTCSC_and_RPC");
102 
103  if (eff_etaphi_rpc != 0) {
104  eff_etaphi_rpc->setAxisTitle("eta", 1);
105  eff_etaphi_rpc->setAxisTitle("phi (deg)", 2);
106  if(eff_etaphi_rpc->getTH2F()->GetSumw2N() == 0) eff_etaphi_rpc->getTH2F()->Sumw2();
107 
108  }
109 
110  processHistograms(ibooker, igetter);
111 }
void processHistograms(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
MonitorElement * eff_eta_rpc
Definition: L1TGMTClient.h:54
MonitorElement * eff_etaphi_dtcsc
Definition: L1TGMTClient.h:57
MonitorElement * bookClone1DVB(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, const std::string &name, const std::string &title, const std::string &hrefName)
MonitorElement * bookClone1D(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, const std::string &name, const std::string &title, const std::string &hrefName)
MonitorElement * bookClone2D(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, const std::string &name, const std::string &title, const std::string &hrefName)
MonitorElement * eff_etaphi_rpc
Definition: L1TGMTClient.h:58
MonitorElement * eff_phi_rpc
Definition: L1TGMTClient.h:56
MonitorElement * eff_eta_dtcsc
Definition: L1TGMTClient.h:53
MonitorElement * eff_phi_dtcsc
Definition: L1TGMTClient.h:55
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:276
TH1F * getTH1F(void) const
std::string output_dir_
Definition: L1TGMTClient.h:45
TH2F * getTH2F(void) const
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void L1TGMTClient::dqmEndLuminosityBlock ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter,
const edm::LuminosityBlock lumiSeg,
const edm::EventSetup evSetup 
)
protectedvirtual

Reimplemented from DQMEDHarvester.

Definition at line 115 of file L1TGMTClient.cc.

115  {
116  }
TH1F * L1TGMTClient::get1DHisto ( std::string  meName,
DQMStore::IGetter igetter 
)
private

Definition at line 206 of file L1TGMTClient.cc.

References DQMStore::IGetter::get(), MonitorElement::getTH1F(), and LogDebug.

Referenced by bookClone1D(), bookClone1DVB(), makeEfficiency1D(), and makeRatio1D().

206  {
207 
208  MonitorElement * me_ = igetter.get(meName);
209 
210  if (!me_) {
211  LogDebug("TriggerDQM") << "\nL1TGMTClient: " << meName << " NOT FOUND.";
212  return 0;
213  }
214 
215  return me_->getTH1F();
216 }
#define LogDebug(id)
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:304
TH1F * getTH1F(void) const
TH2F * L1TGMTClient::get2DHisto ( std::string  meName,
DQMStore::IGetter igetter 
)
private

Definition at line 219 of file L1TGMTClient.cc.

References DQMStore::IGetter::get(), MonitorElement::getTH2F(), and LogDebug.

Referenced by bookClone2D(), and makeEfficiency2D().

219  {
220  MonitorElement * me_ = igetter.get(meName);
221 
222  if (!me_) {
223  LogDebug("TriggerDQM") << "\nL1TGMTClient: " << meName << " NOT FOUND.";
224  return 0;
225  }
226  return me_->getTH2F();
227 }
#define LogDebug(id)
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:304
TH2F * getTH2F(void) const
void L1TGMTClient::initialize ( )
private

Definition at line 21 of file L1TGMTClient.cc.

References edm::ParameterSet::getUntrackedParameter(), input_dir_, LogDebug, m_runInEndJob, m_runInEndLumi, m_runInEndRun, m_runInEventLoop, monitorName_, output_dir_, parameters_, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by L1TGMTClient().

21  {
22 
23  // base folder for the contents of this job
25  "monitorName", "");
26  LogDebug("TriggerDQM") << "Monitor name = " << monitorName_ << std::endl;
27 
29  "");
30  LogDebug("TriggerDQM") << "DQM output dir = " << output_dir_ << std::endl;
31 
33  "");
34  LogDebug("TriggerDQM") << "DQM input dir = " << input_dir_ << std::endl;
35 
37  "runInEventLoop", false);
38  m_runInEndLumi = parameters_.getUntrackedParameter<bool> ("runInEndLumi",
39  false);
40  m_runInEndRun = parameters_.getUntrackedParameter<bool> ("runInEndRun",
41  false);
42  m_runInEndJob = parameters_.getUntrackedParameter<bool> ("runInEndJob",
43  false);
44 
45 }
#define LogDebug(id)
T getUntrackedParameter(std::string const &, T const &) const
std::string monitorName_
Definition: L1TGMTClient.h:43
bool m_runInEndJob
Definition: L1TGMTClient.h:50
std::string input_dir_
Definition: L1TGMTClient.h:44
bool m_runInEventLoop
Definition: L1TGMTClient.h:47
bool m_runInEndLumi
Definition: L1TGMTClient.h:48
bool m_runInEndRun
Definition: L1TGMTClient.h:49
std::string output_dir_
Definition: L1TGMTClient.h:45
edm::ParameterSet parameters_
Definition: L1TGMTClient.h:42
void L1TGMTClient::makeEfficiency1D ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter,
MonitorElement meeff,
std::string  heName,
std::string  hiName 
)
private

Definition at line 156 of file L1TGMTClient.cc.

References get1DHisto(), MonitorElement::getTH1F(), input_dir_, LogDebug, output_dir_, and DQMStore::IGetter::setCurrentFolder().

Referenced by processHistograms().

156  {
157 
158  igetter.setCurrentFolder(output_dir_);
159 
160  TH1F* he = get1DHisto(input_dir_ + "/" + heName, igetter);
161  TH1F* hi = get1DHisto(input_dir_ + "/" + hiName, igetter);
162 
163  if (meeff == 0) {
164  LogDebug("TriggerDQM")
165  << "L1TGMTClient::makeEfficiency1D: monitoring element zero, not able to retrieve histogram"
166  << std::endl;
167  return;
168  }
169 
170  TH1F* heff = meeff->getTH1F();
171 
172  if (heff && he && hi) {
173  TH1F* hall = (TH1F*) he->Clone("hall");
174  hall->Add(hi);
175  heff->Divide(he, hall, 1., 1., "B");
176  delete hall;
177  }
178 }
#define LogDebug(id)
std::string input_dir_
Definition: L1TGMTClient.h:44
TH1F * getTH1F(void) const
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:346
std::string output_dir_
Definition: L1TGMTClient.h:45
TH1F * get1DHisto(std::string meName, DQMStore::IGetter &igetter)
void L1TGMTClient::makeEfficiency2D ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter,
MonitorElement meeff,
std::string  heName,
std::string  hiName 
)
private

Definition at line 181 of file L1TGMTClient.cc.

References get2DHisto(), MonitorElement::getTH2F(), input_dir_, LogDebug, output_dir_, and DQMStore::IGetter::setCurrentFolder().

Referenced by processHistograms().

181  {
182 
183  igetter.setCurrentFolder(output_dir_);
184 
185  TH2F* he = get2DHisto(input_dir_ + "/" + heName, igetter);
186  TH2F* hi = get2DHisto(input_dir_ + "/" + hiName, igetter);
187 
188  if (meeff == 0) {
189  LogDebug("TriggerDQM")
190  << "\nL1TGMTClient::makeEfficiency2D: monitoring element zero, not able to retrieve histogram"
191  << std::endl;
192  return;
193  }
194 
195  TH2F* heff = meeff->getTH2F();
196 
197  if (heff && he && hi) {
198  TH2F* hall = (TH2F*) he->Clone("hall");
199  hall->Add(hi);
200  heff->Divide(he, hall, 1., 1., "B");
201  delete hall;
202  }
203 }
#define LogDebug(id)
TH2F * get2DHisto(std::string meName, DQMStore::IGetter &igetter)
std::string input_dir_
Definition: L1TGMTClient.h:44
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:346
std::string output_dir_
Definition: L1TGMTClient.h:45
TH2F * getTH2F(void) const
void L1TGMTClient::makeRatio1D ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter,
MonitorElement mer,
std::string  h1Name,
std::string  h2Name 
)
private

Definition at line 134 of file L1TGMTClient.cc.

References get1DHisto(), MonitorElement::getTH1F(), AnalysisDataFormats_SUSYBSMObjects::hr, input_dir_, LogDebug, output_dir_, and DQMStore::IGetter::setCurrentFolder().

134  {
135 
136  igetter.setCurrentFolder(output_dir_);
137 
138  TH1F* h1 = get1DHisto(input_dir_ + "/" + h1Name, igetter);
139  TH1F* h2 = get1DHisto(input_dir_ + "/" + h2Name, igetter);
140 
141  if (mer == 0) {
142  LogDebug("TriggerDQM")
143  << "\nL1TGMTClient::makeRatio1D: monitoring element zero, not able to retrieve histogram"
144  << std::endl;
145  return;
146  }
147 
148  TH1F* hr = mer->getTH1F();
149 
150  if (hr && h1 && h2) {
151  hr->Divide(h1, h2, 1., 1., " ");
152  }
153 }
#define LogDebug(id)
std::string input_dir_
Definition: L1TGMTClient.h:44
susybsm::HSCParticleRef hr
Definition: classes.h:26
TH1F * getTH1F(void) const
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:346
std::string output_dir_
Definition: L1TGMTClient.h:45
TH1F * get1DHisto(std::string meName, DQMStore::IGetter &igetter)
void L1TGMTClient::processHistograms ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
private

Definition at line 119 of file L1TGMTClient.cc.

References eff_eta_dtcsc, eff_eta_rpc, eff_etaphi_dtcsc, eff_etaphi_rpc, eff_phi_dtcsc, eff_phi_rpc, LogDebug, makeEfficiency1D(), and makeEfficiency2D().

Referenced by dqmEndJob().

119  {
120 
121  LogDebug("TriggerDQM") << "L1TGMTClient: processing..." << std::endl;
122 
123  makeEfficiency1D(ibooker, igetter, eff_eta_dtcsc, "eta_DTCSC_and_RPC", "eta_RPC_only");
124  makeEfficiency1D(ibooker, igetter, eff_eta_rpc, "eta_DTCSC_and_RPC", "eta_DTCSC_only");
125 
126  makeEfficiency1D(ibooker, igetter, eff_phi_dtcsc, "phi_DTCSC_and_RPC", "phi_RPC_only");
127  makeEfficiency1D(ibooker, igetter, eff_phi_rpc, "phi_DTCSC_and_RPC", "phi_DTCSC_only");
128 
129  makeEfficiency2D(ibooker, igetter, eff_etaphi_dtcsc, "etaphi_DTCSC_and_RPC", "etaphi_RPC_only");
130  makeEfficiency2D(ibooker, igetter, eff_etaphi_rpc, "etaphi_DTCSC_and_RPC", "etaphi_DTCSC_only");
131 }
#define LogDebug(id)
void makeEfficiency2D(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, MonitorElement *meeff, std::string heName, std::string hiName)
MonitorElement * eff_eta_rpc
Definition: L1TGMTClient.h:54
void makeEfficiency1D(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, MonitorElement *meeff, std::string heName, std::string hiName)
MonitorElement * eff_etaphi_dtcsc
Definition: L1TGMTClient.h:57
MonitorElement * eff_etaphi_rpc
Definition: L1TGMTClient.h:58
MonitorElement * eff_phi_rpc
Definition: L1TGMTClient.h:56
MonitorElement * eff_eta_dtcsc
Definition: L1TGMTClient.h:53
MonitorElement * eff_phi_dtcsc
Definition: L1TGMTClient.h:55

Member Data Documentation

MonitorElement* L1TGMTClient::eff_eta_dtcsc
private

Definition at line 53 of file L1TGMTClient.h.

Referenced by dqmEndJob(), and processHistograms().

MonitorElement* L1TGMTClient::eff_eta_rpc
private

Definition at line 54 of file L1TGMTClient.h.

Referenced by dqmEndJob(), and processHistograms().

MonitorElement* L1TGMTClient::eff_etaphi_dtcsc
private

Definition at line 57 of file L1TGMTClient.h.

Referenced by dqmEndJob(), and processHistograms().

MonitorElement* L1TGMTClient::eff_etaphi_rpc
private

Definition at line 58 of file L1TGMTClient.h.

Referenced by dqmEndJob(), and processHistograms().

MonitorElement* L1TGMTClient::eff_phi_dtcsc
private

Definition at line 55 of file L1TGMTClient.h.

Referenced by dqmEndJob(), and processHistograms().

MonitorElement* L1TGMTClient::eff_phi_rpc
private

Definition at line 56 of file L1TGMTClient.h.

Referenced by dqmEndJob(), and processHistograms().

std::string L1TGMTClient::input_dir_
private
bool L1TGMTClient::m_runInEndJob
private

Definition at line 50 of file L1TGMTClient.h.

Referenced by initialize().

bool L1TGMTClient::m_runInEndLumi
private

Definition at line 48 of file L1TGMTClient.h.

Referenced by initialize().

bool L1TGMTClient::m_runInEndRun
private

Definition at line 49 of file L1TGMTClient.h.

Referenced by initialize().

bool L1TGMTClient::m_runInEventLoop
private

Definition at line 47 of file L1TGMTClient.h.

Referenced by initialize().

std::string L1TGMTClient::monitorName_
private

Definition at line 43 of file L1TGMTClient.h.

Referenced by initialize().

std::string L1TGMTClient::output_dir_
private
edm::ParameterSet L1TGMTClient::parameters_
private