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
 
 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 bool isTransient () const
 
virtual size_t key () const
 
virtual std::auto_ptr
< BaseVectorHolder< T > > 
makeVectorHolder () const
 
Holderoperator= (Holder const &rhs)
 
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 35 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 151 of file Holder.h.

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

153  {
154  RefHolder<REF>* h = dynamic_cast<RefHolder<REF>*>(&fillme);
155  bool conversion_worked = (h != 0);
156 
157  if (conversion_worked)
158  h->setRef(ref_);
159  else
160  msg = typeid(REF).name();
161 
162  return conversion_worked;
163  }
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<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 36 of file Holder.h.

36  {
37  return std::auto_ptr<RefHolderBase>( new RefHolder<REF>( ref_ ) );
38  }
template<class T , class REF >
ProductID edm::reftobase::Holder< T, REF >::id ( ) 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 44 of file Holder.h.

44 { 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<typename T, class REF>
virtual bool edm::reftobase::Holder< T, REF >::isTransient ( ) const
inlinevirtual

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

Definition at line 46 of file Holder.h.

46 { return ref_.isTransient(); }
template<class T , class REF >
size_t edm::reftobase::Holder< T, REF >::key ( ) const
inlinevirtual

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

Definition at line 190 of file Holder.h.

References relval_steps::key.

191  {
192  typedef typename RefKeyTrait<REF>::type helper;
193  return helper::key( ref_ );
194  }
type
Definition: HCALResponse.h:21
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
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 175 of file Holder.h.

175  {
176  typedef typename HolderToVectorTrait<T, REF>::type helper;
177  return helper::makeVectorHolder();
178  }
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 >
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