CMS 3D CMS Logo

Typedefs | Functions
pvMonitor Namespace Reference

Typedefs

typedef dqm::reco::DQMStore DQMStore
 

Functions

template<typename... Args>
dqm::reco::MonitorElementmakeProfileIfLog (DQMStore::IBooker &ibook, bool logx, bool logy, Args &&...args)
 
template<typename... Args>
dqm::reco::MonitorElementmakeTH1IfLog (DQMStore::IBooker &ibook, bool logx, bool logy, Args &&...args)
 
void setBinLog (TAxis *axis)
 
void setBinLogX (TH1 *h)
 
void setBinLogY (TH1 *h)
 

Typedef Documentation

◆ DQMStore

Definition at line 26 of file PrimaryVertexMonitor.h.

Function Documentation

◆ makeProfileIfLog()

template<typename... Args>
dqm::reco::MonitorElement* pvMonitor::makeProfileIfLog ( DQMStore::IBooker ibook,
bool  logx,
bool  logy,
Args &&...  args 
)

Definition at line 50 of file PrimaryVertexMonitor.h.

References writedatasetfile::args, dqm::implementation::IBooker::bookProfile(), mergeVDriftHistosByStation::name, setBinLogX(), and setBinLogY().

Referenced by PrimaryVertexMonitor::IPMonitoring::bookIPMonitor().

50  {
51  auto prof = std::make_unique<TProfile>(std::forward<Args>(args)...);
52  if (logx)
53  setBinLogX(prof.get());
54  if (logy)
55  setBinLogY(prof.get());
56  const auto &name = prof->GetName();
57  return ibook.bookProfile(name, prof.release());
58  }
void setBinLogX(TH1 *h)
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
Definition: DQMStore.h:408
void setBinLogY(TH1 *h)

◆ makeTH1IfLog()

template<typename... Args>
dqm::reco::MonitorElement* pvMonitor::makeTH1IfLog ( DQMStore::IBooker ibook,
bool  logx,
bool  logy,
Args &&...  args 
)

Definition at line 61 of file PrimaryVertexMonitor.h.

References writedatasetfile::args, dqm::implementation::IBooker::book1D(), mergeVDriftHistosByStation::name, setBinLogX(), and setBinLogY().

Referenced by PrimaryVertexMonitor::bookHistograms().

61  {
62  auto h1 = std::make_unique<TH1F>(std::forward<Args>(args)...);
63  if (logx)
64  setBinLogX(h1.get());
65  if (logy)
66  setBinLogY(h1.get());
67  const auto &name = h1->GetName();
68  return ibook.book1D(name, h1.release());
69  }
void setBinLogX(TH1 *h)
void setBinLogY(TH1 *h)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98

◆ setBinLog()

void pvMonitor::setBinLog ( TAxis *  axis)

Definition at line 28 of file PrimaryVertexMonitor.h.

References isotrackApplyRegressor::bins, mps_fire::i, and ApeEstimator_cff::width.

Referenced by setBinLogX(), and setBinLogY().

28  {
29  int bins = axis->GetNbins();
30  float from = axis->GetXmin();
31  float to = axis->GetXmax();
32  float width = (to - from) / bins;
33  std::vector<float> new_bins(bins + 1, 0);
34  for (int i = 0; i <= bins; i++) {
35  new_bins[i] = TMath::Power(10, from + i * width);
36  }
37  axis->Set(bins, new_bins.data());
38  }

◆ setBinLogX()

void pvMonitor::setBinLogX ( TH1 *  h)

Definition at line 40 of file PrimaryVertexMonitor.h.

References h, and setBinLog().

Referenced by MuonTrackValidator::bookHistograms(), makeProfileIfLog(), and makeTH1IfLog().

40  {
41  TAxis *axis = h->GetXaxis();
42  setBinLog(axis);
43  }
void setBinLog(TAxis *axis)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4

◆ setBinLogY()

void pvMonitor::setBinLogY ( TH1 *  h)

Definition at line 44 of file PrimaryVertexMonitor.h.

References h, and setBinLog().

Referenced by makeProfileIfLog(), and makeTH1IfLog().

44  {
45  TAxis *axis = h->GetYaxis();
46  setBinLog(axis);
47  }
void setBinLog(TAxis *axis)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4