The Gaudi Framework  master (37c0b60a)
NTuple::_Matrix< TYP > Class Template Reference

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

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

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...
 

Static Public Member Functions

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. More...
 

Protected Attributes

long m_rows
 Number of rows per column. More...
 

Detailed Description

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

Abstract class describing a matrix column in a N tuple.

Definition at line 54 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 218 of file NTuple.h.

218 { return this->m_buffer + i * m_rows; }

◆ 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 220 of file NTuple.h.

220 { return this->m_buffer + i * m_rows; }

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

52  {
53  return new _MatrixImp<TYP>( tup, name, info, idx, ncol, nrow, min, max, def );
54 }

◆ operator=()

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

Assignment operator.

Definition at line 207 of file NTuple.h.

207  {
208  long len = this->length();
209  if ( len == copy.length() ) {
210  const T* source = (const T*)copy.buffer();
211  std::copy_n( source, len, this->m_buffer );
212  return *this;
213  }
214  throw std::out_of_range( "N-tuple matrix cannot be copied! The index range does not match!" );
215  return *this;
216  }

Member Data Documentation

◆ m_rows

template<class TYP >
long NTuple::_Matrix< TYP >::m_rows
protected

Number of rows per column.

Definition at line 199 of file NTuple.h.


The documentation for this class was generated from the following files:
NTuple::_Matrix::m_rows
long m_rows
Number of rows per column.
Definition: NTuple.h:199
std::copy_n
T copy_n(T... args)
std::copy
T copy(T... args)
ConditionsStallTest.name
name
Definition: ConditionsStallTest.py:77
std::out_of_range
STL class.