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 override
 
virtual bool fillRefIfMyTypeMatches (RefHolderBase &fillme, std::string &msg) const override
 
REF const & getRef () const
 
virtual ProductID id () const override
 
virtual bool isAvailable () const override
 
virtual bool isEqualTo (RefHolderBase const &rhs) const override
 
virtual bool isTransient () const override
 
virtual size_t key () const override
 
virtual std::auto_ptr
< RefVectorHolderBase
makeVectorHolder () const override
 
virtual EDProductGetter const * productGetter () const override
 
 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 (std::type_info const &iToType) const override
 

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 57 of file RefHolder_.h.

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

Definition at line 62 of file RefHolder_.h.

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

Definition at line 67 of file RefHolder_.h.

68  { }

Member Function Documentation

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

Definition at line 46 of file RefHolder_.h.

47 :
48  virtual void const* pointerToType(std::type_info const& iToType) const override;
virtual void const * pointerToType(std::type_info const &iToType) const override
Definition: RefHolder_.h:137
template<class REF >
RefHolderBase * edm::reftobase::RefHolder< REF >::clone ( void  ) const
overridevirtual

Implements edm::reftobase::RefHolderBase.

Definition at line 72 of file RefHolder_.h.

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

Implements edm::reftobase::RefHolderBase.

Definition at line 94 of file RefHolder_.h.

References h, and mergeVDriftHistosByStation::name.

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

Definition at line 109 of file RefHolder_.h.

Referenced by edm::reftobase::RefVectorHolder< REFV >::push_back().

110  {
111  return ref_;
112  }
template<class REF >
ProductID edm::reftobase::RefHolder< REF >::id ( ) const
overridevirtual

Implements edm::reftobase::RefHolderBase.

Definition at line 79 of file RefHolder_.h.

References edm::ProductID::id().

80  {
81  return ref_.id();
82  }
template<typename REF>
virtual 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 41 of file RefHolder_.h.

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

Implements edm::reftobase::RefHolderBase.

Definition at line 86 of file RefHolder_.h.

References edm::getRef(), and h.

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

Implements edm::reftobase::RefHolderBase.

Definition at line 43 of file RefHolder_.h.

43 { 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 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
overridevirtual

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 ( std::type_info const &  iToType) const
overrideprivatevirtual

Implements edm::reftobase::RefHolderBase.

Definition at line 137 of file RefHolder_.h.

References edm::pointerToBase().

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

Implements edm::reftobase::RefHolderBase.

Definition at line 115 of file RefHolder_.h.

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

Definition at line 130 of file RefHolder_.h.

References alignCSCRings::r.

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

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

Definition at line 122 of file RefHolder_.h.

References std::swap().

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

Member Data Documentation

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