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

Member Typedef Documentation

◆ Selector

Definition at line 200 of file NanoAODDQM.cc.

Constructor & Destructor Documentation

◆ SelGroupConfig() [1/2]

NanoAODDQM::SelGroupConfig::SelGroupConfig ( )
inline

Definition at line 205 of file NanoAODDQM.cc.

205 : name(), cutstr(), cutptr(), plots() {}
std::unique_ptr< StringCutObjectSelector< FlatTable::RowView > > cutptr
Definition: NanoAODDQM.cc:203
std::vector< std::unique_ptr< Plot > > plots
Definition: NanoAODDQM.cc:204

◆ SelGroupConfig() [2/2]

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

Definition at line 206 of file NanoAODDQM.cc.

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

Member Function Documentation

◆ fillSel()

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

Definition at line 208 of file NanoAODDQM.cc.

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

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

◆ nullCut()

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

Definition at line 207 of file NanoAODDQM.cc.

References cutstr.

Referenced by fillSel().

207 { return cutstr.empty(); }

Member Data Documentation

◆ cutptr

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

Definition at line 203 of file NanoAODDQM.cc.

Referenced by fillSel().

◆ cutstr

std::string NanoAODDQM::SelGroupConfig::cutstr

Definition at line 202 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 204 of file NanoAODDQM.cc.