1 #ifndef DataFormats_Common_RefVectorHolder_h
2 #define DataFormats_Common_RefVectorHolder_h
13 template <
typename REF>
class RefHolder;
15 template<
typename REFV>
27 virtual bool empty()
const;
57 bool equal_to(const_iterator_imp
const*
o)
const {
return i == dc(o); }
58 bool less_than(const_iterator_imp
const*
o)
const {
return i < dc(o); }
59 void assign(const_iterator_imp
const*
o) {
i = dc(o); }
60 std::shared_ptr<RefHolderBase> deref()
const;
61 difference_type
difference(const_iterator_imp
const*
o)
const {
return i - dc(o); }
63 typename REFV::const_iterator
const&
dc(const_iterator_imp
const*
o)
const {
66 "In RefVectorHolder trying to dereference a null pointer\n");
71 "In RefVectorHolder trying to cast iterator to wrong type\n");
75 typename REFV::const_iterator
i;
87 return refs_.product();
95 virtual std::shared_ptr<reftobase::RefHolderBase>
refBase(
size_t idx)
const;
103 template <
typename REFV>
107 refs_.swap(other.
refs_);
110 template <
typename REFV>
118 template<
typename REFV>
121 return refs_.empty();
124 template<
typename REFV>
130 template<
typename REFV>
133 return refs_.clear();
136 template<
typename REFV>
143 template<
typename REFV>
149 template<
typename REFV>
152 return refs_.productGetter();
155 template<
typename REFV>
161 template<
typename REFV>
167 template<
typename REFV>
173 template <
typename REFV>
176 return refs_[
idx].key();
180 template <
typename REFV>
192 namespace reftobase {
194 template<
typename REFV>
200 "RefVectorHolder: attempting to cast a RefHolderBase "
201 "to an invalid type.\nExpected: ",
205 refs_.push_back(rh->
getRef());
208 template <
typename REFV>
209 std::shared_ptr<RefHolderBase>
214 return std::shared_ptr<RefHolderBase>(std::make_shared<RefHolder<typename REFV::value_type> >(refs_[
idx]));
218 template<
typename REFV>
219 std::shared_ptr<RefHolderBase>
224 return std::shared_ptr<RefHolderBase>(std::make_shared<RefHolder<typename REFV::value_type> >(*i));
232 #include "boost/mpl/if.hpp"
235 namespace reftobase {
236 template<
typename REFV>
241 typeid(
typename REFV::collection_type).
name(),
242 "\ndoes not support Views\n");
246 template<
typename REFV>
249 typedef typename REFV::collection_type
collection;
250 collection
const* product =
static_cast<collection
const*
>(
prod);
255 template<
typename REFV>
RefVectorHolderBase::const_iterator const_iterator
virtual RefVectorHolder< REFV > * cloneEmpty() const
virtual ~RefVectorHolder()
void swap(RefVectorHolderBase &)
difference_type difference(const_iterator_imp const *o) const
virtual EDProductGetter const * productGetter() const
REF const & getRef() const
void reallyFillView(COLLECTION const &coll, ProductID const &id, std::vector< void const * > &ptrs, helper_vector &helpers)
bool less_than(const_iterator_imp const *o) const
~const_iterator_imp_specific()
RefVectorHolder & operator=(RefVectorHolder const &rhs)
virtual ProductID id() const
#define CMS_CLASS_VERSION(_version_)
bool equal_to(const_iterator_imp const *o) const
virtual size_type size() const
static void throwThis(Code category, char const *message0="", char const *message1="", char const *message2="", char const *message3="", char const *message4="")
void assign(const_iterator_imp const *o)
void setRefs(REFV const &refs)
const_iterator_imp_specific * clone() const
static void reallyFillView(RefVectorHolder< REFV > &, void const *, ProductID const &, std::vector< void const * > &)
ptrdiff_t difference_type
const_iterator_imp_specific()
virtual RefVectorHolder< REFV > * clone() const
virtual void reallyFillView(void const *, ProductID const &, std::vector< void const * > &)
virtual void push_back(RefHolderBase const *r)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
virtual void reserve(size_type n)
Container::value_type value_type
RefVectorHolder(ProductID const &iId)
const_iterator end() const
const_iterator begin() const
RefVectorHolder(REFV const &refs)
const_iterator_imp_specific(typename REFV::const_iterator const &it)
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
void swap(RefVectorHolder &other)
std::shared_ptr< RefHolderBase > deref() const
virtual bool isAvailable() const
virtual bool empty() const
static void reallyFillView(RefVectorHolder< REFV > &rvh, void const *prod, ProductID const &id, std::vector< void const * > &pointers)
virtual size_t keyForIndex(size_t idx) const
REFV::const_iterator const & dc(const_iterator_imp const *o) const
virtual std::shared_ptr< reftobase::RefHolderBase > refBase(size_t idx) const
void increase(difference_type d)
virtual void const * product() const
void swap(BaseHolder< T > &lhs, BaseHolder< T > &rhs)
void decrease(difference_type d)