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 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

virtual BaseHolder< T > * clone () const
 
virtual bool fillRefIfMyTypeMatches (RefHolderBase &fillme, std::string &msg) const
 
virtual T const * getPtr () const
 
REF const & getRef () const
 
virtual bool hasProductCache () const
 
 Holder ()
 
 Holder (Holder const &other)
 
 Holder (REF const &iRef)
 
virtual std::auto_ptr
< RefHolderBase
holder () const
 
virtual ProductID id () const
 
virtual bool isAvailable () const
 
virtual bool isEqualTo (BaseHolder< T > const &rhs) const
 
virtual size_t key () const
 
virtual std::auto_ptr
< RefVectorHolderBase
makeVectorBaseHolder () const
 
virtual std::auto_ptr
< BaseVectorHolder< T > > 
makeVectorHolder () const
 
Holderoperator= (Holder const &rhs)
 
virtual void const * product () const
 
virtual EDProductGetter const * productGetter () const
 
void swap (Holder &other)
 
virtual ~Holder ()
 
- 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<typename T, class REF>
class edm::reftobase::Holder< T, REF >

Definition at line 36 of file EDProductfwd.h.

Constructor & Destructor Documentation

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

Definition at line 61 of file Holder.h.

61  : BaseHolder<T>(),
62  ref_()
63  { }
template<class T , class REF >
edm::reftobase::Holder< T, REF >::Holder ( Holder< T, REF > const &  other)
inline

Definition at line 67 of file Holder.h.

67  : BaseHolder<T>(other),
68  ref_(other.ref_)
69  { }
template<class T , class REF>
edm::reftobase::Holder< T, REF >::Holder ( REF const &  iRef)
inlineexplicit

Definition at line 73 of file Holder.h.

73  : BaseHolder<T>(),
74  ref_(r)
75  { }
template<class T , class REF >
edm::reftobase::Holder< T, REF >::~Holder ( )
inlinevirtual

Definition at line 97 of file Holder.h.

98  { }

Member Function Documentation

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

Definition at line 49 of file Holder.h.

51 :
52  REF ref_;
template<class T , class REF >
BaseHolder< T > * edm::reftobase::Holder< T, REF >::clone ( void  ) const
inlinevirtual

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

Definition at line 103 of file Holder.h.

104  {
105  return new Holder(*this);
106  }
template<class T , class REF >
bool edm::reftobase::Holder< T, REF >::fillRefIfMyTypeMatches ( RefHolderBase fillme,
std::string &  msg 
) const
virtual

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

Definition at line 163 of file Holder.h.

References h, mergeVDriftHistosByStation::name, and edm::reftobase::RefHolder< REF >::setRef().

165  {
166  RefHolder<REF>* h = dynamic_cast<RefHolder<REF>*>(&fillme);
167  bool conversion_worked = (h != 0);
168 
169  if (conversion_worked)
170  h->setRef(ref_);
171  else
172  msg = typeid(REF).name();
173 
174  return conversion_worked;
175  }
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 T , class REF >
T const * edm::reftobase::Holder< T, REF >::getPtr ( ) const
inlinevirtual

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

Definition at line 111 of file Holder.h.

112  {
113  return ref_.operator->();
114  }
template<class T , class REF >
REF const & edm::reftobase::Holder< T, REF >::getRef ( ) const
inline

Definition at line 138 of file Holder.h.

139  {
140  return ref_;
141  }
template<class T , class REF >
bool edm::reftobase::Holder< T, REF >::hasProductCache ( ) const
inlinevirtual

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

Definition at line 151 of file Holder.h.

151  {
152  return ref_.hasProductCache();
153  }
template<typename T, class REF>
virtual std::auto_ptr<RefHolderBase> edm::reftobase::Holder< T, REF >::holder ( ) const
inlinevirtual

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

Definition at line 35 of file Holder.h.

35  {
36  return std::auto_ptr<RefHolderBase>( new RefHolder<REF>( ref_ ) );
37  }
template<class T , class REF >
ProductID edm::reftobase::Holder< T, REF >::id ( void  ) const
inlinevirtual

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

Definition at line 119 of file Holder.h.

References edm::ProductID::id().

120  {
121  return ref_.id();
122  }
template<typename T, class REF>
virtual bool edm::reftobase::Holder< T, REF >::isAvailable ( ) const
inlinevirtual

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 46 of file Holder.h.

46 { return ref_.isAvailable(); }
template<class T, class REF >
bool edm::reftobase::Holder< T, REF >::isEqualTo ( BaseHolder< T > const &  rhs) const
inlinevirtual

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

Definition at line 127 of file Holder.h.

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

128  {
129  Holder const* h = dynamic_cast<Holder const*>(&rhs);
130  return h && (getRef() == h->getRef());
131  // if (h == 0) return false;
132  // return getRef() == h->getRef();
133  }
REF const & getRef() const
Definition: Holder.h:138
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
string const
Definition: compareJSON.py:14
template<class T , class REF >
size_t edm::reftobase::Holder< T, REF >::key ( ) const
inlinevirtual

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

Definition at line 209 of file Holder.h.

References combine::key.

210  {
211  typedef typename RefKeyTrait<REF>::type helper;
212  return helper::key( ref_ );
213  }
type
Definition: HCALResponse.h:21
list key
Definition: combine.py:13
template<typename T , typename REF >
std::auto_ptr< RefVectorHolderBase > edm::reftobase::Holder< T, REF >::makeVectorBaseHolder ( ) const
virtual

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

Definition at line 193 of file Holder.h.

193  {
194  typedef typename HolderToVectorTrait<T, REF>::type helper;
195  return helper::makeVectorBaseHolder();
196  }
type
Definition: HCALResponse.h:21
template<typename T , typename REF >
std::auto_ptr< BaseVectorHolder< T > > edm::reftobase::Holder< T, REF >::makeVectorHolder ( ) const
virtual

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

Definition at line 187 of file Holder.h.

187  {
188  typedef typename HolderToVectorTrait<T, REF>::type helper;
189  return helper::makeVectorHolder();
190  }
type
Definition: HCALResponse.h:21
template<class T , class REF >
Holder< T, REF > & edm::reftobase::Holder< T, REF >::operator= ( Holder< T, REF > const &  rhs)
inline

Definition at line 80 of file Holder.h.

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

81  {
82  Holder temp(rhs);
83  swap(temp);
84  return *this;
85  }
void swap(Holder &other)
Definition: Holder.h:90
template<class T , class REF >
void const * edm::reftobase::Holder< T, REF >::product ( ) const
inlinevirtual

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

Definition at line 157 of file Holder.h.

157  {
158  return ref_.product();
159  }
template<class T , class REF >
EDProductGetter const * edm::reftobase::Holder< T, REF >::productGetter ( ) const
inlinevirtual

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

Definition at line 145 of file Holder.h.

145  {
146  return ref_.productGetter();
147  }
template<class T , class REF >
void edm::reftobase::Holder< T, REF >::swap ( Holder< T, REF > &  other)
inline

Definition at line 90 of file Holder.h.

References std::swap().

91  {
92  std::swap(ref_, other.ref_);
93  }
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)

Member Data Documentation

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