1 #ifndef DataFormats_Common_DataFrameContainer_h
2 #define DataFormats_Common_DataFrameContainer_h
7 #include <boost/iterator/transform_iterator.hpp>
8 #include <boost/iterator/counting_iterator.hpp>
17 template <
typename DigiCollection>
40 typedef std::vector<id_type>::iterator
IdIter;
41 typedef std::vector<data_type>::iterator
DataIter;
61 typedef boost::transform_iterator<IterHelp, boost::counting_iterator<int> >
const_iterator;
100 m_ids.push_back(iid);
107 m_ids.push_back(iid);
143 return (p ==
m_ids.end() || (*p) !=
i)
145 : boost::make_transform_iterator(boost::counting_iterator<int>(p -
m_ids.begin()),
IterHelp(*
this));
150 return boost::make_transform_iterator(boost::counting_iterator<int>(0),
IterHelp(*
this));
153 return boost::make_transform_iterator(boost::counting_iterator<int>(
size()),
IterHelp(*
this));
175 friend class ::TestDataFrame;
177 template <
typename DigiCollection>
178 friend class ::TestEcalDigi;
191 :
m_id(icont.
id(i)), m_data(icont.frame(i)), m_size(icont.
stride()) {}
214 #endif // DataFormats_Common_DataFrameContainer_h
data_type operator()(size_t cell, size_t frame) const
IdContainer const & ids() const
void resize(size_t isize)
uint16_t *__restrict__ id
std::vector< data_type >::iterator DataIter
void push_back(id_type iid)
unique_ptr< ClusterSequence > cs
IterHelp(DataFrameContainer const &iv)
DataFrameContainer(size_t istride, int isubdet=0, size_t isize=0)
const_iterator begin() const
The iterator returned can not safely be used across threads.
DataFrame operator[](size_t i) const
id_type id(size_t cell) const
void swap(Association< C > &lhs, Association< C > &rhs)
void swap(IdContainer &iic, DataContainer &idc)
DataFrame const & operator()(int i) const
const_iterator find(id_type i) const
std::vector< data_type > DataContainer
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
std::vector< data_type >::const_iterator const_DataIter
std::vector< id_type >::const_iterator const_IdIter
DataFrameContainer & operator=(DataFrameContainer const &rhs)
void swap(DataFrameContainer &rh)
std::vector< id_type >::iterator IdIter
void set_back(data_type const *idata)
void reserve(size_t isize)
void set(DataFrameContainer const &icont, size_type i)
DataFrameContainer const & v
std::pair< IdIter, DataIter > IterPair
void set_back(id_type iid)
std::pair< const_IdIter, const_DataIter > const_IterPair
void push_back(id_type iid, data_type const *idata)
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
const_iterator end() const
__host__ __device__ constexpr RandomIt lower_bound(RandomIt first, RandomIt last, const T &value, Compare comp={})
std::vector< id_type > IdContainer
DataFrame operator[](size_t i)
const_IterPair pair(size_t i) const
DataContainer const & data() const
void set_back(id_type iid, data_type const *idata)
data_type const * frame(size_t cell) const