|
|
Go to the documentation of this file. 1 #ifndef _StringCutEventSelector
2 #define _StringCutEventSelector
11 template <
typename Object,
bool any = false>
25 ss <<
"string cut based selection on collection: " <<
src_;
29 if (
pset.exists(
"order"))
36 std::vector<const Object*> copyToSort(oH->size());
37 for (
uint i = 0;
i != oH->size(); ++
i)
38 copyToSort[
i] = &(*oH)[
i];
45 unsigned int found = 0;
46 for (;
i != oH->size();
i++) {
47 const Object&
o = *(copyToSort[
i]);
72 template <
typename Object,
bool existenceMatter = true>
82 std::vector<std::string>
selection =
pset.getParameter<std::vector<std::string> >(
"cut");
84 ss <<
"string cut based selection on collection: " <<
src_;
95 f_.push_back(
nullptr);
96 ss <<
"[" <<
i <<
"]: no selection";
100 if (
pset.exists(
"order"))
105 for (;
i !=
f_.size();
i++)
117 std::vector<const Object*> copyToSort(oH->size());
118 for (
uint i = 0;
i != oH->size(); ++
i)
119 copyToSort[
i] = &(*oH)[
i];
124 if (existenceMatter && oH->size() <
f_.size())
126 for (;
i !=
f_.size();
i++) {
127 if (!existenceMatter &&
i == oH->size())
131 const Object&
o = *(copyToSort[
i]);
141 std::vector<StringCutObjectSelector<Object>*>
f_;
~StringCutsEventSelector() override
bool select(const edm::Event &e) const override
decision of the selector module
StringObjectFunction< Object > * order_
StringCutsEventSelector(const edm::ParameterSet &pset, edm::ConsumesCollector &&iC)
std::vector< std::string > description_
bool any(const std::vector< T > &v, const T &what)
bool select(const edm::Event &e) const override
decision of the selector module
edm::EDGetTokenT< edm::View< Object > > srcToken_
edm::EDGetTokenT< edm::View< Object > > srcToken_
StringObjectFunction< Object > * order_
StringCutEventSelector(const edm::ParameterSet &pset, edm::ConsumesCollector &&iC)
std::vector< StringCutObjectSelector< Object > * > f_
StringCutEventSelector(const edm::ParameterSet &pset, edm::ConsumesCollector &iC)
StringCutsEventSelector(const edm::ParameterSet &pset, edm::ConsumesCollector &iC)
StringCutObjectSelector< Object > f_