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

Member Typedef Documentation

◆ Selector

Definition at line 171 of file NanoAODDQM.cc.

Constructor & Destructor Documentation

◆ SelGroupConfig() [1/2]

NanoAODDQM::SelGroupConfig::SelGroupConfig ( )
inline

Definition at line 176 of file NanoAODDQM.cc.

176 : name(), cutstr(), cutptr(), plots() {}
std::unique_ptr< StringCutObjectSelector< FlatTable::RowView > > cutptr
Definition: NanoAODDQM.cc:174
std::vector< std::unique_ptr< Plot > > plots
Definition: NanoAODDQM.cc:175

◆ SelGroupConfig() [2/2]

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

Definition at line 177 of file NanoAODDQM.cc.

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

Member Function Documentation

◆ fillSel()

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

Definition at line 179 of file NanoAODDQM.cc.

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

179  {
180  out.resize(table.size());
181  if (nullCut()) {
182  std::fill(out.begin(), out.end(), true);
183  } else {
184  if (!cutptr) {
185  cutptr = std::make_unique<Selector>(replaceStringsToColumGets(cutstr, table));
186  }
187  for (unsigned int i = 0, n = table.size(); i < n; ++i) {
188  out[i] = (*cutptr)(table.row(i));
189  }
190  }
191  }
std::unique_ptr< StringCutObjectSelector< FlatTable::RowView > > cutptr
Definition: NanoAODDQM.cc:174

◆ nullCut()

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

Definition at line 178 of file NanoAODDQM.cc.

References cutstr.

Referenced by fillSel().

178 { return cutstr.empty(); }

Member Data Documentation

◆ cutptr

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

Definition at line 174 of file NanoAODDQM.cc.

Referenced by fillSel().

◆ cutstr

std::string NanoAODDQM::SelGroupConfig::cutstr

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