5 #ifndef ANALYSISUTILS_ANALYSISCOMBINATION_H
6 #define ANALYSISUTILS_ANALYSISCOMBINATION_H
69 template <
class CALLER,
class OUT,
class CRITERIA>
73 if (!ret)
return false;
76 if (criteria(caller, comb))
return true;
79 return goodOnes(caller, comb, criteria);
91 if (!ret)
return false;
94 unsigned int sIndex = 0;
95 std::vector<unsigned int>::const_iterator
it =
m_index.begin();
96 std::vector<unsigned int>::const_iterator
itE =
m_index.end();
105 for (
unsigned int i=sIndex;
i<eIndex; ++
i)
106 remain.push_back((*
m_coll)[
i]);
109 if (
it ==
itE)
break;
118 template <
class CALLER,
class OUT,
class CRITERIA>
121 bool ret =
get(comb, remain);
122 if (!ret)
return false;
125 if (criteria(caller, comb))
return true;
128 return goodOnes(caller, comb, remain, criteria);
154 : m_coll(coll), m_nElement(nElement), m_first(true)
158 for (
unsigned int i=0;
i<nElement; ++
i)
166 for (
unsigned int i=0;
i<m_nElement; ++
i)
167 m_index.push_back(
i);
176 if (iElement < 0)
return false;
178 if (iElement+1 ==
static_cast<int>(m_nElement))
180 if ((m_index[iElement]+1) < m_coll->size())
182 ++(m_index[iElement]);
188 if ((m_index[iElement]+1) < m_index[iElement+1])
190 ++(m_index[iElement]);
195 if (setNewIndex (iElement-1))
197 m_index[iElement] = m_index[iElement-1]+1;
206 #endif // END OF ANALYSISTOOLS_ANALYSISCOMBINATION_H