CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions
BXVectorAccessor< C > Class Template Reference

#include <FWItemRandomAccessor.h>

Inheritance diagram for BXVectorAccessor< C >:
FWItemRandomAccessorBase FWItemAccessorBase

Public Types

typedef C container_type
 

Public Member Functions

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

Definition at line 256 of file FWItemRandomAccessor.h.

Member Typedef Documentation

◆ container_type

template<class C >
typedef C BXVectorAccessor< C >::container_type

Definition at line 258 of file FWItemRandomAccessor.h.

Constructor & Destructor Documentation

◆ BXVectorAccessor()

template<class C >
BXVectorAccessor< C >::BXVectorAccessor ( const TClass *  iClass)
inline

Definition at line 260 of file FWItemRandomAccessor.h.

260 : FWItemRandomAccessorBase(iClass, typeid(typename C::value_type)) {}

Member Function Documentation

◆ classPurpose() [1/3]

template<>
const std::string & BXVectorAccessor< BXVector< l1t::HGCalTriggerCell > >::classPurpose ( )

Definition at line 27 of file FWItemTriggerCellAccessors.cc.

◆ classPurpose() [2/3]

template<>
const std::string & BXVectorAccessor< BXVector< l1t::HGCalMulticluster > >::classPurpose ( )

Definition at line 31 of file FWItemTriggerCellAccessors.cc.

◆ classPurpose() [3/3]

template<class C >
static const std::string& BXVectorAccessor< C >::classPurpose ( )
static

◆ classRegisterTypeName() [1/3]

template<>
const std::string & BXVectorAccessor< BXVector< l1t::HGCalTriggerCell > >::classRegisterTypeName ( )

Definition at line 27 of file FWItemTriggerCellAccessors.cc.

◆ classRegisterTypeName() [2/3]

template<>
const std::string & BXVectorAccessor< BXVector< l1t::HGCalMulticluster > >::classRegisterTypeName ( )

Definition at line 31 of file FWItemTriggerCellAccessors.cc.

◆ classRegisterTypeName() [3/3]

template<class C >
static const std::string& BXVectorAccessor< C >::classRegisterTypeName ( )
static

◆ classTypeName() [1/3]

template<>
const std::string & BXVectorAccessor< BXVector< l1t::HGCalTriggerCell > >::classTypeName ( )

Definition at line 27 of file FWItemTriggerCellAccessors.cc.

◆ classTypeName() [2/3]

template<>
const std::string & BXVectorAccessor< BXVector< l1t::HGCalMulticluster > >::classTypeName ( )

Definition at line 31 of file FWItemTriggerCellAccessors.cc.

◆ classTypeName() [3/3]

template<class C >
static const std::string& BXVectorAccessor< C >::classTypeName ( )
static

◆ modelData()

template<class C >
const void* BXVectorAccessor< C >::modelData ( int  iIndex) const
inlineoverridevirtual

Implements FWItemAccessorBase.

Definition at line 264 of file FWItemRandomAccessor.h.

264  {
265  if (!getDataPtr())
266  return nullptr;
267 
268  const container_type *c = reinterpret_cast<const container_type *>(getDataPtr());
269 
270  return &(c->at(0, iIndex));
271  }

References c, and FWItemRandomAccessorBase::getDataPtr().

◆ purpose()

template<class C >
const std::string& BXVectorAccessor< C >::purpose ( ) const
inline

Definition at line 262 of file FWItemRandomAccessor.h.

264 {

◆ size()

template<class C >
unsigned int BXVectorAccessor< C >::size ( void  ) const
inlineoverridevirtual

Implements FWItemAccessorBase.

Definition at line 273 of file FWItemRandomAccessor.h.

273  {
274  if (!getDataPtr())
275  return 0;
276 
277  const container_type *c = reinterpret_cast<const container_type *>(getDataPtr());
278 
279  return c->size(0);
280  }

References c, and FWItemRandomAccessorBase::getDataPtr().

Referenced by ntupleDataFormat._Collection::__iter__(), and ntupleDataFormat._Collection::__len__().

◆ typeName()

template<class C >
const std::string& BXVectorAccessor< C >::typeName ( ) const
inline

Definition at line 262 of file FWItemRandomAccessor.h.

264 {
FWItemRandomAccessorBase::getDataPtr
void * getDataPtr() const
Definition: FWItemRandomAccessor.cc:66
reco::JetExtendedAssociation::value_type
Container::value_type value_type
Definition: JetExtendedAssociation.h:30
FWItemRandomAccessorBase::FWItemRandomAccessorBase
FWItemRandomAccessorBase(const TClass *type, const std::type_info &modelTypeName)
Definition: FWItemRandomAccessor.cc:24
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
BXVectorAccessor::container_type
C container_type
Definition: FWItemRandomAccessor.h:258