1 #ifndef _StringCutEventSelector
2 #define _StringCutEventSelector
9 template<
typename Object>
15 f_(pset.getParameter<std::
string>(
"cut")),
17 nFirst_(pset.getParameter<unsigned int>(
"nFirst"))
20 ss<<
"string cut based selection on collection: "<<
src_;
32 for (;i!=oH->size();i++)
36 const Object &
o = (*oH)[
i];
37 if (!
f_(o))
return false;
49 template<
typename Object,
bool existenceMatter=true>
58 ss<<
"string cut based selection on collection: "<<
src_;
61 for (
unsigned int i=0;
i!=selection.size();
i++)
62 if (selection[
i]!=
"-"){
64 ss<<
"["<<i<<
"]: "<<selection[
i];
70 ss<<
"["<<
i<<
"]: no selection";
80 if (existenceMatter && oH->size()<
f_.size())
return false;
81 for (;i!=
f_.size();i++)
83 if (!existenceMatter && i==oH->size())
break;
85 const Object &
o = (*oH)[
i];
86 if (!(*
f_[i])(
o))
return false;
93 std::vector<StringCutObjectSelector<Object> *>
f_;
T getParameter(std::string const &) const
std::vector< std::string > description_
bool select(const edm::Event &e) const
decision of the selector module
bool select(const edm::Event &e) const
decision of the selector module
std::vector< StringCutObjectSelector< Object > * > f_
~StringCutsEventSelector()
StringCutObjectSelector< Object > f_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
StringCutsEventSelector(const edm::ParameterSet &pset)
StringCutEventSelector(const edm::ParameterSet &pset)