CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Public Attributes
NanoAODDQM::SelGroupConfig Struct Reference

Public Types

typedef StringCutObjectSelector< FlatTable::RowViewSelector
 

Public Member Functions

void fillSel (const FlatTable &table, std::vector< bool > &out)
 
bool nullCut () const
 
 SelGroupConfig ()
 
 SelGroupConfig (const std::string &nam, const std::string &cut)
 

Public Attributes

std::unique_ptr< StringCutObjectSelector< FlatTable::RowView > > cutptr
 
std::string cutstr
 
std::string name
 
std::vector< std::unique_ptr< Plot > > plots
 

Detailed Description

Definition at line 202 of file NanoAODDQM.cc.

Member Typedef Documentation

◆ Selector

Definition at line 203 of file NanoAODDQM.cc.

Constructor & Destructor Documentation

◆ SelGroupConfig() [1/2]

NanoAODDQM::SelGroupConfig::SelGroupConfig ( )
inline

Definition at line 208 of file NanoAODDQM.cc.

208 : name(), cutstr(), cutptr(), plots() {}
std::unique_ptr< StringCutObjectSelector< FlatTable::RowView > > cutptr
Definition: NanoAODDQM.cc:206
std::vector< std::unique_ptr< Plot > > plots
Definition: NanoAODDQM.cc:207

◆ SelGroupConfig() [2/2]

NanoAODDQM::SelGroupConfig::SelGroupConfig ( const std::string &  nam,
const std::string &  cut 
)
inline

Definition at line 209 of file NanoAODDQM.cc.

209 : name(nam), cutstr(cut), cutptr(), plots() {}
std::unique_ptr< StringCutObjectSelector< FlatTable::RowView > > cutptr
Definition: NanoAODDQM.cc:206
std::vector< std::unique_ptr< Plot > > plots
Definition: NanoAODDQM.cc:207

Member Function Documentation

◆ fillSel()

void NanoAODDQM::SelGroupConfig::fillSel ( const FlatTable table,
std::vector< bool > &  out 
)
inline

Definition at line 211 of file NanoAODDQM.cc.

References cutptr, cutstr, ntuplemaker::fill, mps_fire::i, dqmiodumpmetadata::n, nullCut(), MillePedeFileConverter_cfg::out, and TableParser::table.

211  {
212  out.resize(table.size());
213  if (nullCut()) {
214  std::fill(out.begin(), out.end(), true);
215  } else {
216  if (!cutptr) {
217  cutptr = std::make_unique<Selector>(replaceStringsToColumGets(cutstr, table));
218  }
219  for (unsigned int i = 0, n = table.size(); i < n; ++i) {
220  out[i] = (*cutptr)(table.row(i));
221  }
222  }
223  }
std::unique_ptr< StringCutObjectSelector< FlatTable::RowView > > cutptr
Definition: NanoAODDQM.cc:206

◆ nullCut()

bool NanoAODDQM::SelGroupConfig::nullCut ( ) const
inline

Definition at line 210 of file NanoAODDQM.cc.

References cutstr.

Referenced by fillSel().

210 { return cutstr.empty(); }

Member Data Documentation

◆ cutptr

std::unique_ptr<StringCutObjectSelector<FlatTable::RowView> > NanoAODDQM::SelGroupConfig::cutptr

Definition at line 206 of file NanoAODDQM.cc.

Referenced by fillSel().

◆ cutstr

std::string NanoAODDQM::SelGroupConfig::cutstr

Definition at line 205 of file NanoAODDQM.cc.

Referenced by fillSel(), and nullCut().

◆ name

std::string NanoAODDQM::SelGroupConfig::name

◆ plots

std::vector<std::unique_ptr<Plot> > NanoAODDQM::SelGroupConfig::plots

Definition at line 207 of file NanoAODDQM.cc.