#include <DataFormats/Common/interface/Wrapper.h>
Public Types | |
typedef T | value_type |
typedef T | wrapped_type |
Public Member Functions | |
T const * | operator-> () const |
T const * | product () const |
Wrapper (T *) | |
REFLEX must call the following constructor the constructor takes ownership of T*. | |
Wrapper (std::auto_ptr< T > ptr) | |
Wrapper () | |
virtual | ~Wrapper () |
Static Public Member Functions | |
static const std::type_info & | productTypeInfo () |
static const std::type_info & | typeInfo () |
Private Member Functions | |
virtual void | do_fillPtrVector (const std::type_info &iToType, const std::vector< unsigned long > &iIndicies, std::vector< void const * > &oPtr) const |
virtual void | do_fillView (ProductID const &id, std::vector< void const * > &pointers, helper_vector_ptr &helpers) const |
virtual void | do_setPtr (const std::type_info &iToType, unsigned long iIndex, void const *&oPtr) const |
virtual bool | hasIsProductEqual_ () |
virtual bool | isMergeable_ () |
virtual bool | isPresent_ () const |
virtual bool | isProductEqual_ (EDProduct *newProduct) |
virtual bool | mergeProduct_ (EDProduct *newProduct) |
Wrapper< T > & | operator= (Wrapper< T > const &) |
Wrapper (Wrapper< T > const &rh) | |
Private Attributes | |
T | obj |
bool | present |
Definition at line 30 of file Wrapper.h.
typedef T edm::Wrapper< T >::value_type |
typedef T edm::Wrapper< T >::wrapped_type |
edm::Wrapper< T >::Wrapper | ( | ) | [inline] |
edm::Wrapper< T >::Wrapper | ( | std::auto_ptr< T > | ptr | ) | [inline, explicit] |
Definition at line 296 of file Wrapper.h.
References edm::Wrapper< T >::obj, edm::Wrapper< T >::present, and value.
00296 : 00297 EDProduct(), 00298 present(ptr.get() != 0), 00299 obj() 00300 { 00301 if (present) { 00302 // The following will call swap if T has such a function, 00303 // and use assignment if T has no such function. 00304 typename boost::mpl::if_c<detail::has_swap_function<T>::value, 00305 DoSwap<T>, 00306 DoAssign<T> >::type swap_or_assign; 00307 swap_or_assign(obj, *ptr); 00308 } 00309 }
virtual edm::Wrapper< T >::~Wrapper | ( | ) | [inline, virtual] |
edm::Wrapper< T >::Wrapper | ( | T * | ptr | ) | [inline] |
REFLEX must call the following constructor the constructor takes ownership of T*.
Definition at line 312 of file Wrapper.h.
References edm::Wrapper< T >::obj, edm::Wrapper< T >::present, pyDBSRunClass::temp, and value.
00312 : 00313 EDProduct(), 00314 present(ptr != 0), 00315 obj() 00316 { 00317 std::auto_ptr<T> temp(ptr); 00318 if (present) { 00319 // The following will call swap if T has such a function, 00320 // and use assignment if T has no such function. 00321 typename boost::mpl::if_c<detail::has_swap_function<T>::value, 00322 DoSwap<T>, 00323 DoAssign<T> >::type swap_or_assign; 00324 swap_or_assign(obj, *ptr); 00325 } 00326 00327 }
edm::Wrapper< T >::Wrapper | ( | Wrapper< T > const & | rh | ) | [private] |
void edm::Wrapper< T >::do_fillPtrVector | ( | const std::type_info & | iToType, | |
const std::vector< unsigned long > & | iIndicies, | |||
std::vector< void const * > & | oPtr | |||
) | const [inline, private, virtual] |
Implements edm::EDProduct.
Definition at line 170 of file Wrapper.h.
References value.
00173 { 00174 typename boost::mpl::if_c<has_setPtr<T>::value, 00175 DoSetPtr<T>, 00176 DoNotSetPtr<T> >::type maybe_filler; 00177 maybe_filler(this->obj,iToType,iIndicies,oPtr); 00178 }
void edm::Wrapper< T >::do_fillView | ( | ProductID const & | id, | |
std::vector< void const * > & | pointers, | |||
helper_vector_ptr & | helpers | |||
) | const [inline, private, virtual] |
Implements edm::EDProduct.
Definition at line 108 of file Wrapper.h.
References edm::Wrapper< T >::obj, and value.
00111 { 00112 typename boost::mpl::if_c<has_fillView<T>::value, 00113 DoFillView<T>, 00114 DoNotFillView<T> >::type maybe_filler; 00115 maybe_filler(obj, id, pointers, helpers); 00116 }
void edm::Wrapper< T >::do_setPtr | ( | const std::type_info & | iToType, | |
unsigned long | iIndex, | |||
void const *& | oPtr | |||
) | const [inline, private, virtual] |
Implements edm::EDProduct.
Definition at line 159 of file Wrapper.h.
References value.
00162 { 00163 typename boost::mpl::if_c<has_setPtr<T>::value, 00164 DoSetPtr<T>, 00165 DoNotSetPtr<T> >::type maybe_filler; 00166 maybe_filler(this->obj,iToType,iIndex,oPtr); 00167 }
bool edm::Wrapper< T >::hasIsProductEqual_ | ( | ) | [inline, private, virtual] |
Reimplemented from edm::EDProduct.
Definition at line 351 of file Wrapper.h.
References edm::Wrapper< T >::obj, and value.
00352 { 00353 typename boost::mpl::if_c<detail::has_isProductEqual_function<T>::value, 00354 DoHasIsProductEqual<T>, 00355 DoNotHasIsProductEqual<T> >::type has_is_equal; 00356 return has_is_equal(obj); 00357 }
bool edm::Wrapper< T >::isMergeable_ | ( | ) | [inline, private, virtual] |
Reimplemented from edm::EDProduct.
Definition at line 331 of file Wrapper.h.
References edm::Wrapper< T >::obj, and value.
00332 { 00333 typename boost::mpl::if_c<detail::has_mergeProduct_function<T>::value, 00334 IsMergeable<T>, 00335 IsNotMergeable<T> >::type is_mergeable; 00336 return is_mergeable(obj); 00337 }
virtual bool edm::Wrapper< T >::isPresent_ | ( | ) | const [inline, private, virtual] |
Reimplemented from edm::EDProduct.
Definition at line 49 of file Wrapper.h.
References edm::Wrapper< T >::present.
00049 {return present;}
bool edm::Wrapper< T >::isProductEqual_ | ( | EDProduct * | newProduct | ) | [inline, private, virtual] |
Reimplemented from edm::EDProduct.
Definition at line 360 of file Wrapper.h.
References edm::Wrapper< T >::obj, and value.
00361 { 00362 Wrapper<T>* wrappedNewProduct = dynamic_cast<Wrapper<T>* >(newProduct); 00363 if (wrappedNewProduct == 0) return false; 00364 typename boost::mpl::if_c<detail::has_isProductEqual_function<T>::value, 00365 DoIsProductEqual<T>, 00366 DoNotIsProductEqual<T> >::type is_equal; 00367 return is_equal(obj, wrappedNewProduct->obj); 00368 }
bool edm::Wrapper< T >::mergeProduct_ | ( | EDProduct * | newProduct | ) | [inline, private, virtual] |
Reimplemented from edm::EDProduct.
Definition at line 340 of file Wrapper.h.
References edm::Wrapper< T >::obj, and value.
00341 { 00342 Wrapper<T>* wrappedNewProduct = dynamic_cast<Wrapper<T>* >(newProduct); 00343 if (wrappedNewProduct == 0) return false; 00344 typename boost::mpl::if_c<detail::has_mergeProduct_function<T>::value, 00345 DoMergeProduct<T>, 00346 DoNotMergeProduct<T> >::type merge_product; 00347 return merge_product(obj, wrappedNewProduct->obj); 00348 }
T const* edm::Wrapper< T >::operator-> | ( | ) | const [inline] |
Definition at line 38 of file Wrapper.h.
References edm::Wrapper< T >::product().
00038 {return product();}
Wrapper<T>& edm::Wrapper< T >::operator= | ( | Wrapper< T > const & | ) | [private] |
T const* edm::Wrapper< T >::product | ( | ) | const [inline] |
Definition at line 37 of file Wrapper.h.
References edm::Wrapper< T >::obj, and edm::Wrapper< T >::present.
Referenced by edm::convert_handle(), fwlite::Handle< T >::getByLabel(), edm::refcore::getProductPtr_(), edm::Wrapper< T >::operator->(), and edm::Event::put().
static const std::type_info& edm::Wrapper< T >::productTypeInfo | ( | ) | [inline, static] |
static const std::type_info& edm::Wrapper< T >::typeInfo | ( | ) | [inline, static] |
Definition at line 42 of file Wrapper.h.
Referenced by fwlite::Handle< T >::getBranchNameFor(), and fwlite::Handle< T >::getByLabel().
T edm::Wrapper< T >::obj [private] |
Definition at line 73 of file Wrapper.h.
Referenced by edm::Wrapper< T >::do_fillView(), edm::Wrapper< T >::hasIsProductEqual_(), edm::Wrapper< T >::isMergeable_(), edm::Wrapper< T >::isProductEqual_(), edm::Wrapper< T >::mergeProduct_(), edm::Wrapper< T >::product(), edm::helpers::PtrSetter< T >::set(), and edm::Wrapper< T >::Wrapper().
bool edm::Wrapper< T >::present [private] |
Definition at line 71 of file Wrapper.h.
Referenced by edm::Wrapper< T >::isPresent_(), edm::Wrapper< T >::product(), and edm::Wrapper< T >::Wrapper().