1 #ifndef DataFormats_Common_RefToBaseVector_h
2 #define DataFormats_Common_RefToBaseVector_h
15 template<
typename T>
class View;
16 template<
typename C>
class Handle;
19 template<
typename T>
class BaseVectorHolder;
20 class RefVectorHolderBase;
61 void fillView(std::vector<void const*>& pointers)
const;
62 std::auto_ptr<reftobase::RefVectorHolderBase>
vectorHolder()
const;
77 #include "DataFormats/Common/interface/RefToBase.h"
114 template <
class REFV>
117 holder_(new reftobase::VectorHolder<
T,REFV>(iRef))
123 holder_(iOther.holder_ ? iOther.holder_->
clone() : 0)
129 holder_(new reftobase::IndirectVectorHolder<
T>(p)) {
162 "Trying to dereference null RefToBaseVector<T> in method: at(",
165 return holder_->
at( idx );
181 return holder_ ? holder_->
empty() :
true;
189 return holder_ ? holder_->
size() : 0;
233 template <
typename T>
237 pointers.reserve(this->
size());
241 pointers.push_back(address);
246 template <
typename T>
248 std::vector<void const*>& pointers) {
252 template <
typename T>
257 template <
typename T>
259 if ( holder_ == 0 ) {
261 holder_ = p.release();
266 template <
typename T>
268 return holder_ ? holder_->
vectorHolder() : std::auto_ptr<reftobase::RefVectorHolderBase>();
271 template <
typename T>
273 return holder_ ? holder_->
product() : 0;
286 holder_(new reftobase::VectorHolder<
T,
RefVector<
C, typename refhelper::ValueTrait<
C>::
value,
287 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