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 Types
FWItemRandomAccessor< C, V > Class Template Reference

#include <FWItemRandomAccessor.h>

Inheritance diagram for FWItemRandomAccessor< C, V >:
FWItemRandomAccessorBase FWItemAccessorBase

Public Member Functions

template<>
const std::string & classPurpose ()
 
template<>
const std::string & classPurpose ()
 
template<>
const std::string & classPurpose ()
 
template<>
const std::string & classPurpose ()
 
template<>
const std::string & classPurpose ()
 
template<>
const std::string & classPurpose ()
 
template<>
const std::string & classPurpose ()
 
template<>
const std::string & classRegisterTypeName ()
 
template<>
const std::string & classRegisterTypeName ()
 
template<>
const std::string & classRegisterTypeName ()
 
template<>
const std::string & classRegisterTypeName ()
 
template<>
const std::string & classRegisterTypeName ()
 
template<>
const std::string & classRegisterTypeName ()
 
template<>
const std::string & classRegisterTypeName ()
 
template<>
const std::string & classTypeName ()
 
template<>
const std::string & classTypeName ()
 
template<>
const std::string & classTypeName ()
 
template<>
const std::string & classTypeName ()
 
template<>
const std::string & classTypeName ()
 
template<>
const std::string & classTypeName ()
 
template<>
const std::string & classTypeName ()
 
 FWItemRandomAccessor (const TClass *iClass)
 
const void * modelData (int iIndex) const
 
const std::string & purpose () const
 
unsigned int size () const
 
const std::string & typeName () const
 
- Public Member Functions inherited from FWItemRandomAccessorBase
const void * data () const
 
bool isCollection () const
 
const TClass * modelType () const
 
virtual void reset ()
 
void setData (const edm::ObjectWithDict &)
 override if id of an object should be different than the index More...
 
const TClass * type () const
 
virtual ~FWItemRandomAccessorBase ()
 
- Public Member Functions inherited from FWItemAccessorBase
 FWItemAccessorBase ()
 
virtual ~FWItemAccessorBase ()
 

Static Public Member Functions

static const std::string & classPurpose ()
 
static const std::string & classRegisterTypeName ()
 
static const std::string & classTypeName ()
 

Private Types

typedef C container_type
 
typedef V container_value_type
 

Additional Inherited Members

- Protected Member Functions inherited from FWItemRandomAccessorBase
 FWItemRandomAccessorBase (const TClass *type, const type_info &modelTypeName)
 
void * getDataPtr () const
 
- Protected Attributes inherited from FWItemRandomAccessorBase
void * m_data
 
const TClass * m_modelType
 
const TClass * m_type
 

Detailed Description

template<class C, class V = typename C::value_type>
class FWItemRandomAccessor< C, V >

A generic helper class which can be used to create a specialized FWItemAccessorBase plugin for all the classes that expose a std::vector like interface.

The template argument T is the actual type of the container you want to have an accessor for and it must satisty the following:

Notice that most of the work is actually done by the baseclass.

Definition at line 73 of file FWItemRandomAccessor.h.

Member Typedef Documentation

template<class C , class V = typename C::value_type>
typedef C FWItemRandomAccessor< C, V >::container_type
private

Definition at line 75 of file FWItemRandomAccessor.h.

template<class C , class V = typename C::value_type>
typedef V FWItemRandomAccessor< C, V >::container_value_type
private

Definition at line 76 of file FWItemRandomAccessor.h.

Constructor & Destructor Documentation

template<class C , class V = typename C::value_type>
FWItemRandomAccessor< C, V >::FWItemRandomAccessor ( const TClass *  iClass)
inline

Definition at line 78 of file FWItemRandomAccessor.h.

80  {}
FWItemRandomAccessorBase(const TClass *type, const type_info &modelTypeName)

Member Function Documentation

template<>
const std::string & FWItemRandomAccessor< CSCRecHit2DCollection >::classPurpose ( )

Definition at line 43 of file FWItemMuonAccessors.cc.

template<>
const std::string & FWItemRandomAccessor< CSCSegmentCollection >::classPurpose ( )

Definition at line 44 of file FWItemMuonAccessors.cc.

template<>
const std::string & FWItemRandomAccessor< DTRecSegment2DCollection >::classPurpose ( )

Definition at line 45 of file FWItemMuonAccessors.cc.

template<>
const std::string & FWItemRandomAccessor< DTRecSegment4DCollection >::classPurpose ( )

Definition at line 46 of file FWItemMuonAccessors.cc.

template<>
const std::string & FWItemRandomAccessor< DTRecHitCollection >::classPurpose ( )

