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 115 of file NanoAODDQM.cc.

Constructor & Destructor Documentation

◆ Profile1D()

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

Definition at line 117 of file NanoAODDQM.cc.

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

◆ ~Profile1D()

NanoAODDQM::Profile1D::~Profile1D ( )
inlineoverride

Definition at line 128 of file NanoAODDQM.cc.

128 {}

Member Function Documentation

◆ fill()

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

Implements NanoAODDQM::Plot.

Definition at line 129 of file NanoAODDQM.cc.

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

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 143 of file NanoAODDQM.cc.

Referenced by fill().

◆ ycol_

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

Definition at line 143 of file NanoAODDQM.cc.

Referenced by fill().

dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
NanoAODDQM::Plot::Plot
Plot(MonitorElement *me)
Definition: NanoAODDQM.cc:50
NanoAODDQM::Profile1D::ycol_
std::string ycol_
Definition: NanoAODDQM.cc:143
NanoAODDQM::Plot::plot_
MonitorElement * plot_
Definition: NanoAODDQM.cc:56
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
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
looper.cfg
cfg
Definition: looper.py:297
Exception
Definition: hltDiff.cc:246
NanoAODDQM::Profile1D::xcol_
std::string xcol_
Definition: NanoAODDQM.cc:143
TableParser.table
table
Definition: TableParser.py:111