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 ProductID id () const
 
virtual bool isAvailable () const
 
virtual bool isEqualTo (RefHolderBase const &rhs) const
 
virtual bool isTransient () const
 
virtual size_t key () const
 
virtual std::auto_ptr
< RefVectorHolderBase
makeVectorHolder () 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 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(TypeWithDict const& iToType) const GCC11_OVERRIDE;
#define GCC11_OVERRIDE
virtual void const * pointerToType(TypeWithDict const &iToType) const
Definition: RefHolder_.h:136
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::RefVectorHolder< REFV >::push_back().

109  {
110  return ref_;
111  }
template<class REF >
ProductID edm::reftobase::RefHolder< REF >::id ( ) 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 40 of file RefHolder_.h.

40 { 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<typename REF>
virtual bool edm::reftobase::RefHolder< REF >::isTransient ( ) const
inlinevirtual

Implements edm::reftobase::RefHolderBase.

Definition at line 42 of file RefHolder_.h.

42 { return ref_.isTransient(); }
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
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
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 136 of file RefHolder_.h.

References edm::TypeWithDict::pointerToBaseType().

137  {
138  typedef typename REF::value_type contained_type;
139  static TypeWithDict const s_type(typeid(contained_type));
140 
141  return iToType.pointerToBaseType(ref_.get(), s_type);
142  }
Container::value_type value_type
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 129 of file RefHolder_.h.

References alignCSCRings::r.

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

130  {
131  ref_ = r;
132  }
template<class REF >
void edm::reftobase::RefHolder< REF >::swap ( RefHolder< REF > &  other)
inline

Definition at line 121 of file RefHolder_.h.

References std::swap().

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

Member Data Documentation

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