CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Public Attributes
NanoAODDQM::SelGroupConfig Struct Reference

Public Types

typedef
StringCutObjectSelector
< FlatTable::RowView
Selector
 

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

Member Typedef Documentation

Definition at line 162 of file NanoAODDQM.cc.

Constructor & Destructor Documentation

NanoAODDQM::SelGroupConfig::SelGroupConfig ( )
inline

Definition at line 167 of file NanoAODDQM.cc.

167 : name(), cutstr(), cutptr(), plots() {}
std::unique_ptr< StringCutObjectSelector< FlatTable::RowView > > cutptr
Definition: NanoAODDQM.cc:165
std::vector< std::unique_ptr< Plot > > plots
Definition: NanoAODDQM.cc:166
NanoAODDQM::SelGroupConfig::SelGroupConfig ( const std::string &  nam,
const std::string &  cut 
)
inline

Definition at line 168 of file NanoAODDQM.cc.

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

Member Function Documentation

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

Definition at line 170 of file NanoAODDQM.cc.

References cutptr, cutstr, PVValHelper::fill(), mps_fire::i, dqmiodumpmetadata::n, nullCut(), nanoaod::FlatTable::row(), and nanoaod::FlatTable::size().

170  {
171  out.resize(table.size());
172  if (nullCut()) {
173  std::fill(out.begin(), out.end(), true);
174  } else {
175  if (!cutptr) {
176  cutptr = std::make_unique<Selector>(replaceStringsToColumGets(cutstr, table));
177  }
178  for (unsigned int i = 0, n = table.size(); i < n; ++i) {
179  out[i] = (*cutptr)(table.row(i));
180  }
181  }
182  }
std::unique_ptr< StringCutObjectSelector< FlatTable::RowView > > cutptr
Definition: NanoAODDQM.cc:165
void fill(std::map< std::string, TH1 * > &h, const std::string &s, double x)
bool NanoAODDQM::SelGroupConfig::nullCut ( ) const
inline

Definition at line 169 of file NanoAODDQM.cc.

References cutstr.

Referenced by fillSel().

169 { return cutstr.empty(); }

Member Data Documentation

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

Definition at line 165 of file NanoAODDQM.cc.

Referenced by fillSel().

std::string NanoAODDQM::SelGroupConfig::cutstr

Definition at line 164 of file NanoAODDQM.cc.

Referenced by fillSel(), and nullCut().

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

Definition at line 166 of file NanoAODDQM.cc.