1 #ifndef DataFormats_Common_RefToBaseVector_h
2 #define DataFormats_Common_RefToBaseVector_h
10 #include "boost/shared_ptr.hpp"
15 template<
typename T>
class View;
16 template<
typename C>
class Handle;
19 template<
typename T>
class BaseVectorHolder;
20 class RefVectorHolderBase;
63 void fillView(std::vector<void const*>& pointers)
const;
64 std::auto_ptr<reftobase::RefVectorHolderBase>
vectorHolder()
const;
79 #include "DataFormats/Common/interface/RefToBase.h"
116 template <
class REFV>
119 holder_(new reftobase::VectorHolder<
T,REFV>(iRef))
125 holder_(iOther.holder_ ? iOther.holder_->
clone() : 0)
131 holder_(new reftobase::IndirectVectorHolder<
T>(p)) {
164 "Trying to dereference null RefToBaseVector<T> in method: at(",
167 return holder_->
at( idx );
183 return holder_ ? holder_->
empty() :
true;
191 return holder_ ? holder_->
size() : 0;
235 template <
typename T>
239 pointers.reserve(this->
size());
243 pointers.push_back(address);
248 template <
typename T>
250 std::vector<void const*>& pointers) {
254 template <
typename T>
259 template <
typename T>
261 if ( holder_ == 0 ) {
263 holder_ = p.release();
268 template <
typename T>
270 return holder_ ? holder_->
vectorHolder() : std::auto_ptr<reftobase::RefVectorHolderBase>();
273 template <
typename T>
275 return holder_ ? holder_->
product() : 0;
289 holder_(new reftobase::VectorHolder<
T,
RefVector<
C, typename refhelper::ValueTrait<
C>::
value,
290 typename refhelper::FindTrait<
C,
T>::
value> >(h.id())) {
294 template<
typename T1>
296 holder_(
h->refVector().holder_->cloneEmpty()) {
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
bool isNull() const
Checks for null.
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
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...
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 > &)
reftobase::BaseHolder< value_type > * holder_
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