| # Gaudi Framework, version v21r8 |

Home |  | Generated: 17 Mar 2010

# NTuple::_Array< TYP > Class Template Reference

Abstract class describing a column-array in a N tuple. More...

`#include <NTuple.h>`

Inheritance diagram for NTuple::_Array< TYP >:

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

[legend]

List of all members.

## Public Member Functions
template<class T>
_Array< TYP > & | operator= (const _Array< T > &copy)
| Assignment operator.
const TYP & | data (long i) const
| Access to data by reference (CONST).
TYP & | data (long i)
| Access to data by reference (CONST).
## Static Public Member Functions
static _Array * | create (INTuple *tup, const std::string &name, const std::type_info &info, const std::string &index, long len, TYP min, TYP max, TYP def)
| Create instance.

## Detailed Description

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

Abstract class describing a column-array in a N tuple.

Definition at line 150 of file NTuple.h.

## Member Function Documentation

template<class TYP>

NTuple::_Array< TYP > * NTuple::_Array< TYP >::create | ( | INTuple * | tup,
|  | const std::string & | name,
|  | const std::type_info & | info,
|  | const std::string & | index,
|  | long | len,
|  | TYP | min,
|  | TYP | max,
|  | TYP | def |
| ) |  |  | `[inline, static]`

Create instance.

Definition at line 34 of file NTupleItems.cpp.

    00034                                                                                                                                              {
    00035   _ArrayImp<TYP>* result = new _ArrayImp<TYP>(tup,name,info,idx,len,min,max,def);
    00036   return result;
    00037 }

template<class TYP>
template<class T>

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

Assignment operator.

Definition at line 163 of file NTuple.h.

    00163                                                     {
    00164       long len = this->length();
    00165       if ( len == copy.length() )    {
    00166         const T* source = (const T*)copy.buffer();
    00167         for ( int i = 0; i < len; i++ )  {
    00168           *(this->m_buffer + i) = *(source + i);
    00169         }
    00170         return *this;
    00171       }
    00172       throw std::out_of_range
    00173         ("N-tuple matrix cannot be copied! The index range does not match!");
    00174       return *this;
    00175     }

template<class TYP>

const TYP& NTuple::_Array< TYP >::data | ( | long | i | ) | const`[inline]`

Access to data by reference (CONST).

Definition at line 177 of file NTuple.h.

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

template<class TYP>

TYP& NTuple::_Array< TYP >::data | ( | long | i | ) | `[inline]`

Access to data by reference (CONST).

Definition at line 179 of file NTuple.h.

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

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

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