1 #ifndef DataFormats_Common_DetSetAlgorithm_h
2 #define DataFormats_Common_DetSetAlgorithm_h
5 #include <boost/ref.hpp>
6 #include <boost/function.hpp>
13 template <
typename DSTV,
typename A,
typename B>
15 return v.equal_range(p.first,p.second);
21 template <
typename DSTV,
typename A,
typename B,
typename F>
23 typedef typename DSTV::data_type data_type;
25 for(
typename DSTV::const_iterator
id=range.first;
id!=range.second;
id++)
26 std::for_each((*id).begin(), (*id).end(),
27 boost::function<void(const data_type &)>(boost::ref(f)));
30 namespace dstvdetails {
42 template <
typename DSTV,
typename A,
typename B,
typename T>
44 std::vector<T const *> &
v,
45 std::pair<A,B>
const &
sel) {
46 typename DSTV::Range range = dstv.equal_range(sel.first,sel.second);
47 for(
typename DSTV::const_iterator
id=range.first;
id!=range.second;
id++){
49 v.resize(cs+(*id).size());
56 #endif // DataFormats_Common_DetSetAlgorithm_h
void copyDetSetRange(DSTV const &dstv, std::vector< T const * > &v, std::pair< A, B > const &sel)
auto_ptr< ClusterSequence > cs
PixelRecoRange< float > Range
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
void foreachDetSetObject(DSTV const &v, std::pair< A, B > const &sel, F &f)
H const * operator()(H const &h) const
DSTV::Range detsetRangeFromPair(DSTV const &v, std::pair< A, B > const &p)
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)