CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions
FWItemMuonDigiAccessor< C, V > Class Template Reference

#include <FWItemRandomAccessor.h>

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

Public Types

typedef C container_type
 
typedef V value_type
 

Public Member Functions

 FWItemMuonDigiAccessor (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 ()
 

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>
class FWItemMuonDigiAccessor< C, V >

Definition at line 234 of file FWItemRandomAccessor.h.

Member Typedef Documentation

template<class C , class V >
typedef C FWItemMuonDigiAccessor< C, V >::container_type

Definition at line 237 of file FWItemRandomAccessor.h.

template<class C , class V >
typedef V FWItemMuonDigiAccessor< C, V >::value_type

Definition at line 238 of file FWItemRandomAccessor.h.

Constructor & Destructor Documentation

template<class C , class V >
FWItemMuonDigiAccessor< C, V >::FWItemMuonDigiAccessor ( const TClass *  iClass)
inline

Definition at line 240 of file FWItemRandomAccessor.h.

241  : FWItemRandomAccessorBase(iClass, typeid(value_type))
242  {}
FWItemRandomAccessorBase(const TClass *type, const type_info &modelTypeName)

Member Function Documentation

const std::string & GEMDigiAccessor::classPurpose ( )
static

Definition at line 44 of file FWItemMuonAccessors.cc.

const std::string & GEMDigiAccessor::classRegisterTypeName ( )
static

Definition at line 44 of file FWItemMuonAccessors.cc.

const std::string & GEMDigiAccessor::classTypeName ( )
static

Definition at line 44 of file FWItemMuonAccessors.cc.

template<class C , class V >
const void* FWItemMuonDigiAccessor< C, V >::modelData ( int  iIndex) const
inlinevirtual

Implements FWItemAccessorBase.

Definition at line 246 of file FWItemRandomAccessor.h.

References EnergyCorrector::c, FWItemRandomAccessorBase::getDataPtr(), and i.

247  {
248  if (!getDataPtr())
249  return 0;
250  const container_type *c = reinterpret_cast<const container_type*>(getDataPtr());
251  size_t collectionOffset = 0;
252 
253  for (typename container_type::DigiRangeIterator ci = c->begin(), ce = c->end(); ci != ce; ++ci)
254  {
255  int i = iIndex - collectionOffset;
256 
258 
259 
260  if (i < std::distance(vt.second.first, vt.second.second))
261  return &(*(vt.second.first + i));
262  collectionOffset += std::distance(vt.second.first, vt.second.second);
263  }
264 
265  return 0;
266  }
int i
Definition: DBlmapReader.cc:9
Container::value_type value_type
template<class C , class V >
const std::string& FWItemMuonDigiAccessor< C, V >::purpose ( ) const
inline

Definition at line 244 of file FWItemRandomAccessor.h.

247 {
template<class C , class V >
unsigned int FWItemMuonDigiAccessor< C, V >::size ( void  ) const
inlinevirtual

Implements FWItemAccessorBase.

Definition at line 268 of file FWItemRandomAccessor.h.

References EnergyCorrector::c, and FWItemRandomAccessorBase::getDataPtr().

269  {
270  if (!getDataPtr())
271  return 0;
272  const container_type *c = reinterpret_cast<const container_type*>(getDataPtr());
273  size_t finalSize = 0;
274 
275  for (typename container_type::DigiRangeIterator ci = c->begin(), ce = c->end(); ci != ce; ++ci)
276  {
278  finalSize += std::distance(vt.second.first, vt.second.second);
279  }
280 
281  return finalSize;
282  }
Container::value_type value_type
template<class C , class V >
const std::string& FWItemMuonDigiAccessor< C, V >::typeName ( ) const
inline

Definition at line 244 of file FWItemRandomAccessor.h.

247 {