| # Gaudi Framework, version v20r2
Generated: 18 Jul 2008

- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages

- Search for |

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# NTuple::_Matrix< TYP > Class Template Reference

`#include <NTuple.h>`

Inheritance diagram for NTuple::_Matrix< TYP >:

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

[legend]
List of all members.

## Detailed Description

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

Abstract class discribing a matrix column in a N tuple.

Definition at line 184 of file NTuple.h.

## Public Member Functions
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).
## 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.
## Protected Attributes
long | m_rows
| Number of rows per column.

## Member Function Documentation

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 41 of file NTupleItems.cpp.

References INTupleItem::name().

Referenced by createItem(), and RootHistCnv::createNTupleItem().

    00042                                                                             {
    00043   _MatrixImp<TYP>* result = new _MatrixImp<TYP>(tup,name,info,idx,ncol,nrow,min,max,def);
    00044   return result;
    00045 }

template<class TYP>
template<class T>

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

Assignment operator.

Definition at line 201 of file NTuple.h.

References INTupleItem::buffer(), and INTupleItem::length().

    00201                                                       {
    00202       long len = this->length();
    00203       if ( len == copy.length() )    {
    00204         const T* source = (const T*)copy.buffer();
    00205         for ( int i = 0; i < len; i++ )  {
    00206           *(this->m_buffer + i) = *(source + i);
    00207         }
    00208         return *this;
    00209       }
    00210       throw std::out_of_range
    00211         ("N-tuple matrix cannot be copied! The index range does not match!");
    00212       return *this;
    00213     }

template<class TYP>

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

Access to data by reference.

Definition at line 215 of file NTuple.h.

References NTuple::_Matrix< TYP >::m_rows.

    00215 { return (this->m_buffer + i*m_rows);  }

template<class TYP>

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

Access to data by reference (CONST).

Definition at line 217 of file NTuple.h.

References NTuple::_Matrix< TYP >::m_rows.

    00217 { return (this->m_buffer + i*m_rows);  }

## Member Data Documentation

template<class TYP>

long NTuple::_Matrix< TYP >::m_rows`[protected]`

Number of rows per column.

Definition at line 187 of file NTuple.h.

Referenced by NTuple::_MatrixImp< TYP >::_MatrixImp(), and NTuple::_Matrix< TYP >::column().

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

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v20r2/GaudiKernel/v25r2/GaudiKernel/NTuple.h
- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v20r2/GaudiKernel/v25r2/src/Lib/NTupleItems.cpp