Definition at line 47 of file FWItemMuonAccessors.cc.

template<>
const std::string & FWItemRandomAccessor< RPCRecHitCollection >::classPurpose ( )

Definition at line 48 of file FWItemMuonAccessors.cc.

template<>
const std::string & FWItemRandomAccessor< GEMRecHitCollection >::classPurpose ( )

Definition at line 49 of file FWItemMuonAccessors.cc.

template<class C , class V = typename C::value_type>
static const std::string& FWItemRandomAccessor< C, V >::classPurpose ( )
static
template<>
const std::string & FWItemRandomAccessor< CSCRecHit2DCollection >::classRegisterTypeName ( )

Definition at line 43 of file FWItemMuonAccessors.cc.

template<>
const std::string & FWItemRandomAccessor< CSCSegmentCollection >::classRegisterTypeName ( )

Definition at line 44 of file FWItemMuonAccessors.cc.

template<>
const std::string & FWItemRandomAccessor< DTRecSegment2DCollection >::classRegisterTypeName ( )

Definition at line 45 of file FWItemMuonAccessors.cc.

template<>
const std::string & FWItemRandomAccessor< DTRecSegment4DCollection >::classRegisterTypeName ( )

Definition at line 46 of file FWItemMuonAccessors.cc.

template<>
const std::string & FWItemRandomAccessor< DTRecHitCollection >::classRegisterTypeName ( )

Definition at line 47 of file FWItemMuonAccessors.cc.

template<>
const std::string & FWItemRandomAccessor< RPCRecHitCollection >::classRegisterTypeName ( )

Definition at line 48 of file FWItemMuonAccessors.cc.

template<>
const std::string & FWItemRandomAccessor< GEMRecHitCollection >::classRegisterTypeName ( )

Definition at line 49 of file FWItemMuonAccessors.cc.

template<class C , class V = typename C::value_type>
static const std::string& FWItemRandomAccessor< C, V >::classRegisterTypeName ( )
static
template<>
const std::string & FWItemRandomAccessor< CSCRecHit2DCollection >::classTypeName ( )

Definition at line 43 of file FWItemMuonAccessors.cc.

template<>
const std::string & FWItemRandomAccessor< CSCSegmentCollection >::classTypeName ( )

Definition at line 44 of file FWItemMuonAccessors.cc.

template<>
const std::string & FWItemRandomAccessor< DTRecSegment2DCollection >::classTypeName ( )

Definition at line 45 of file FWItemMuonAccessors.cc.

template<>
const std::string & FWItemRandomAccessor< DTRecSegment4DCollection >::classTypeName ( )

Definition at line 46 of file FWItemMuonAccessors.cc.

template<>
const std::string & FWItemRandomAccessor< DTRecHitCollection >::classTypeName ( )

Definition at line 47 of file FWItemMuonAccessors.cc.

template<>
const std::string & FWItemRandomAccessor< RPCRecHitCollection >::classTypeName ( )

Definition at line 48 of file FWItemMuonAccessors.cc.

template<>
const std::string & FWItemRandomAccessor< GEMRecHitCollection >::classTypeName ( )

Definition at line 49 of file FWItemMuonAccessors.cc.

template<class C , class V = typename C::value_type>
static const std::string& FWItemRandomAccessor< C, V >::classTypeName ( )
static
template<class C , class V = typename C::value_type>
const void* FWItemRandomAccessor< C, V >::modelData ( int  iIndex) const
inlinevirtual

Implements FWItemAccessorBase.

Definition at line 85 of file FWItemRandomAccessor.h.

References FWItemRandomAccessorBase::getDataPtr().

86  {
87  if (!getDataPtr())
88  return 0;
89  return &(reinterpret_cast<container_type *>(getDataPtr())->operator[](iIndex));
90  }
template<class C , class V = typename C::value_type>
const std::string& FWItemRandomAccessor< C, V >::purpose ( ) const
inline

Definition at line 82 of file FWItemRandomAccessor.h.

86 {
template<class C , class V = typename C::value_type>
unsigned int FWItemRandomAccessor< C, V >::size ( void  ) const
inlinevirtual

Implements FWItemAccessorBase.

Definition at line 92 of file FWItemRandomAccessor.h.

References FWItemRandomAccessorBase::getDataPtr().

93  {
94  if (!getDataPtr())
95  return 0;
96  return reinterpret_cast<const container_type*>(getDataPtr())->size();
97  }
unsigned int size() const
template<class C , class V = typename C::value_type>
const std::string& FWItemRandomAccessor< C, V >::typeName ( ) const
inline

Definition at line 82 of file FWItemRandomAccessor.h.

86 {