CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
edm::reftobase::RefHolder< REF > Class Template Reference

#include <EDProductfwd.h>

Inheritance diagram for edm::reftobase::RefHolder< REF >:
edm::reftobase::RefHolderBase

Public Member Functions

RefHolderBaseclone () const override
 
bool fillRefIfMyTypeMatches (RefHolderBase &fillme, std::string &msg) const override
 
REF const & getRef () const
 
ProductID id () const override
 
bool isAvailable () const override
 
bool isEqualTo (RefHolderBase const &rhs) const override
 
bool isTransient () const override
 
size_t key () const override
 
std::unique_ptr< RefVectorHolderBasemakeVectorHolder () const override
 
EDProductGetter const * productGetter () const override
 
 RefHolder ()
 
 RefHolder (REF const &ref)
 
void setRef (REF const &r)
 
void swap (RefHolder &other)
 
 ~RefHolder () override
 
- Public Member Functions inherited from edm::reftobase::RefHolderBase
template<class T >
T const * getPtr () const
 
 RefHolderBase ()
 
virtual ~RefHolderBase ()
 

Static Public Member Functions

static short Class_Version ()
 

Private Member Functions

void const * pointerToType (std::type_info const &iToType) const override
 

Private Attributes

REF ref_
 

Detailed Description

template<class REF>
class edm::reftobase::RefHolder< REF >

Definition at line 37 of file EDProductfwd.h.

Constructor & Destructor Documentation

template<class REF >
edm::reftobase::RefHolder< REF >::RefHolder ( )

Definition at line 56 of file RefHolder_.h.

Referenced by edm::reftobase::RefHolder< REF >::clone().

template<class REF >
edm::reftobase::RefHolder< REF >::RefHolder ( REF const &  ref)
explicit

Definition at line 61 of file RefHolder_.h.

template<class REF >
edm::reftobase::RefHolder< REF >::~RefHolder ( )
override

Definition at line 66 of file RefHolder_.h.

67  { }

Member Function Documentation

template<class REF>
static short edm::reftobase::RefHolder< REF >::Class_Version ( )
inlinestatic

Definition at line 45 of file RefHolder_.h.

46 :
47  void const* pointerToType(std::type_info const& iToType) const override;
void const * pointerToType(std::type_info const &iToType) const override
Definition: RefHolder_.h:136
template<class REF >
RefHolderBase * edm::reftobase::RefHolder< REF >::clone ( void  ) const
overridevirtual
template<class REF >
bool edm::reftobase::RefHolder< REF >::fillRefIfMyTypeMatches ( RefHolderBase fillme,
std::string &  msg 
) const
overridevirtual

Implements edm::reftobase::RefHolderBase.

Definition at line 93 of file RefHolder_.h.

References h, dataset::name, and edm::reftobase::RefHolder< REF >::ref_.

95  {
96  RefHolder* h = dynamic_cast<RefHolder*>(&fillme);
97  bool conversion_worked = (h != nullptr);
98  if (conversion_worked)
99  h->setRef(ref_);
100  else
101  msg = typeid(REF).name();
102  return conversion_worked;
103  }
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
tuple msg
Definition: mps_check.py:279
template<class REF >
REF const & edm::reftobase::RefHolder< REF >::getRef ( ) const
inline
template<class REF >
ProductID edm::reftobase::RefHolder< REF >::id ( ) const
overridevirtual

Implements edm::reftobase::RefHolderBase.

Definition at line 78 of file RefHolder_.h.

References edm::reftobase::RefHolder< REF >::ref_.

79  {
80  return ref_.id();
81  }
template<class REF>
bool edm::reftobase::RefHolder< REF >::isAvailable ( ) const
inlineoverridevirtual

Checks if product collection is in memory or available in the Event. No type checking is done.

Implements edm::reftobase::RefHolderBase.

Definition at line 40 of file RefHolder_.h.

References edm::reftobase::RefHolder< REF >::ref_.

40 { return ref_.isAvailable(); }
template<class REF >
bool edm::reftobase::RefHolder< REF >::isEqualTo ( RefHolderBase const &  rhs) const
overridevirtual

Implements edm::reftobase::RefHolderBase.

Definition at line 85 of file RefHolder_.h.

References edm::reftobase::RefHolder< REF >::getRef(), and h.

86  {
87  RefHolder const* h(dynamic_cast<RefHolder const*>(&rhs));
88  return h && (getRef() == h->getRef());
89  }
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
REF const & getRef() const
Definition: RefHolder_.h:108
template<class REF>
bool edm::reftobase::RefHolder< REF >::isTransient ( ) const
inlineoverridevirtual

Implements edm::reftobase::RefHolderBase.

Definition at line 42 of file RefHolder_.h.

References edm::reftobase::RefHolder< REF >::ref_.

42 { return ref_.isTransient(); }
template<class REF >
size_t edm::reftobase::RefHolder< REF >::key ( ) const
overridevirtual

Implements edm::reftobase::RefHolderBase.

Definition at line 27 of file RefHolder.h.

References crabWrapper::key.

28  {
29  typedef typename RefKeyTrait<REF>::type helper;
30  return helper::key( ref_ );
31  }
Definition: helper.py:1
template<class REF >
std::unique_ptr< RefVectorHolderBase > edm::reftobase::RefHolder< REF >::makeVectorHolder ( ) const
overridevirtual

Implements edm::reftobase::RefHolderBase.

Definition at line 14 of file RefHolder.h.

14  {
16  return helper::makeVectorHolder();
17  }
Definition: helper.py:1
InvalidRefHolderToRefVector< REF > type
template<class REF >
void const * edm::reftobase::RefHolder< REF >::pointerToType ( std::type_info const &  iToType) const
overrideprivatevirtual

Implements edm::reftobase::RefHolderBase.

Definition at line 136 of file RefHolder_.h.

References edm::pointerToBase(), and edm::reftobase::RefHolder< REF >::ref_.

136  {
137  typedef typename REF::value_type contained_type;
138  if(iToType == typeid(contained_type)) {
139  return ref_.get();
140  }
141  return pointerToBase(iToType, ref_.get());
142  }
void const * pointerToBase(std::type_info const &baseTypeInfo, T const *address)
Definition: OffsetToBase.h:47
template<class REF >
EDProductGetter const * edm::reftobase::RefHolder< REF >::productGetter ( ) const
overridevirtual

Implements edm::reftobase::RefHolderBase.

Definition at line 114 of file RefHolder_.h.

References edm::reftobase::RefHolder< REF >::ref_.

114  {
115  return ref_.productGetter();
116  }
template<class REF >
void edm::reftobase::RefHolder< REF >::setRef ( REF const &  r)
inline
template<class REF >
void edm::reftobase::RefHolder< REF >::swap ( RefHolder< REF > &  other)
inline

Definition at line 121 of file RefHolder_.h.

References edm::reftobase::RefHolder< REF >::ref_, and std::swap().

122  {
123  std::swap(ref_, other.ref_);
124  }
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)

Member Data Documentation

template<class REF>
REF edm::reftobase::RefHolder< REF >::ref_
private