CMS 3D CMS Logo

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::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 L1TGMTClient (const edm::ParameterSet &)
 Constructor. More...
 
 ~L1TGMTClient () override
 Destructor. More...
 
- Public Member Functions inherited from DQMEDHarvester
void accumulate (edm::Event const &ev, edm::EventSetup const &es) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void beginRun (edm::Run const &, edm::EventSetup const &) override
 
 DQMEDHarvester ()
 
virtual void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &)
 
void endJob () final
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &, edm::EventSetup const &) final
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) override
 
 ~DQMEDHarvester () override=default
 
- Public Member Functions inherited from edm::one::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

void dqmEndJob (DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter) override
 
void dqmEndLuminosityBlock (DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &evSetup) override
 
- 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::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Attributes inherited from DQMEDHarvester
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

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 ( )
override

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(), TrackerOfflineValidation_Dqm_cff::xmax, and TrackerOfflineValidation_Dqm_cff::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 = nullptr;
250  }
251 
252  return me;
253 }
#define LogDebug(id)
std::string input_dir_
Definition: L1TGMTClient.h:44
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:118
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:279
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(), mps_fire::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 = nullptr;
283  }
284 
285  return me;
286 }
#define LogDebug(id)
const double xbins[]
std::string input_dir_
Definition: L1TGMTClient.h:44
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:118
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:279
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(), TrackerOfflineValidation_Dqm_cff::xmax, TrackerOfflineValidation_Dqm_cff::xmin, Phase2TrackerMonitorDigi_cff::ymax, and Phase2TrackerMonitorDigi_cff::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 = nullptr;
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:279
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:136
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 != nullptr) {
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 != nullptr) {
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 != nullptr) {
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 != nullptr) {
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 != nullptr) {
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 != nullptr) {
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
TH1F * getTH1F() const
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
TH2F * getTH2F() const
MonitorElement * eff_phi_dtcsc
Definition: L1TGMTClient.h:55
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:279
std::string output_dir_
Definition: L1TGMTClient.h:45
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 
)
overrideprotected

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 nullptr;
213  }
214 
215  return me_->getTH1F();
216 }
#define LogDebug(id)
TH1F * getTH1F() const
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:307
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 nullptr;
225  }
226  return me_->getTH2F();
227 }
#define LogDebug(id)
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:307
TH2F * getTH2F() 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(), hcalSimParameters_cfi::he, 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 == nullptr) {
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)
TH1F * getTH1F() const
std::string input_dir_
Definition: L1TGMTClient.h:44
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:349
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(), hcalSimParameters_cfi::he, 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 == nullptr) {
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
TH2F * getTH2F() const
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:349
std::string output_dir_
Definition: L1TGMTClient.h:45
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 == nullptr) {
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)
TH1F * getTH1F() const
std::string input_dir_
Definition: L1TGMTClient.h:44
susybsm::HSCParticleRef hr
Definition: classes.h:26
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:349
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