CMS 3D CMS Logo

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

#include <EDProductfwd.h>

Inheritance diagram for edm::reftobase::Holder< T, REF >:
edm::reftobase::BaseHolder< T >

Public Member Functions

BaseHolder< T > * clone () const override
 
T const * getPtr () const override
 
REF const & getRef () const
 
 Holder ()
 
 Holder (Holder const &other)
 
 Holder (REF const &iRef)
 
std::unique_ptr< RefHolderBaseholder () const override
 
ProductID id () const override
 
bool isAvailable () const override
 
bool isEqualTo (BaseHolder< T > const &rhs) const override
 
bool isTransient () const override
 
size_t key () const override
 
std::unique_ptr< BaseVectorHolder< T > > makeVectorHolder () const override
 
Holderoperator= (Holder const &rhs)
 
EDProductGetter const * productGetter () const override
 
void swap (Holder &other)
 
 ~Holder () override
 
- Public Member Functions inherited from edm::reftobase::BaseHolder< T >
 BaseHolder ()
 
void swap (BaseHolder &)
 
virtual ~BaseHolder ()
 

Static Public Member Functions

static short Class_Version ()
 
- Static Public Member Functions inherited from edm::reftobase::BaseHolder< T >
static short Class_Version ()
 

Private Attributes

REF ref_
 

Additional Inherited Members

- Protected Member Functions inherited from edm::reftobase::BaseHolder< T >
 BaseHolder (BaseHolder const &other)
 
BaseHolderoperator= (BaseHolder const &rhs)
 

Detailed Description

template<class T, class REF>
class edm::reftobase::Holder< T, REF >

Definition at line 45 of file EDProductfwd.h.

Constructor & Destructor Documentation

◆ Holder() [1/3]

template<class T , class REF >
edm::reftobase::Holder< T, REF >::Holder ( )
inline

Definition at line 56 of file Holder.h.

56 : BaseHolder<T>(), ref_() {}

◆ Holder() [2/3]

template<class T , class REF >
edm::reftobase::Holder< T, REF >::Holder ( Holder< T, REF > const &  other)
inline

Definition at line 59 of file Holder.h.

59 : BaseHolder<T>(other), ref_(other.ref_) {}

◆ Holder() [3/3]

template<class T , class REF >
edm::reftobase::Holder< T, REF >::Holder ( REF const &  iRef)
inlineexplicit

Definition at line 62 of file Holder.h.

62 : BaseHolder<T>(), ref_(r) {}

◆ ~Holder()

template<class T , class REF >
edm::reftobase::Holder< T, REF >::~Holder ( )
inlineoverride

Definition at line 77 of file Holder.h.

77 {}

Member Function Documentation

◆ Class_Version()

template<class T , class REF >
static short edm::reftobase::Holder< T, REF >::Class_Version ( )
inlinestatic

Definition at line 45 of file Holder.h.

47 :
48  REF ref_;

◆ clone()

template<class T , class REF >
BaseHolder< T > * edm::reftobase::Holder< T, REF >::clone ( void  ) const
inlineoverridevirtual

Implements edm::reftobase::BaseHolder< T >.

Definition at line 80 of file Holder.h.

80  {
81  return new Holder(*this);
82  }

◆ getPtr()

template<class T , class REF >
T const * edm::reftobase::Holder< T, REF >::getPtr ( ) const
inlineoverridevirtual

Implements edm::reftobase::BaseHolder< T >.

Definition at line 85 of file Holder.h.

85  {
86  return ref_.operator->();
87  }

◆ getRef()

template<class T , class REF >
REF const & edm::reftobase::Holder< T, REF >::getRef ( ) const
inline

Definition at line 103 of file Holder.h.

103  {
104  return ref_;
105  }

◆ holder()

template<class T , class REF >
std::unique_ptr<RefHolderBase> edm::reftobase::Holder< T, REF >::holder ( ) const
inlineoverridevirtual

Implements edm::reftobase::BaseHolder< T >.

