The Gaudi Framework  master (ff829712)
Loading...
Searching...
No Matches
NTuple::_MatrixImp< TYP > Class Template Reference

Concrete class discribing a matrix column in a N tuple. More...

#include </builds/gaudi/Gaudi/GaudiKernel/include/GaudiKernel/NTupleItems.h>

Inheritance diagram for NTuple::_MatrixImp< TYP >:
Collaboration diagram for NTuple::_MatrixImp< TYP >:

Public Types

typedef Range< TYP > ItemRange
 Set type definition to make life more easy easy.
 
- Public Types inherited from NTuple::_DataImp< TYP >
typedef Range< TYP > ItemRange
 Set type definition to make life more easy easy.
 
- Public Types inherited from NTuple::_Data< TYP >
typedef Range< TYP > ItemRange
 Set type definition to make life more easy easy.
 

Public Member Functions

 _MatrixImp (INTuple *tup, const std::string &name, const std::type_info &typ, const std::string &index, long ncol, long nrow, TYP min, TYP max, TYP def)
 Standard Constructor.
 
void setDefault (const TYP val) override
 Compiler type ID.
 
const ItemRangerange () const override
 Access the range if specified.
 
long size () const override
 Size of entire object.
 
long ndim () const override
 Dimension.
 
long dim (long i) const override
 Access individual dimensions.
 
- Public Member Functions inherited from NTuple::_DataImp< TYP >
 _DataImp (INTuple *tup, std::string name, const std::type_info &info, std::string index, long len, TYP low, TYP high, TYP def)
 Standard Constructor.
 
 ~_DataImp () override
 Standard destructor.
 
std::string typeName () const override
 Get proper type name.
 
void reset () override
 Reset to default.
 
long filled () const override
 Number of items filled.
 
INTupleItemindexItem () override
 Pointer to index column (if present, 0 else)
 
const INTupleItemindexItem () const override
 Pointer to index column (if present, 0 else) (CONST)
 
const std::type_info & typeID () const override
 Compiler type ID.
 
void release () override
 Destruct object.
 
bool hasIndex () const override
 Is the tuple have an index column?
 
const std::string & index () const override
 Access the index _Column.
 
const std::string & name () const override
 Access _Column name.
 
long type () const override
 TYP information of the item.
 
void setType (long t) override
 Set the properties of the _Column.
 
long length () const override
 Access the buffer length.
 
const void * buffer () const override
 Access data buffer (CONST)
 
virtual void * buffer ()
 Access data buffer.
 
INTupletuple () override
 Access to hosting ntuple.
 
- Public Member Functions inherited from INTupleItem
virtual ~INTupleItem ()=default
 destructor
 
- Public Member Functions inherited from NTuple::_Matrix< TYP >
template<class T>
_Matrix< TYP > & operator= (const _Matrix< T > &copy)
 Assignment operator.
 
TYP * column (long i)
 Access to data by reference.
 
const TYP * column (long i) const
 Access to data by reference (CONST)
 

Additional Inherited Members

- Static Public Member Functions inherited from NTuple::_Matrix< TYP >
static _Matrixcreate (INTuple *tup, const std::string &name, const std::type_info &info, const std::string &index, long ncol, long nrow, TYP min, TYP max, TYP def)
 Create instance.
 
- Protected Types inherited from NTuple::_DataImp< TYP >
typedef const std::string & CSTR
 
typedef const std::type_info & CTYPE
 
- Protected Attributes inherited from NTuple::_DataImp< TYP >
long m_length
 Entire buffer length.
 
INTuplem_tuple
 Pointer to N tuple.
 
std::string m_name
 _Column name
 
std::string m_index
 Check that values are within a certain range while filling.
 
INTupleItemm_indexItem = nullptr
 Pointer to index item.
 
DataTypeInfo::Type m_type
 _Column type
 
TYP m_def
 Buffer with default value.
 
Range< TYP > m_range
 Check that values are within a certain range while filling.
 
const std::type_info & m_info
 Item type information.
 
- Protected Attributes inherited from NTuple::_Data< TYP >
TYP * m_buffer = nullptr
 Pointer to data buffer.
 
- Protected Attributes inherited from NTuple::_Matrix< TYP >
long m_rows
 Number of rows per column.
 

Detailed Description

template<class TYP>
class NTuple::_MatrixImp< TYP >

Concrete class discribing a matrix column in a N tuple.

Definition at line 211 of file NTupleItems.h.

Member Typedef Documentation

◆ ItemRange

template<class TYP>
typedef Range<TYP> NTuple::_MatrixImp< TYP >::ItemRange

Set type definition to make life more easy easy.

Definition at line 214 of file NTupleItems.h.

Constructor & Destructor Documentation

◆ _MatrixImp()

template<class TYP>
NTuple::_MatrixImp< TYP >::_MatrixImp ( INTuple * tup,
const std::string & name,
const std::type_info & typ,
const std::string & index,
long ncol,
long nrow,
TYP min,
TYP max,
TYP def )
inline

Standard Constructor.

Definition at line 216 of file NTupleItems.h.

218 : _DataImp<TYP>( tup, name, typ, index, nrow * ncol, min, max, def ) {
219 this->m_rows = nrow;
220 }
virtual const std::string & index() const =0
Access the index _Item.
virtual const std::string & name() const =0
Access _Item name.
_DataImp(const _DataImp &)=delete
Inhibit Copy Constructor.
long m_rows
Number of rows per column.
Definition NTuple.h:191
Concrete class discribing a matrix column in a N tuple.

Member Function Documentation

◆ dim()

template<class TYP>
long NTuple::_MatrixImp< TYP >::dim ( long i) const
inlineoverridevirtual

Access individual dimensions.

Reimplemented from NTuple::_DataImp< TYP >.

Definition at line 232 of file NTupleItems.h.

232 {
233 return ( this->hasIndex() ) ? ( ( i == 0 ) ? this->m_rows : this->m_length / this->m_rows )
234 : ( ( i == 1 ) ? this->m_length / this->m_rows : this->m_rows );
235 }
bool hasIndex() const override
Is the tuple have an index column?
long m_length
Entire buffer length.
Definition NTupleItems.h:62

◆ ndim()

template<class TYP>
long NTuple::_MatrixImp< TYP >::ndim ( ) const
inlineoverridevirtual

Dimension.

Reimplemented from NTuple::_DataImp< TYP >.

Definition at line 230 of file NTupleItems.h.

230{ return 2; }

◆ range()

template<class TYP>
const ItemRange & NTuple::_MatrixImp< TYP >::range ( ) const
inlineoverridevirtual

Access the range if specified.

Reimplemented from NTuple::_DataImp< TYP >.

Definition at line 226 of file NTupleItems.h.

226{ return this->m_range; }
Range< TYP > m_range
Check that values are within a certain range while filling.
Definition NTupleItems.h:76

◆ setDefault()

template<class TYP>
void NTuple::_MatrixImp< TYP >::setDefault ( const TYP val)
inlineoverridevirtual

Compiler type ID.

Set default value

Reimplemented from NTuple::_DataImp< TYP >.

Definition at line 224 of file NTupleItems.h.

224{ this->m_def = val; }
TYP m_def
Buffer with default value.
Definition NTupleItems.h:74

◆ size()

template<class TYP>
long NTuple::_MatrixImp< TYP >::size ( ) const
inlineoverridevirtual

Size of entire object.

Reimplemented from NTuple::_DataImp< TYP >.

Definition at line 228 of file NTupleItems.h.

228{ return this->m_length * sizeof( TYP ); }

The documentation for this class was generated from the following file: