1 #ifndef Fireworks_Core_FWItemRandomAccessor_h 2 #define Fireworks_Core_FWItemRandomAccessor_h 32 const void *
data()
const override;
33 const TClass *
type()
const override;
39 void reset()
override;
71 template <
class C,
class V =
typename C::value_type>
88 unsigned int size()
const override {
102 template <
class C,
class COLL =
typename C::value_type,
class V =
typename COLL::value_type>
117 size_t collectionOffset = 0;
118 for (
typename container_type::const_iterator ci =
c->begin(), ce =
c->end(); ci != ce; ++ci) {
119 size_t i = iIndex - collectionOffset;
121 return &(ci->operator[](
i));
122 collectionOffset += ci->size();
128 unsigned int size()
const override {
132 size_t finalSize = 0;
134 for (
typename container_type::const_iterator
i =
c->begin(),
e =
c->end();
i !=
e; ++
i)
135 finalSize +=
i->size();
143 template <
class C,
class COLL =
typename C::value_type,
class V =
typename COLL::value_type>
161 return &(
c->data().operator[](iIndex));
164 unsigned int size()
const override {
168 return c->dataSize();
172 template <
class C,
class R =
typename C::Range,
class V =
typename R::value_type>
187 size_t collectionOffset = 0;
188 for (
typename container_type::const_iterator ci =
c->begin(), ce =
c->end(); ci != ce; ++ci) {
189 size_t i = iIndex - collectionOffset;
192 collectionOffset += ci->size();
198 unsigned int size()
const override {
202 size_t finalSize = 0;
204 for (
typename range_type::const_iterator ci =
c->begin(), ce =
c->end(); ci != ce; ++ci)
211 template <
class C,
class V>
225 size_t collectionOffset = 0;
227 for (
typename container_type::DigiRangeIterator ci =
c->begin(), ce =
c->end(); ci != ce; ++ci) {
228 int i = iIndex - collectionOffset;
233 return &(*(vt.second.first +
i));
234 collectionOffset +=
std::distance(vt.second.first, vt.second.second);
240 unsigned int size()
const override {
244 size_t finalSize = 0;
246 for (
typename container_type::DigiRangeIterator ci =
c->begin(), ce =
c->end(); ci != ce; ++ci) {
248 finalSize +=
std::distance(vt.second.first, vt.second.second);
270 return &(
c->at(0, iIndex));
273 unsigned int size()
const override {
#define REGISTER_FWITEMACCESSOR_METHODS()
unsigned int size() const override
const void * modelData(int iIndex) const override
FWItemDetSetAccessor(const TClass *iClass)
const void * modelData(int iIndex) const override
const void * data() const override
const FWItemRandomAccessorBase & operator=(const FWItemRandomAccessorBase &)=delete
unsigned int size() const override
FWItemRandomAccessor(const TClass *iClass)
bool isCollection() const override
const void * modelData(int iIndex) const override
Container::value_type value_type
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t V
unsigned int size() const override
unsigned int size() const override
const TClass * type() const override
FWItemMuonDigiAccessor(const TClass *iClass)
FWItemRandomAccessorBase(const TClass *type, const std::type_info &modelTypeName)
FWItemNewDetSetAccessor(const TClass *iClass)
BXVectorAccessor(const TClass *iClass)
void * getDataPtr() const
unsigned int size() const override
const TClass * m_modelType
const TClass * modelType() const override
const void * modelData(int iIndex) const override
const void * modelData(int iIndex) const override
unsigned int size() const override
~FWItemRandomAccessorBase() override
void setData(const edm::ObjectWithDict &) override
override if id of an object should be different than the index
const void * modelData(int iIndex) const override
FWItemRangeAccessor(const TClass *iClass)