The Gaudi Framework  master (01b473db)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 46 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 210 of file NTuple.h.

210 { 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 212 of file NTuple.h.

212 { 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 34 of file NTupleItems.cpp.

36  {
37  return new _MatrixImp<TYP>( tup, name, info, idx, ncol, nrow, min, max, def );
38 }

◆ operator=()

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

Assignment operator.

Definition at line 199 of file NTuple.h.

199  {
200  long len = this->length();
201  if ( len == copy.length() ) {
202  const T* source = (const T*)copy.buffer();
203  std::copy_n( source, len, this->m_buffer );
204  return *this;
205  }
206  throw std::out_of_range( "N-tuple matrix cannot be copied! The index range does not match!" );
207  return *this;
208  }

Member Data Documentation

◆ m_rows

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

Number of rows per column.

Definition at line 191 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:191
ConditionsStallTest.name
name
Definition: ConditionsStallTest.py:77