CMS 3D CMS Logo

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

Public Member Functions

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

Protected Member Functions

template<typename T >
void vfill (const FlatTable &table, int icol, const std::vector< bool > &rowsel)
 

Protected Attributes

std::string col_
 
- Protected Attributes inherited from NanoAODDQM::Plot
MonitorElementplot_
 

Detailed Description

Definition at line 72 of file NanoAODDQM.cc.

Constructor & Destructor Documentation

◆ Plot1D()

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

Definition at line 74 of file NanoAODDQM.cc.

75  : Plot(booker.book1D(cfg.getParameter<std::string>("name"),
76  cfg.getParameter<std::string>("title"),
77  cfg.getParameter<uint32_t>("nbins"),
78  cfg.getParameter<double>("min"),
79  cfg.getParameter<double>("max"))),
80  col_(cfg.getParameter<std::string>("column")) {}

◆ ~Plot1D()

NanoAODDQM::Plot1D::~Plot1D ( )
inlineoverride

Definition at line 81 of file NanoAODDQM.cc.

81 {}

Member Function Documentation

◆ fill()

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

Implements NanoAODDQM::Plot.

Definition at line 82 of file NanoAODDQM.cc.

82  {
83  int icol = table.columnIndex(col_);
84  if (icol == -1)
85  return; // columns may be missing (e.g. mc-only)
86  switch (table.columnType(icol)) {
88  vfill<float>(table, icol, rowsel);
89  break;
91  vfill<int>(table, icol, rowsel);
92  break;
94  vfill<uint8_t>(table, icol, rowsel);
95  break;
97  vfill<uint8_t>(table, icol, rowsel);
98  break;
99  }
100  }

References nanoaod::FlatTable::BoolColumn, col_, nanoaod::FlatTable::FloatColumn, nanoaod::FlatTable::IntColumn, TableParser::table, and nanoaod::FlatTable::UInt8Column.

◆ vfill()

template<typename T >
void NanoAODDQM::Plot1D::vfill ( const FlatTable table,
int  icol,
const std::vector< bool > &  rowsel 
)
inlineprotected

Definition at line 105 of file NanoAODDQM.cc.

105  {
106  const auto &data = table.columnData<T>(icol);
107  for (unsigned int i = 0, n = data.size(); i < n; ++i) {
108  if (rowsel[i])
109  plot_->Fill(data[i]);
110  }
111  }

References data, dqm::impl::MonitorElement::Fill(), mps_fire::i, dqmiodumpmetadata::n, NanoAODDQM::Plot::plot_, and TableParser::table.

Member Data Documentation

◆ col_

std::string NanoAODDQM::Plot1D::col_
protected

Definition at line 103 of file NanoAODDQM.cc.

Referenced by fill().

nanoaod::FlatTable::FloatColumn
Definition: FlatTable.h:39
mps_fire.i
i
Definition: mps_fire.py:355
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
NanoAODDQM::Plot::Plot
Plot(MonitorElement *me)
Definition: NanoAODDQM.cc:50
NanoAODDQM::Plot1D::col_
std::string col_
Definition: NanoAODDQM.cc:103
NanoAODDQM::Plot::plot_
MonitorElement * plot_
Definition: NanoAODDQM.cc:56
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
nanoaod::FlatTable::UInt8Column
Definition: FlatTable.h:41
looper.cfg
cfg
Definition: looper.py:297
nanoaod::FlatTable::IntColumn
Definition: FlatTable.h:40
T
long double T
Definition: Basic3DVectorLD.h:48
nanoaod::FlatTable::BoolColumn
Definition: FlatTable.h:42
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
TableParser.table
table
Definition: TableParser.py:111