1 #ifndef DataFormats_Common_RefToBaseVector_h
2 #define DataFormats_Common_RefToBaseVector_h
18 template<
typename T>
class View;
19 template<
typename C>
class Handle;
22 template<
typename T>
class BaseVectorHolder;
23 class RefVectorHolderBase;
65 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());
240 helpers.reserve(this->
size());
244 pointers.push_back(address);
250 template <
typename T>
253 std::vector<void const*>& pointers,
258 template <
typename T>
263 template <
typename T>
265 if ( holder_ == 0 ) {
267 holder_ = p.release();
272 template <
typename T>
274 return holder_ ? holder_->
vectorHolder() : std::auto_ptr<reftobase::RefVectorHolderBase>();
286 holder_(new reftobase::VectorHolder<
T,
RefVector<
C, typename refhelper::ValueTrait<
C>::
value,
287 typename refhelper::FindTrait<
C,
T>::
value> >(h.id())) {
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
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 &)
void fillView(AssociationVector< KeyRefProd, CVal, KeyRef, SizeType, KeyReferenceHelper > const &obj, ProductID const &id, std::vector< void const * > &pointers, FillViewHelperVector &helpers)
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.
Container::value_type value_type
virtual std::auto_ptr< RefVectorHolderBase > vectorHolder() const =0
void fillView(std::vector< void const * > &pointers, FillViewHelperVector &helpers) const
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)
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
std::vector< std::pair< edm::ProductID, unsigned long > > FillViewHelperVector
tuple size
Write out results.
holder_type::size_type size_type