1 #ifndef DataFormats_Common_Wrapper_h
2 #define DataFormats_Common_Wrapper_h
19 #include "boost/mpl/if.hpp"
29 class Wrapper :
public EDProduct {
34 explicit Wrapper(std::auto_ptr<T> ptr);
57 std::vector<void const*>& pointers,
59 virtual void do_setPtr(std::type_info
const& iToType,
61 void const*& oPtr)
const;
63 std::vector<unsigned long>
const& iIndices,
64 std::vector<void const*>& oPtr)
const;
86 std::vector<void const*>& pointers,
94 std::vector<void const*>&,
99 "\ndoes not support Views\n");
103 template <
typename T>
106 std::vector<void const*>& pointers,
111 maybe_filler(
obj,
id, pointers, helpers);
115 template <
typename T>
118 std::type_info
const& iToType,
119 unsigned long iIndex,
120 void const*& oPtr)
const;
122 std::type_info
const& iToType,
123 std::vector<unsigned long>
const& iIndex,
124 std::vector<void const*>& oPtr)
const;
127 template <
typename T>
130 std::type_info
const&,
132 void const*& oPtr)
const {
136 "\ndoes not support edm::Ptr\n");
139 std::type_info
const& iToType,
140 std::vector<unsigned long>
const& iIndex,
141 std::vector<void const*>& oPtr)
const {
145 "\ndoes not support edm::PtrVector\n");
149 template <
typename T>
152 unsigned long iIndex,
153 void const*& oPtr)
const {
157 maybe_filler(this->
obj,iToType,iIndex,oPtr);
160 template <
typename T>
162 std::vector<unsigned long>
const& iIndices,
163 std::vector<void const*>& oPtr)
const {
167 maybe_filler(this->
obj,iToType,iIndices,oPtr);
175 template <
typename T>
180 template <
typename T>
186 template <
typename T>
191 template <
typename T>
196 template <
typename T>
201 template <
typename T>
206 template <
typename T>
211 template <
typename T>
216 template <
typename T>
218 bool operator()(T
const&
a, T
const&
b)
const {
return a.isProductEqual(b); }
221 template <
typename T>
245 sizeof(has_swap_helper<T>(0)) ==
sizeof(
yes_tag);
256 sizeof(has_mergeProduct_helper<T>(0)) ==
sizeof(
yes_tag);
266 sizeof(has_isProductEqual_helper<T>(0)) ==
sizeof(
yes_tag);
271 template <
typename T>
282 swap_or_assign(
obj, *ptr);
286 template <
typename T>
291 std::auto_ptr<T>
temp(ptr);
298 swap_or_assign(
obj, *ptr);
304 template <
typename T>
309 return is_mergeable(
obj);
312 template <
typename T>
315 if (wrappedNewProduct == 0)
return false;
319 return merge_product(
obj, wrappedNewProduct->obj);
322 template <
typename T>
327 return has_is_equal(
obj);
330 template <
typename T>
333 if (wrappedNewProduct == 0)
return false;
337 return is_equal(
obj, wrappedNewProduct->obj);
351 std::vector<void const*>& pointers,
361 fillView(obj,
id, pointers, * helpers);
362 assert(pointers.size() == helpers->size());
370 std::vector<void const*>& pointers,
374 pointers.reserve(h->size());
386 std::vector<void const*>& pointers,
390 pointers.reserve(obj.
size());
401 std::type_info
const& iToType,
402 unsigned long iIndex,
408 setPtr(obj, iToType, iIndex, oPtr);
412 std::type_info
const& iToType,
413 std::vector<unsigned long>
const& iIndex,
414 std::vector<void const*>& oPtr) {
424 template <
typename T>
427 std::vector<void const*>& pointers,
432 template <
typename T>
434 std::type_info
const& iToType,
435 unsigned long iIndex,
436 void const*& oPtr)
const {
440 template <
typename T>
442 std::type_info
const& iToType,
443 std::vector<unsigned long>
const& iIndices,
444 std::vector<void const*>& oPtr)
const {
void operator()(T &a, T &b)
T const * operator->() const
size_type size() const
Size of the RefVector.
bool operator()(T const &a) const
void operator()(T const &, std::type_info const &, unsigned long, void const *&oPtr) const
bool operator()(T const &a) const
virtual bool mergeProduct_(EDProduct const *newProduct)
void fillView(AssociationVector< KeyRefProd, CVal, KeyRef, SizeType, KeyReferenceHelper > const &obj, ProductID const &id, std::vector< void const * > &pointers, helper_vector &helpers)
static void set(T const &obj, std::type_info const &iToType, unsigned long iIndex, void const *&oPtr)
bool operator()(T &a, T const &b)
virtual bool isMergeable_() const
static std::type_info const & productTypeInfo()
bool operator()(T const &a) const
void operator()(T const &obj, std::type_info const &iToType, std::vector< unsigned long > const &iIndex, std::vector< void const * > &oPtr) const
bool operator()(T const &a, T const &b) const
virtual bool hasIsProductEqual_() const
static void fill(RefToBaseVector< T > const &obj, ProductID const &id, std::vector< void const * > &pointers, helper_vector_ptr &helpers)
void operator()(T const &, ProductID const &, std::vector< void const * > &, helper_vector_ptr &) const
static void throwThis(Code category, char const *message0="", char const *message1="", char const *message2="", char const *message3="", char const *message4="")
static void fill(T const &obj, std::type_info const &iToType, std::vector< unsigned long > const &iIndex, std::vector< void const * > &oPtr)
virtual std::type_info const & dynamicTypeInfo_() const
no_tag has_isProductEqual_helper(...)
void operator()(T &a, T &b)
tuple obj
Example code starts here #.
bool operator()(T const &a) const
virtual bool isPresent_() const
virtual void do_fillView(ProductID const &id, std::vector< void const * > &pointers, helper_vector_ptr &helpers) const
std::auto_ptr< reftobase::RefVectorHolderBase > vectorHolder() const
static void fill(T const &obj, ProductID const &id, std::vector< void const * > &pointers, helper_vector_ptr &helpers)
no_tag has_swap_helper(...)
void setPtr(OwnVector< T, P > const &obj, std::type_info const &toType, unsigned long index, void const *&ptr)
boost::shared_ptr< reftobase::RefVectorHolderBase > helper_vector_ptr
T const * product() const
bool operator()(T &a, T const &b)
virtual void do_fillPtrVector(std::type_info const &iToType, std::vector< unsigned long > const &iIndices, std::vector< void const * > &oPtr) const
void operator()(T const &obj, ProductID const &id, std::vector< void const * > &pointers, helper_vector_ptr &helpers) const
void operator()(T const &obj, std::type_info const &iToType, unsigned long iIndex, void const *&oPtr) const
static void fill(PtrVector< T > const &obj, ProductID const &id, std::vector< void const * > &pointers, helper_vector_ptr &helpers)
virtual bool isProductEqual_(EDProduct const *newProduct) const
void fillPtrVector(std::vector< T, A > const &obj, const std::type_info &iToType, const std::vector< unsigned long > &iIndicies, std::vector< void const * > &oPtr)
virtual void do_setPtr(std::type_info const &iToType, unsigned long iIndex, void const *&oPtr) const
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Wrapper< T > & operator=(Wrapper< T > const &)
T get(const Candidate &c)
no_tag has_mergeProduct_helper(...)
bool operator()(T const &a, T const &b) const
static std::type_info const & typeInfo()