Definition at line 32 of file Holder.h.

References edm::reftobase::Holder< T, REF >::ref_.

32  {
33  return std::unique_ptr<RefHolderBase>(new RefHolder<REF>(ref_));
34  }

◆ id()

template<class T , class REF >
ProductID edm::reftobase::Holder< T, REF >::id ( ) const
inlineoverridevirtual

Implements edm::reftobase::BaseHolder< T >.

Definition at line 90 of file Holder.h.

References edm::ProductID::id().

90  {
91  return ref_.id();
92  }

◆ isAvailable()

template<class T , class REF >
bool edm::reftobase::Holder< T, REF >::isAvailable ( ) const
inlineoverridevirtual

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

Implements edm::reftobase::BaseHolder< T >.

Definition at line 40 of file Holder.h.

References edm::reftobase::Holder< T, REF >::ref_.

40 { return ref_.isAvailable(); }

◆ isEqualTo()

template<class T , class REF >
bool edm::reftobase::Holder< T, REF >::isEqualTo ( BaseHolder< T > const &  rhs) const
inlineoverridevirtual

Implements edm::reftobase::BaseHolder< T >.

Definition at line 95 of file Holder.h.

References runTheMatrix::const, edm::getRef(), and h.

95  {
96  Holder const* h = dynamic_cast<Holder const*>(&rhs);
97  return h && (getRef() == h->getRef());
98  // if (h == 0) return false;
99  // return getRef() == h->getRef();
100  }
REF const & getRef() const
Definition: Holder.h:103
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4

◆ isTransient()

template<class T , class REF >
bool edm::reftobase::Holder< T, REF >::isTransient ( ) const
inlineoverridevirtual

Implements edm::reftobase::BaseHolder< T >.

Definition at line 42 of file Holder.h.

References edm::reftobase::Holder< T, REF >::ref_.

42 { return ref_.isTransient(); }

◆ key()

template<class T , class REF >
size_t edm::reftobase::Holder< T, REF >::key ( ) const
inlineoverridevirtual

Implements edm::reftobase::BaseHolder< T >.

Definition at line 135 of file Holder.h.

References crabWrapper::key.

135  {
136  typedef typename RefKeyTrait<REF>::type helper;
137  return helper::key(ref_);
138  }
Definition: helper.py:1

◆ makeVectorHolder()

template<typename T , typename REF >
std::unique_ptr< BaseVectorHolder< T > > edm::reftobase::Holder< T, REF >::makeVectorHolder ( ) const
overridevirtual

Implements edm::reftobase::BaseHolder< T >.

Definition at line 122 of file Holder.h.

122  {
123  typedef typename HolderToVectorTrait<T, REF>::type helper;
124  return helper::makeVectorHolder();
125  }
Definition: helper.py:1
InvalidHolderToVector< T, REF > type

◆ operator=()

template<class T , class REF >
Holder< T, REF > & edm::reftobase::Holder< T, REF >::operator= ( Holder< T, REF > const &  rhs)
inline

Definition at line 65 of file Holder.h.

References edm::reftobase::swap(), and groupFilesInBlocks::temp.

65  {
66  Holder temp(rhs);
67  swap(temp);
68  return *this;
69  }
void swap(Holder &other)
Definition: Holder.h:72

◆ productGetter()

template<class T , class REF >
EDProductGetter const * edm::reftobase::Holder< T, REF >::productGetter ( ) const
inlineoverridevirtual

Implements edm::reftobase::BaseHolder< T >.

Definition at line 108 of file Holder.h.

108  {
109  return ref_.productGetter();
110  }

◆ swap()

template<class T , class REF >
void edm::reftobase::Holder< T, REF >::swap ( Holder< T, REF > &  other)
inline

Definition at line 72 of file Holder.h.

References trackingPlots::other, and std::swap().

72  {
73  std::swap(ref_, other.ref_);
74  }
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)

Member Data Documentation

◆ ref_

template<class T , class REF >
REF edm::reftobase::Holder< T, REF >::ref_
private