1 #ifndef _StringCutEventSelector
2 #define _StringCutEventSelector
10 template<
typename Object>
19 f_(pset.getParameter<std::
string>(
"cut")),
21 nFirst_(pset.getParameter<unsigned int>(
"nFirst"))
24 ss<<
"string cut based selection on collection: "<<
src_;
36 for (;i!=oH->size();i++)
40 const Object &
o = (*oH)[
i];
41 if (!
f_(o))
return false;
54 template<
typename Object,
bool existenceMatter=true>
66 ss<<
"string cut based selection on collection: "<<
src_;
69 for (
unsigned int i=0;
i!=selection.size();
i++)
70 if (selection[
i]!=
"-"){
72 ss<<
"["<<i<<
"]: "<<selection[
i];
78 ss<<
"["<<
i<<
"]: no selection";
88 if (existenceMatter && oH->size()<
f_.size())
return false;
89 for (;i!=
f_.size();i++)
91 if (!existenceMatter && i==oH->size())
break;
93 const Object &
o = (*oH)[
i];
94 if (!(*
f_[i])(
o))
return false;
102 std::vector<StringCutObjectSelector<Object> *>
f_;
edm::EDGetTokenT< edm::View< Object > > srcToken_
T getParameter(std::string const &) const
StringCutEventSelector(const edm::ParameterSet &pset, edm::ConsumesCollector &iC)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
bool select(const edm::Event &e) const
decision of the selector module
bool select(const edm::Event &e) const
decision of the selector module
StringCutsEventSelector(const edm::ParameterSet &pset, edm::ConsumesCollector &&iC)
std::vector< StringCutObjectSelector< Object > * > f_
StringCutEventSelector(const edm::ParameterSet &pset, edm::ConsumesCollector &&iC)
~StringCutsEventSelector()
StringCutObjectSelector< Object > f_
edm::EDGetTokenT< edm::View< Object > > srcToken_
std::vector< std::string > description_
StringCutsEventSelector(const edm::ParameterSet &pset, edm::ConsumesCollector &iC)