CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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

virtual RefHolderBaseclone () const
 
virtual bool fillRefIfMyTypeMatches (RefHolderBase &fillme, std::string &msg) const
 
REF const & getRef () const
 
virtual bool hasProductCache () const
 
virtual ProductID id () const
 
virtual bool isAvailable () const
 
virtual bool isEqualTo (RefHolderBase const &rhs) const
 
virtual size_t key () const
 
virtual std::auto_ptr
< RefVectorHolderBase
makeVectorHolder () const
 
virtual void const * product () const
 
virtual EDProductGetter const * productGetter () const
 
 RefHolder ()
 
 RefHolder (REF const &ref)
 
void setRef (REF const &r)
 
void swap (RefHolder &other)
 
virtual ~RefHolder ()
 
- 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

virtual void const * pointerToType (TypeWithDict const &iToType) const
 

Private Attributes

REF ref_
 

Detailed Description

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

Definition at line 38 of file EDProductfwd.h.

Constructor & Destructor Documentation

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

Definition at line 55 of file RefHolder_.h.

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

Definition at line 60 of file RefHolder_.h.

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

Definition at line 65 of file RefHolder_.h.

66  { }

Member Function Documentation

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

Definition at line 44 of file RefHolder_.h.

45 :
46  virtual void const* pointerToType(TypeWithDict const& iToType) const;
virtual void const * pointerToType(TypeWithDict const &iToType) const
Definition: RefHolder_.h:145
template<class REF >
RefHolderBase * edm::reftobase::RefHolder< REF >::clone ( void  ) const
virtual

Implements edm::reftobase::RefHolderBase.

Definition at line 70 of file RefHolder_.h.

71  {
72  return new RefHolder(ref_);
73  }
template<class REF >
bool edm::reftobase::RefHolder< REF >::fillRefIfMyTypeMatches ( RefHolderBase fillme,
std::string &  msg 
) const
virtual

Implements edm::reftobase::RefHolderBase.

Definition at line 92 of file RefHolder_.h.

References h, and mergeVDriftHistosByStation::name.

94  {
95  RefHolder* h = dynamic_cast<RefHolder*>(&fillme);
96  bool conversion_worked = (h != 0);
97  if (conversion_worked)
98  h->setRef(ref_);
99  else
100  msg = typeid(REF).name();
101  return conversion_worked;
102  }
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
template<class REF >
REF const & edm::reftobase::RefHolder< REF >::getRef ( ) const
inline

Definition at line 107 of file RefHolder_.h.

Referenced by edm::RefToBase< T >::castTo(), and edm::reftobase::RefVectorHolder< REFV >::push_back().

108  {
109  return ref_;
110  }
template<class REF >
bool edm::reftobase::RefHolder< REF >::hasProductCache ( ) const
virtual

Implements edm::reftobase::RefHolderBase.

Definition at line 118 of file RefHolder_.h.

118  {
119  return ref_.hasProductCache();
120  }
template<class REF >
ProductID edm::reftobase::RefHolder< REF >::id ( void  ) const
virtual

Implements edm::reftobase::RefHolderBase.

Definition at line 77 of file RefHolder_.h.

References edm::ProductID::id().

78  {
79  return ref_.id();
80  }
template<typename REF>
virtual bool edm::reftobase::RefHolder< REF >::isAvailable ( ) const
inlinevirtual

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

Implements edm::reftobase::RefHolderBase.

Definition at line 41 of file RefHolder_.h.

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

Implements edm::reftobase::RefHolderBase.

Definition at line 84 of file RefHolder_.h.

References edm::getRef(), and h.

85  {
86  RefHolder const* h(dynamic_cast<RefHolder const*>(&rhs));
87  return h && (getRef() == h->getRef());
88  }
REF const & getRef() const
Definition: RefHolder_.h:107
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
template<class REF >
size_t edm::reftobase::RefHolder< REF >::key ( ) const
virtual

Implements edm::reftobase::RefHolderBase.

Definition at line 27 of file RefHolder.h.

References relval_steps::key.

28  {
29  typedef typename RefKeyTrait<REF>::type helper;
30  return helper::key( ref_ );
31  }
type
Definition: HCALResponse.h:21
template<class REF >
std::auto_ptr< RefVectorHolderBase > edm::reftobase::RefHolder< REF >::makeVectorHolder ( ) const
virtual

Implements edm::reftobase::RefHolderBase.

Definition at line 14 of file RefHolder.h.

14  {
15  typedef typename RefHolderToRefVectorTrait<REF>::type helper;
16  return helper::makeVectorHolder();
17  }
type
Definition: HCALResponse.h:21
template<class REF >
void const * edm::reftobase::RefHolder< REF >::pointerToType ( TypeWithDict const &  iToType) const
privatevirtual

Implements edm::reftobase::RefHolderBase.

Definition at line 145 of file RefHolder_.h.

References edm::TypeWithDict::pointerToBaseType().

146  {
147  typedef typename REF::value_type contained_type;
148  static TypeWithDict const s_type(typeid(contained_type));
149 
150  return iToType.pointerToBaseType(ref_.get(), s_type);
151  }
Container::value_type value_type
template<class REF >
void const * edm::reftobase::RefHolder< REF >::product ( ) const
virtual

Implements edm::reftobase::RefHolderBase.

Definition at line 123 of file RefHolder_.h.

123  {
124  return ref_.product();
125  }
template<class REF >
EDProductGetter const * edm::reftobase::RefHolder< REF >::productGetter ( ) const
virtual

Implements edm::reftobase::RefHolderBase.

Definition at line 113 of file RefHolder_.h.

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

Definition at line 138 of file RefHolder_.h.

References alignCSCRings::r.

Referenced by edm::reftobase::Holder< T, REF >::fillRefIfMyTypeMatches().

139  {
140  ref_ = r;
141  }
template<class REF >
void edm::reftobase::RefHolder< REF >::swap ( RefHolder< REF > &  other)
inline

Definition at line 130 of file RefHolder_.h.

References std::swap().

131  {
132  std::swap(ref_, other.ref_);
133  }
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)

Member Data Documentation

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