1 #ifndef DataFormats_Common_RefToBaseVector_h
2 #define DataFormats_Common_RefToBaseVector_h
16 template<
typename T>
class View;
17 template<
typename C>
class Handle;
20 template<
typename T>
class BaseVectorHolder;
21 class RefVectorHolderBase;
62 void fillView(std::vector<void const*>& pointers)
const;
63 std::auto_ptr<reftobase::RefVectorHolderBase>
vectorHolder()
const;
78 #include "DataFormats/Common/interface/RefToBase.h"
115 template <
class REFV>
118 holder_(new reftobase::VectorHolder<
T,REFV>(iRef))
124 holder_(iOther.holder_ ? iOther.holder_->
clone() : 0)
130 holder_(new reftobase::IndirectVectorHolder<
T>(p)) {
163 "Trying to dereference null RefToBaseVector<T> in method: at(",
166 return holder_->
at( idx );
182 return holder_ ? holder_->
empty() :
true;
190 return holder_ ? holder_->
size() : 0;
234 template <
typename T>
238 pointers.reserve(this->
size());
242 pointers.push_back(address);
247 template <
typename T>
249 std::vector<void const*>& pointers) {
253 template <
typename T>
258 template <
typename T>
260 if ( holder_ == 0 ) {
262 holder_ = p.release();
267 template <
typename T>
269 return holder_ ? holder_->
vectorHolder() : std::auto_ptr<reftobase::RefVectorHolderBase>();
272 template <
typename T>
274 return holder_ ? holder_->
product() : 0;
287 holder_(new reftobase::VectorHolder<
T,
RefVector<
C, typename refhelper::ValueTrait<
C>::
value,
288 typename refhelper::FindTrait<
C,
T>::
value> >(h.id())) {
virtual void const * product() const =0
virtual ProductID id() const =0
virtual void push_back(BaseHolder< T > const *)=0
holder_type::const_iterator const_iterator
virtual const_iterator begin() const =0
value_type operator[](size_type idx) const
void fillView(AssociationVector< KeyRefProd, CVal, KeyRef, SizeType, KeyReferenceHelper > const &obj, ProductID const &id, std::vector< void const * > &pointers, helper_vector &helpers)
const_iterator end() const
virtual size_type size() const =0
#define CMS_CLASS_VERSION(_version_)
value_type at(size_type idx) const
RefToBase< T > value_type
virtual EDProductGetter const * productGetter() const =0
virtual std::auto_ptr< BaseVectorHolder< T > > makeVectorHolder() const =0
void swap(Association< C > &lhs, Association< C > &rhs)
reftobase::BaseVectorHolder< T > holder_type
bool equal(const T &first, const T &second)
EDProductGetter const * productGetter() const
static void throwThis(Code category, char const *message0="", char const *message1="", char const *message2="", char const *message3="", char const *message4="")
virtual bool isAvailable() const =0
reftobase::BaseHolder< value_type > * holder_
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
bool operator==(debugging_allocator< X > const &, debugging_allocator< Y > const &)
std::auto_ptr< reftobase::RefVectorHolderBase > vectorHolder() const
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
virtual std::auto_ptr< RefVectorHolderBase > vectorHolder() const =0
virtual const_iterator end() const =0
void swap(RefToBaseVector &other)
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
bool isNull() const
Checks for null.
RefToBaseVector & operator=(RefToBaseVector const &iRHS)
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
void fillView(std::vector< void const * > &pointers) const
const_iterator begin() const
void push_back(const RefToBase< T > &)
virtual bool empty() const =0
virtual base_ref_type const at(size_type idx) const =0
tuple size
Write out results.
holder_type::size_type size_type
const void * product() const