CMS 3D CMS Logo

Public Member Functions | Private Attributes

edm::reftobase::Holder< T, REF > Class Template Reference

#include <Holder.h>

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

List of all members.

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 const &other)
 Holder ()
 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 ()

Private Attributes

REF ref_

Detailed Description

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

Definition at line 16 of file Holder.h.


Constructor & Destructor Documentation

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

Definition at line 61 of file Holder.h.

                          : BaseHolder<T>(),
      ref_()
    {  }
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.

                                             : BaseHolder<T>(other),
      ref_(other.ref_)
    { }
template<class T , class REF >
edm::reftobase::Holder< T, REF >::Holder ( REF const &  iRef) [inline, explicit]

Definition at line 73 of file Holder.h.

                                      : BaseHolder<T>(),
      ref_(r)
    { }
template<class T , class REF >
edm::reftobase::Holder< T, REF >::~Holder ( ) [inline, virtual]

Definition at line 97 of file Holder.h.

    { }

Member Function Documentation

template<class T , class REF >
BaseHolder< T > * edm::reftobase::Holder< T, REF >::clone ( void  ) const [inline, virtual]

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

Definition at line 103 of file Holder.h.

    {
      return new Holder(*this);
    }
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().

    {
      RefHolder<REF>* h = dynamic_cast<RefHolder<REF>*>(&fillme);
      bool conversion_worked = (h != 0);

      if (conversion_worked)
        h->setRef(ref_);
      else
        msg = typeid(REF).name();

      return conversion_worked;
    }
template<class T , class REF >
T const * edm::reftobase::Holder< T, REF >::getPtr ( ) const [inline, virtual]

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

Definition at line 111 of file Holder.h.

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

Definition at line 138 of file Holder.h.

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

    {
      return ref_;
    }
template<class T , class REF >
bool edm::reftobase::Holder< T, REF >::hasProductCache ( ) const [inline, virtual]

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

Definition at line 151 of file Holder.h.

                                              {
      return ref_.hasProductCache();
    }
template<class T , class REF >
virtual std::auto_ptr<RefHolderBase> edm::reftobase::Holder< T, REF >::holder ( ) const [inline, virtual]

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

Definition at line 35 of file Holder.h.

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

                                                        {
        return std::auto_ptr<RefHolderBase>( new RefHolder<REF>( ref_ ) );
      }
template<class T , class REF >
ProductID edm::reftobase::Holder< T, REF >::id ( void  ) const [inline, virtual]

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

Definition at line 119 of file Holder.h.

References edm::ProductID::id().

    {
      return ref_.id();
    }
template<class T , class REF >
virtual bool edm::reftobase::Holder< T, REF >::isAvailable ( ) const [inline, virtual]

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.

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

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

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

Definition at line 127 of file Holder.h.

References compareJSON::const, edm::reftobase::Holder< T, REF >::getRef(), edm::getRef(), and h.

    {
      Holder const* h = dynamic_cast<Holder const*>(&rhs);
      return h && (getRef() == h->getRef());
      //       if (h == 0) return false;
      //       return getRef() == h->getRef();
    }
template<class T , class REF >
size_t edm::reftobase::Holder< T, REF >::key ( ) const [inline, virtual]

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

Definition at line 209 of file Holder.h.

References combine::key.

    {
      typedef typename RefKeyTrait<REF>::type helper;
      return helper::key( ref_ );
    }
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.

                                                                               {
      typedef typename HolderToVectorTrait<T, REF>::type helper;
      return helper::makeVectorBaseHolder();
    }
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.

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

    {
      Holder temp(rhs);
      swap(temp);
      return *this;
    }
template<class T , class REF >
void const * edm::reftobase::Holder< T, REF >::product ( ) const [inline, virtual]

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

Definition at line 157 of file Holder.h.

                                              {
      return ref_.product();
    }
template<class T , class REF >
EDProductGetter const * edm::reftobase::Holder< T, REF >::productGetter ( ) const [inline, virtual]

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

Definition at line 145 of file Holder.h.

                                                              {
      return ref_.productGetter();
    }
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 edm::reftobase::Holder< T, REF >::ref_, and edm::reftobase::swap().

    {
      std::swap(ref_, other.ref_);
    }

Member Data Documentation

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