1 #ifndef DataFormats_Common_RefToBaseVector_h 2 #define DataFormats_Common_RefToBaseVector_h 26 class BaseVectorHolder;
27 class RefVectorHolderBase;
69 std::unique_ptr<reftobase::RefVectorHolderBase>
vectorHolder()
const;
83 #include "DataFormats/Common/interface/RefToBase.h" 98 if (
a.isInvalid() &&
b.isInvalid())
100 if (
a.isInvalid() ||
b.isInvalid())
102 return a.size() ==
b.size() &&
std::equal(
a.begin(),
a.end(),
b.begin());
113 template <
class REFV>
118 : holder_(iOther.holder_ ? iOther.holder_->
clone() : nullptr) {}
122 : holder_(new reftobase::IndirectVectorHolder<
T>(
p)) {}
143 if (holder_ ==
nullptr)
144 Exception::throwThis(
146 return holder_->
at(
idx);
156 return holder_ ? holder_->
empty() :
true;
161 return holder_ ? holder_->
size() : 0;
166 if (holder_ !=
nullptr)
190 template <
typename T>
192 pointers.reserve(this->
size());
193 helpers.reserve(this->
size());
194 for (const_iterator
i = begin(),
e =
end();
i !=
e; ++
i) {
197 pointers.push_back(address);
203 template <
typename T>
206 std::vector<void const*>& pointers,
211 template <
typename T>
216 template <
typename T>
218 if (holder_ ==
nullptr) {
219 std::unique_ptr<reftobase::BaseVectorHolder<T> >
p =
r.holder_->makeVectorHolder();
220 holder_ =
p.release();
225 template <
typename T>
227 return holder_ ? holder_->
vectorHolder() : std::unique_ptr<reftobase::RefVectorHolderBase>();
236 template <
typename T>
237 template <
typename C>
239 : holder_(new reftobase::VectorHolder<
constexpr bool operator==(ELseverityLevel const &e1, ELseverityLevel const &e2) noexcept
virtual ProductID id() const =0
virtual void push_back(BaseHolder< T > const *)=0
value_type at(size_type idx) const
holder_type::const_iterator const_iterator
Basic3DVector & operator=(const Basic3DVector &)=default
Assignment operator.
virtual const_iterator begin() const =0
virtual size_type size() const =0
#define CMS_CLASS_VERSION(_version_)
RefToBase< T > value_type
virtual EDProductGetter const * productGetter() const =0
reftobase::BaseVectorHolder< T > holder_type
bool equal(const T &first, const T &second)
virtual bool isAvailable() const =0
void swap(RefToBaseVector< T > &a, RefToBaseVector< T > &b)
const_iterator begin() const
Container::value_type value_type
std::unique_ptr< reftobase::RefVectorHolderBase > vectorHolder() const
void fillView(RefToBaseVector< T > const &obj, ProductID const &, std::vector< void const *> &pointers, FillViewHelperVector &helpers)
const_iterator end() const
bool isNull() const
Checks for null.
virtual const_iterator end() const =0
void swap(RefToBaseVector &other)
EDProductGetter const * productGetter() const
RefToBaseVector & operator=(RefToBaseVector const &iRHS)
value_type operator[](size_type idx) const
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
deadvectors [0] push_back({0.0175431, 0.538005, 6.80997, 13.29})
void push_back(const RefToBase< T > &)
virtual std::unique_ptr< RefVectorHolderBase > vectorHolder() const =0
void fillView(std::vector< void const *> &pointers, FillViewHelperVector &helpers) const
EDProductGetter const * productGetter(std::atomic< void const *> const &iCache)
virtual bool empty() const =0
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
T operator[](int i) const
virtual base_ref_type const at(size_type idx) const =0
holder_type::size_type size_type
std::vector< std::pair< edm::ProductID, unsigned long > > FillViewHelperVector