1 #ifndef cond_SmallWORMDict_h 2 #define cond_SmallWORMDict_h 8 #include <boost/iterator_adaptors.hpp> 9 #include <boost/iterator/transform_iterator.hpp> 10 #include <boost/iterator/counting_iterator.hpp> 14 namespace SmallWORMDict {
37 b(ib),
l(il),ind(iind){}
49 int k = (0==
i) ? 0 :
v->m_index[i-1];
50 return frame(&
v->m_data[k],
v->m_index[i]-k, i);
55 unsigned int ind)
const {
56 f.b =
b;
f.l=
l;
f.ind=ind;
67 typedef boost::transform_iterator<IterHelp,boost::counting_iterator<int> >
const_iterator;
71 return boost::make_transform_iterator(boost::counting_iterator<int>(0),
75 const_iterator
end()
const {
76 return boost::make_transform_iterator(boost::counting_iterator<int>(
size()),
81 int k = (0==
i) ? 0 : m_index[i-1];
82 return Frame(&m_data[k], m_index[i]-k, i);
87 const_iterator
find(
char const * s)
const;
90 explicit SmallWORMDict(std::vector<std::string>
const & idict);
95 size_t index(
char const * s)
const;
const_iterator end() const
std::vector< unsigned int > m_index
const_iterator begin() const
result_type const & operator()(int i) const
Frame operator[](int i) const
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Frame const & frame(char const *b, unsigned int l, unsigned int ind) const
std::vector< char > m_data
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
IterHelp(SmallWORMDict const &iv)
#define COND_SERIALIZABLE
Frame(char const *ib, unsigned int il, unsigned int iind)