CMS 3D CMS Logo

edm::TestHandle< T > Class Template Reference

#include <DataFormats/Common/interface/TestHandle.h>

List of all members.

Public Types

typedef T element_type

Public Member Functions

ProductID id () const
bool isValid () const
T const & operator * () const
T const * operator-> () const
TestHandle< T > & operator= (const TestHandle< T > &rhs)
T const * product () const
void swap (TestHandle< T > &other)
 TestHandle (T const *prod, ProductID const &id)
 TestHandle (const TestHandle< T > &h)
 TestHandle ()
 ~TestHandle ()

Private Attributes

ProductID id_
T const * prod_


Detailed Description

template<class T>
class edm::TestHandle< T >

Definition at line 21 of file TestHandle.h.


Member Typedef Documentation

template<class T>
typedef T edm::TestHandle< T >::element_type

Definition at line 23 of file TestHandle.h.


Constructor & Destructor Documentation

template<class T>
edm::TestHandle< T >::TestHandle (  )  [inline]

Definition at line 51 of file TestHandle.h.

00051                             :
00052     prod_(0),
00053     id_(0)
00054   { }

template<class T>
edm::TestHandle< T >::TestHandle ( const TestHandle< T > &  h  )  [inline]

Definition at line 57 of file TestHandle.h.

00057                                                   :
00058     prod_(h.prod_),
00059     id_(h.id_)
00060   { }

template<class T>
edm::TestHandle< T >::TestHandle ( T const *  prod,
ProductID const &  id 
) [inline]

Definition at line 63 of file TestHandle.h.

00063                                                                        :
00064     prod_(theProduct),
00065     id_(theId) {
00066   }

template<class T>
edm::TestHandle< T >::~TestHandle (  )  [inline]

Definition at line 69 of file TestHandle.h.

00069                              {
00070     // Nothing to do -- we do not own the things to which we point.
00071   }


Member Function Documentation

template<class T>
ProductID edm::TestHandle< T >::id ( void   )  const [inline]

Definition at line 114 of file TestHandle.h.

References edm::TestHandle< T >::id_.

00114                           {
00115     return id_;
00116   }

template<class T>
bool edm::TestHandle< T >::isValid ( void   )  const [inline]

Definition at line 90 of file TestHandle.h.

References edm::TestHandle< T >::id_, and edm::TestHandle< T >::prod_.

00090                                {
00091     return prod_ != 0 && id_ != ProductID();
00092   }

template<class T>
T const & edm::TestHandle< T >::operator * (  )  const [inline]

Definition at line 108 of file TestHandle.h.

References edm::TestHandle< T >::product().

00108                                  {
00109     return *product();
00110   }

template<class T>
T const * edm::TestHandle< T >::operator-> (  )  const [inline]

Definition at line 102 of file TestHandle.h.

References edm::TestHandle< T >::product().

00102                                   {
00103     return product();
00104   }

template<class T>
TestHandle< T > & edm::TestHandle< T >::operator= ( const TestHandle< T > &  rhs  )  [inline]

Definition at line 82 of file TestHandle.h.

References edm::TestHandle< T >::swap(), and pyDBSRunClass::temp.

00082                                                    {
00083     TestHandle<T> temp(rhs);
00084     this->swap(temp);
00085     return *this;
00086   }

template<class T>
T const * edm::TestHandle< T >::product (  )  const [inline]

Definition at line 96 of file TestHandle.h.

References edm::TestHandle< T >::prod_.

Referenced by edm::TestHandle< T >::operator *(), edm::TestHandle< T >::operator->(), edm::Ref< C, T, F >::Ref(), and edm::RefProd< edm::OwnVector >::RefProd().

00096                                {
00097     return prod_;
00098   }

template<class T>
void edm::TestHandle< T >::swap ( TestHandle< T > &  other  )  [inline]

Definition at line 75 of file TestHandle.h.

References edm::TestHandle< T >::id_, edm::TestHandle< T >::prod_, and std::swap().

Referenced by edm::TestHandle< T >::operator=(), and edm::swap().

00075                                           {
00076     std::swap(prod_, other.prod_);
00077     std::swap(id_, other.id_);
00078   }


Member Data Documentation

template<class T>
ProductID edm::TestHandle< T >::id_ [private]

Definition at line 47 of file TestHandle.h.

Referenced by edm::TestHandle< T >::id(), edm::TestHandle< T >::isValid(), and edm::TestHandle< T >::swap().

template<class T>
T const* edm::TestHandle< T >::prod_ [private]

Definition at line 46 of file TestHandle.h.

Referenced by edm::TestHandle< T >::isValid(), edm::TestHandle< T >::product(), and edm::TestHandle< T >::swap().


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:44:25 2009 for CMSSW by  doxygen 1.5.4