| The Gaudi Framework v32r1 (f65d50dc)

Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
NTuple::_Matrix< TYP > Class Template Reference

Abstract class describing a matrix column in a N tuple. More...

`#include <GaudiKernel/NTuple.h>`

Inheritance diagram for NTuple::_Matrix< TYP >:
[legend]
Collaboration diagram for NTuple::_Matrix< TYP >:
[legend]

## Public Member Functions
template<class T >
_Matrix< TYP > & | operator= (const _Matrix< T > &copy)
| Assignment operator. More...
TYP * | column (long i)
| Access to data by reference. More...
const TYP * | column (long i) const
| Access to data by reference (CONST) More...
Public Member Functions inherited from NTuple::_Data< TYP >
virtual void | setDefault (const TYP d)=0
| Set default value. More...
virtual const ItemRange & | range () const =0
| Access the range if specified. More...
Public Member Functions inherited from INTupleItem
virtual | ~INTupleItem ()=default
| destructor More...
virtual void | release ()=0
| Destruct object. More...
virtual const std::type_info & | typeID () const =0
| Compiler type ID. More...
virtual std::string | typeName () const =0
| Proper type name of the object. More...
virtual const void * | buffer () const =0
| Access data buffer (CONST) More...
virtual bool | hasIndex () const =0
| Is the tuple have an index item? More...
virtual const std::string & | index () const =0
| Access the index _Item. More...
virtual const std::string & | name () const =0
| Access _Item name. More...
virtual long | type () const =0
| Type information of the item. More...
virtual long | length () const =0
| Access the buffer length. More...
virtual void | reset ()=0
| Reset column. More...
virtual long | ndim () const =0
| Dimension. More...
virtual long | dim (long i) const =0
| Access individual dimensions. More...
virtual long | size () const =0
| Size of entire object. More...
virtual long | filled () const =0
| Number of items filled. More...
virtual INTupleItem * | indexItem ()=0
| Pointer to index column (if present, 0 else) More...
virtual const INTupleItem * | indexItem () const =0
| Pointer to index column (if present, 0 else) (CONST) More...
virtual INTuple * | tuple ()=0
| NTuple the item belongs to. More...

## Static Public Member Functions
static _Matrix * | create (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. More...

## Protected Attributes
long | m_rows
| Number of rows per column. More...
Protected Attributes inherited from NTuple::_Data< TYP >
TYP * | m_buffer = nullptr
| Pointer to data buffer. More...

## Additional Inherited Members
Public Types inherited from NTuple::_Data< TYP >
typedef Range< TYP > | ItemRange
| Set type definition to make life more easy easy. More...
Protected Member Functions inherited from INTupleItem
virtual void | setType (long typ)=0
| Set the properties of the INTupleItem. More...

## Detailed Description

### template<class TYP>
class NTuple::_Matrix< TYP >

Abstract class describing a matrix column in a N tuple.

Definition at line 44 of file NTuple.h.

## Member Function Documentation

## ◆ column() [1/2]

template<class TYP>

TYP* NTuple::_Matrix< TYP >::column | ( | long | i | ) |
| inline

Access to data by reference.

Definition at line 208 of file NTuple.h.

208 { return this->m_buffer + i * m_rows; }
NTuple::_Matrix::m_rows
long m_rows
Number of rows per column.
Definition: NTuple.h:189
NTuple::_Data::m_buffer
TYP * m_buffer
Pointer to data buffer.
Definition: NTuple.h:123

## ◆ column() [2/2]

template<class TYP>

const TYP* NTuple::_Matrix< TYP >::column | ( | long | i | ) | const
| inline

Access to data by reference (CONST)

Definition at line 210 of file NTuple.h.

210 { return this->m_buffer + i * m_rows; }
NTuple::_Matrix::m_rows
long m_rows
Number of rows per column.
Definition: NTuple.h:189
NTuple::_Data::m_buffer
TYP * m_buffer
Pointer to data buffer.
Definition: NTuple.h:123

## ◆ create()

template<class TYP >

NTuple::_Matrix< TYP > * NTuple::_Matrix< TYP >::create | ( | 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
| ) |  |
| static

Create instance.

Definition at line 40 of file NTupleItems.cpp.

42 {
43 return new _MatrixImp<TYP>( tup, name, info, idx, ncol, nrow, min, max, def );
44 }
min
EventIDBase min(const EventIDBase &lhs, const EventIDBase &rhs)
Definition: EventIDBase.h:202
max
EventIDBase max(const EventIDBase &lhs, const EventIDBase &rhs)
Definition: EventIDBase.h:215
INTupleItem::name
virtual const std::string & name() const =0
Access _Item name.

## ◆ operator=()

template<class TYP>
template<class T >

_Matrix<TYP>& NTuple::_Matrix< TYP >::operator= | ( | const _Matrix< T > & | copy | ) |
| inline

Assignment operator.

Definition at line 197 of file NTuple.h.

197 {
198 long len = this->length();
199 if ( len == copy.length() ) {
200 const T* source = (const T*)copy.buffer();
201 std::copy_n( source, len, this->m_buffer );
202 return *this;
203 }
204 throw std::out_of_range( "N-tuple matrix cannot be copied! The index range does not match!" );
205 return *this;
206 }
std::out_of_range
STL class.
std::copy
T copy(T... args)
std::copy_n
T copy_n(T... args)
NTuple::_Data::m_buffer
TYP * m_buffer
Pointer to data buffer.
Definition: NTuple.h:123
INTupleItem::length
virtual long length() const =0
Access the buffer length.

## Member Data Documentation

## ◆ m_rows

template<class TYP>

long NTuple::_Matrix< TYP >::m_rows
| protected

Number of rows per column.

Definition at line 189 of file NTuple.h.

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

- GaudiKernel/GaudiKernel/NTuple.h
- GaudiKernel/src/Lib/NTupleItems.cpp