The Gaudi Framework  v29r0 (ff2e7097)
NTuple::_Array< TYP > Class Template Reference

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

#include <GaudiKernel/NTuple.h>

Inheritance diagram for NTuple::_Array< TYP >:
Collaboration diagram for NTuple::_Array< TYP >:

Public Member Functions

template<class T >
_Array< TYP > & operator= (const _Array< T > &copy)
 Assignment operator. More...
 
const TYP & data (long i) const
 Access to data by reference (CONST) More...
 
TYP & data (long i)
 Access to data by reference (CONST) More...
 
TYP * begin ()
 
TYP * end ()
 
- Public Member Functions inherited from NTuple::_Data< TYP >
virtual void setDefault (const TYP d)=0
 Set default value. More...
 
virtual const ItemRangerange () 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_infotypeID () 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::stringindex () const =0
 Access the index _Item. More...
 
virtual const std::stringname () 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 INTupleItemindexItem ()=0
 Pointer to index column (if present, 0 else) More...
 
virtual const INTupleItemindexItem () const =0
 Pointer to index column (if present, 0 else) (CONST) More...
 
virtual INTupletuple ()=0
 NTuple the item belongs to. More...
 

Static Public Member Functions

static _Arraycreate (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. 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...
 
- Protected Attributes inherited from NTuple::_Data< TYP >
TYP * m_buffer = nullptr
 Pointer to data buffer. More...
 

Detailed Description

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

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

Definition at line 43 of file NTuple.h.

Member Function Documentation

template<class TYP>
TYP* NTuple::_Array< TYP >::begin ( )
inline

Definition at line 192 of file NTuple.h.

192 { return this->m_buffer; }
TYP * m_buffer
Pointer to data buffer.
Definition: NTuple.h:130
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 
)
static

Create instance.

Definition at line 34 of file NTupleItems.cpp.

36 {
37  return new _ArrayImp<TYP>( tup, name, info, idx, len, min, max, def );
38 }
virtual const std::string & name() const =0
Access _Item name.
T min(T...args)
T max(T...args)
template<class TYP>
const TYP& NTuple::_Array< TYP >::data ( long  i) const
inline

Access to data by reference (CONST)

Definition at line 188 of file NTuple.h.

188 { return this->m_buffer[i]; }
TYP * m_buffer
Pointer to data buffer.
Definition: NTuple.h:130
template<class TYP>
TYP& NTuple::_Array< TYP >::data ( long  i)
inline

Access to data by reference (CONST)

Definition at line 190 of file NTuple.h.

190 { return this->m_buffer[i]; }
TYP * m_buffer
Pointer to data buffer.
Definition: NTuple.h:130
template<class TYP>
TYP* NTuple::_Array< TYP >::end ( )
inline

Definition at line 193 of file NTuple.h.

193 { return this->m_buffer + this->length(); }
virtual long length() const =0
Access the buffer length.
TYP * m_buffer
Pointer to data buffer.
Definition: NTuple.h:130
template<class TYP>
template<class T >
_Array<TYP>& NTuple::_Array< TYP >::operator= ( const _Array< T > &  copy)
inline

Assignment operator.

Definition at line 176 of file NTuple.h.

177  {
178  long len = this->length();
179  if ( len == copy.length() ) {
180  const T* source = (const T*)copy.buffer();
181  std::copy_n( source, len, this->m_buffer );
182  return *this;
183  }
184  throw std::out_of_range( "N-tuple matrix cannot be copied! The index range does not match!" );
185  return *this;
186  }
T copy(T...args)
T copy_n(T...args)
virtual long length() const =0
Access the buffer length.
TYP * m_buffer
Pointer to data buffer.
Definition: NTuple.h:130

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