CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
FWItemSingleAccessor Class Reference

#include <Fireworks/Core/interface/FWItemSingleAccessor.h>

Inheritance diagram for FWItemSingleAccessor:
FWItemAccessorBase BeamSpotSingleAccessor

Public Member Functions

const void * data () const override
 
 FWItemSingleAccessor (const TClass *)
 
bool isCollection () const override
 
const void * modelData (int iIndex) 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...
 
unsigned int size () const override
 
const TClass * type () const override
 
 ~FWItemSingleAccessor () override
 
- Public Member Functions inherited from FWItemAccessorBase
 FWItemAccessorBase ()
 
virtual ~FWItemAccessorBase ()
 

Private Member Functions

 FWItemSingleAccessor (const FWItemSingleAccessor &)=delete
 
const FWItemSingleAccessoroperator= (const FWItemSingleAccessor &)=delete
 

Private Attributes

const void * m_data
 
const TClass * m_type
 

Detailed Description

Description: <one line="" class="" summary>="">

Usage: <usage>

Definition at line 28 of file FWItemSingleAccessor.h.

Constructor & Destructor Documentation

◆ FWItemSingleAccessor() [1/2]

FWItemSingleAccessor::FWItemSingleAccessor ( const TClass *  iClass)

Definition at line 32 of file FWItemSingleAccessor.cc.

32 : m_type(iClass), m_data(nullptr) {}

◆ ~FWItemSingleAccessor()

FWItemSingleAccessor::~FWItemSingleAccessor ( )
override

Definition at line 39 of file FWItemSingleAccessor.cc.

39 {}

◆ FWItemSingleAccessor() [2/2]

FWItemSingleAccessor::FWItemSingleAccessor ( const FWItemSingleAccessor )
privatedelete

Member Function Documentation

◆ data()

const void * FWItemSingleAccessor::data ( ) const
overridevirtual

Implements FWItemAccessorBase.

Definition at line 78 of file FWItemSingleAccessor.cc.

78 { return m_data; }

References m_data.

◆ isCollection()

bool FWItemSingleAccessor::isCollection ( ) const
overridevirtual

Implements FWItemAccessorBase.

Definition at line 86 of file FWItemSingleAccessor.cc.

86 { return false; }

◆ modelData()

const void * FWItemSingleAccessor::modelData ( int  iIndex) const
overridevirtual

Implements FWItemAccessorBase.

Definition at line 71 of file FWItemSingleAccessor.cc.

71  {
72  if (0 == iIndex) {
73  return m_data;
74  }
75  return nullptr;
76 }

References m_data.

◆ modelType()

const TClass * FWItemSingleAccessor::modelType ( ) const
overridevirtual

Implements FWItemAccessorBase.

Definition at line 82 of file FWItemSingleAccessor.cc.

82 { return m_type; }

References m_type.

◆ operator=()

const FWItemSingleAccessor& FWItemSingleAccessor::operator= ( const FWItemSingleAccessor )
privatedelete

◆ reset()

void FWItemSingleAccessor::reset ( void  )
overridevirtual

Implements FWItemAccessorBase.

Definition at line 66 of file FWItemSingleAccessor.cc.

66 { m_data = nullptr; }

References m_data.

Referenced by setData().

◆ setData()

void FWItemSingleAccessor::setData ( const edm::ObjectWithDict )
overridevirtual

override if id of an object should be different than the index

Implements FWItemAccessorBase.

Definition at line 56 of file FWItemSingleAccessor.cc.

56  {
57  if (product.address() == nullptr) {
58  reset();
59  return;
60  }
61 
62  m_data = product.address();
63  assert(nullptr != m_data);
64 }

References edm::ObjectWithDict::address(), cms::cuda::assert(), m_data, and reset().

◆ size()

unsigned int FWItemSingleAccessor::size ( void  ) const
overridevirtual

Implements FWItemAccessorBase.

Definition at line 80 of file FWItemSingleAccessor.cc.

80 { return nullptr == m_data ? 0 : 1; }

References m_data.

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

◆ type()

const TClass * FWItemSingleAccessor::type ( ) const
overridevirtual

Implements FWItemAccessorBase.

Definition at line 84 of file FWItemSingleAccessor.cc.

84 { return m_type; }

References m_type.

Member Data Documentation

◆ m_data

const void* FWItemSingleAccessor::m_data
private

Definition at line 53 of file FWItemSingleAccessor.h.

Referenced by data(), modelData(), reset(), setData(), and size().

◆ m_type

const TClass* FWItemSingleAccessor::m_type
private

Definition at line 52 of file FWItemSingleAccessor.h.

Referenced by modelType(), and type().

cms::cuda::assert
assert(be >=bs)
FWItemSingleAccessor::m_type
const TClass * m_type
Definition: FWItemSingleAccessor.h:52
FWItemSingleAccessor::m_data
const void * m_data
Definition: FWItemSingleAccessor.h:53
FWItemSingleAccessor::reset
void reset() override
Definition: FWItemSingleAccessor.cc:66