CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Attributes
NanoAODDQM::Profile1D Class Reference
Inheritance diagram for NanoAODDQM::Profile1D:
NanoAODDQM::Plot

Public Member Functions

void fill (const FlatTable &table, const std::vector< bool > &rowsel) override
 
 Profile1D (DQMStore::IBooker &booker, const edm::ParameterSet &cfg)
 
 ~Profile1D () override
 
- Public Member Functions inherited from NanoAODDQM::Plot
const std::string & name () const
 
 Plot (MonitorElement *me)
 
virtual ~Plot ()
 

Protected Attributes

std::string xcol_
 
std::string ycol_
 
- Protected Attributes inherited from NanoAODDQM::Plot
MonitorElementplot_
 

Detailed Description

Definition at line 117 of file NanoAODDQM.cc.

Constructor & Destructor Documentation

◆ Profile1D()

NanoAODDQM::Profile1D::Profile1D ( DQMStore::IBooker booker,
const edm::ParameterSet cfg 
)
inline

Definition at line 119 of file NanoAODDQM.cc.

120  : Plot(booker.bookProfile(cfg.getParameter<std::string>("name"),
121  cfg.getParameter<std::string>("title"),
122  cfg.getParameter<uint32_t>("nbins"),
123  cfg.getParameter<double>("min"),
124  cfg.getParameter<double>("max"),
125  0.,
126  0.,
127  "")),
128  ycol_(cfg.getParameter<std::string>("ycolumn")),
129  xcol_(cfg.getParameter<std::string>("xcolumn")) {}

◆ ~Profile1D()

NanoAODDQM::Profile1D::~Profile1D ( )
inlineoverride

Definition at line 130 of file NanoAODDQM.cc.

130 {}

Member Function Documentation

◆ fill()

void NanoAODDQM::Profile1D::fill ( const FlatTable table,
const std::vector< bool > &  rowsel 
)
inlineoverridevirtual

Implements NanoAODDQM::Plot.

Definition at line 131 of file NanoAODDQM.cc.

131  {
132  int icolx = table.columnIndex(xcol_);
133  int icoly = table.columnIndex(ycol_);
134  if (icolx == -1)
135  throw cms::Exception("LogicError", "Missing " + xcol_);
136  if (icoly == -1)
137  throw cms::Exception("LogicError", "Missing " + ycol_);
138  for (unsigned int irow = 0, n = table.size(); irow < n; ++irow) {
139  if (rowsel[irow])
140  plot_->Fill(table.getAnyValue(irow, icolx), table.getAnyValue(irow, icoly));
141  }
142  }

References Exception, dqm::impl::MonitorElement::Fill(), dqmiodumpmetadata::n, NanoAODDQM::Plot::plot_, TableParser::table, xcol_, and ycol_.

Member Data Documentation

◆ xcol_

std::string NanoAODDQM::Profile1D::xcol_
protected

Definition at line 145 of file NanoAODDQM.cc.

Referenced by fill().

◆ ycol_

std::string NanoAODDQM::Profile1D::ycol_
protected

Definition at line 145 of file NanoAODDQM.cc.

Referenced by fill().

dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
NanoAODDQM::Plot::Plot
Plot(MonitorElement *me)
Definition: NanoAODDQM.cc:52
NanoAODDQM::Profile1D::ycol_
std::string ycol_
Definition: NanoAODDQM.cc:145
NanoAODDQM::Plot::plot_
MonitorElement * plot_
Definition: NanoAODDQM.cc:58
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
dqm::implementation::IBooker::bookProfile
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:322
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
looper.cfg
cfg
Definition: looper.py:296
Exception
Definition: hltDiff.cc:245
NanoAODDQM::Profile1D::xcol_
std::string xcol_
Definition: NanoAODDQM.cc:145
TableParser.table
table
Definition: TableParser.py:111