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 (Reflex::Type const &iToType) const
 

Private Attributes

REF ref_
 

Detailed Description

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

Definition at line 39 of file EDProductfwd.h.

Constructor & Destructor Documentation

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

Definition at line 56 of file RefHolder_.h.

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 ( )
virtual

Definition at line 66 of file RefHolder_.h.

67  { }

Member Function Documentation

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

Definition at line 45 of file RefHolder_.h.

46 :
47  virtual void const* pointerToType(Reflex::Type const& iToType) const;
virtual void const * pointerToType(Reflex::Type const &iToType) const
Definition: RefHolder_.h:146
template<class REF >
RefHolderBase * edm::reftobase::RefHolder< REF >::clone ( void  ) const
virtual

Implements edm::reftobase::RefHolderBase.

Definition at line 71 of file RefHolder_.h.

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

Implements edm::reftobase::RefHolderBase.

Definition at line 93 of file RefHolder_.h.

References h, and mergeVDriftHistosByStation::name.

95  {
96  RefHolder* h = dynamic_cast<RefHolder*>(&fillme);
97  bool conversion_worked = (h != 0);
98  if (conversion_worked)
99  h->setRef(ref_);
100  else
101  msg = typeid(REF).name();
102  return conversion_worked;
103  }
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 108 of file RefHolder_.h.

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

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

Implements edm::reftobase::RefHolderBase.

Definition at line 119 of file RefHolder_.h.

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

Implements edm::reftobase::RefHolderBase.

Definition at line 78 of file RefHolder_.h.

References edm::ProductID::id().

79  {
80  return ref_.id();
81  }
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 42 of file RefHolder_.h.

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

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

Implements edm::reftobase::RefHolderBase.

Definition at line 85 of file RefHolder_.h.

References edm::getRef(), and h.

86  {
87  RefHolder const* h(dynamic_cast<RefHolder const*>(&rhs));
88  return h && (getRef() == h->getRef());
89  }
REF const & getRef() const
Definition: RefHolder_.h:108
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 combine::key.

28  {
29  typedef typename RefKeyTrait<REF>::type helper;
30  return helper::key( ref_ );
31  }
type
Definition: HCALResponse.h:22
list key
Definition: combine.py:13
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:22
template<class REF >
void const * edm::reftobase::RefHolder< REF >::pointerToType ( Reflex::Type const &  iToType) const
privatevirtual

Implements edm::reftobase::RefHolderBase.

Definition at line 146 of file RefHolder_.h.

References getGTfromDQMFile::obj.

147  {
148  typedef typename REF::value_type contained_type;
149  static const Reflex::Type s_type(Reflex::Type::ByTypeInfo(typeid(contained_type)));
150 
151  // The const_cast below is needed because
152  // Object's constructor requires a pointer to
153  // non-const void, although the implementation does not, of
154  // course, modify the object to which the pointer points.
155  Reflex::Object obj(s_type, const_cast<void*>(static_cast<const void*>(ref_.get())));
156  if ( s_type == iToType ) return obj.Address();
157  Reflex::Object cast = obj.CastObject(iToType);
158  return cast.Address(); // returns void*, after pointer adjustment
159  }
Container::value_type value_type
template<class REF >
void const * edm::reftobase::RefHolder< REF >::product ( ) const
virtual

Implements edm::reftobase::RefHolderBase.

Definition at line 124 of file RefHolder_.h.

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

Implements edm::reftobase::RefHolderBase.

Definition at line 114 of file RefHolder_.h.

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

Definition at line 139 of file RefHolder_.h.

References alignCSCRings::r.

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

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

Definition at line 131 of file RefHolder_.h.

References std::swap().

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

Member Data Documentation

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

Definition at line 48 of file RefHolder_.h.

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