1 #ifndef DataFormats_Common_RefVectorHolder_h
2 #define DataFormats_Common_RefVectorHolder_h
12 template <
typename REF>
class RefHolder;
14 template<
typename REFV>
26 virtual bool empty()
const;
55 bool equal_to(const_iterator_imp
const*
o)
const {
return i == dc(o); }
56 bool less_than(const_iterator_imp
const*
o)
const {
return i < dc(o); }
57 void assign(const_iterator_imp
const*
o) {
i = dc(o); }
58 std::shared_ptr<RefHolderBase> deref()
const;
59 difference_type
difference(const_iterator_imp
const*
o)
const {
return i - dc(o); }
61 typename REFV::const_iterator
const&
dc(const_iterator_imp
const*
o)
const {
64 "In RefVectorHolder trying to dereference a null pointer\n");
69 "In RefVectorHolder trying to cast iterator to wrong type\n");
73 typename REFV::const_iterator
i;
90 virtual std::shared_ptr<reftobase::RefHolderBase>
refBase(
size_t idx)
const;
98 template <
typename REFV>
102 refs_.swap(other.
refs_);
105 template <
typename REFV>
113 template<
typename REFV>
116 return refs_.empty();
119 template<
typename REFV>
125 template<
typename REFV>
128 return refs_.clear();
131 template<
typename REFV>
138 template<
typename REFV>
144 template<
typename REFV>
147 return refs_.productGetter();
150 template<
typename REFV>
156 template<
typename REFV>
162 template<
typename REFV>
168 template <
typename REFV>
171 return refs_[
idx].key();
175 template <
typename REFV>
187 namespace reftobase {
189 template<
typename REFV>
195 "RefVectorHolder: attempting to cast a RefHolderBase "
196 "to an invalid type.\nExpected: ",
200 refs_.push_back(rh->
getRef());
203 template <
typename REFV>
204 std::shared_ptr<RefHolderBase>
209 return std::shared_ptr<RefHolderBase>(std::make_shared<RefHolder<typename REFV::value_type> >(refs_[
idx]));
213 template<
typename REFV>
214 std::shared_ptr<RefHolderBase>
219 return std::shared_ptr<RefHolderBase>(std::make_shared<RefHolder<typename REFV::value_type> >(*i));
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
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
ptrdiff_t difference_type
const_iterator_imp_specific()
virtual RefVectorHolder< REFV > * clone() 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
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)
void swap(BaseHolder< T > &lhs, BaseHolder< T > &rhs)
void decrease(difference_type d)