The Gaudi Framework  master (ff829712)
Loading...
Searching...
No Matches
NTuple::_Array< TYP > Class Template Reference

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

#include </builds/gaudi/Gaudi/GaudiKernel/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.
 
const TYP & data (long i) const
 Access to data by reference (CONST)
 
TYP & data (long i)
 Access to data by reference (CONST)
 
TYP * begin ()
 
TYP * end ()
 
- Public Member Functions inherited from NTuple::_Data< TYP >
virtual void setDefault (const TYP d)=0
 Set default value.
 
virtual const ItemRangerange () const =0
 Access the range if specified.
 
- Public Member Functions inherited from INTupleItem
virtual ~INTupleItem ()=default
 destructor
 
virtual void release ()=0
 Destruct object.
 
virtual const std::type_info & typeID () const =0
 Compiler type ID.
 
virtual std::string typeName () const =0
 Proper type name of the object.
 
virtual const void * buffer () const =0
 Access data buffer (CONST)
 
virtual bool hasIndex () const =0
 Is the tuple have an index item?
 
virtual const std::string & index () const =0
 Access the index _Item.
 
virtual const std::string & name () const =0
 Access _Item name.
 
virtual long type () const =0
 Type information of the item.
 
virtual long length () const =0
 Access the buffer length.
 
virtual void reset ()=0
 Reset column.
 
virtual long ndim () const =0
 Dimension.
 
virtual long dim (long i) const =0
 Access individual dimensions.
 
virtual long size () const =0
 Size of entire object.
 
virtual long filled () const =0
 Number of items filled.
 
virtual INTupleItemindexItem ()=0
 Pointer to index column (if present, 0 else)
 
virtual const INTupleItemindexItem () const =0
 Pointer to index column (if present, 0 else) (CONST)
 
virtual INTupletuple ()=0
 NTuple the item belongs to.
 

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.
 

Additional Inherited Members

- Public Types inherited from NTuple::_Data< TYP >
typedef Range< TYP > ItemRange
 Set type definition to make life more easy easy.
 
- Protected Member Functions inherited from INTupleItem
virtual void setType (long typ)=0
 Set the properties of the INTupleItem.
 
- Protected Attributes inherited from NTuple::_Data< TYP >
TYP * m_buffer = nullptr
 Pointer to data buffer.
 

Detailed Description

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

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

Definition at line 159 of file NTuple.h.

Member Function Documentation

◆ begin()

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

Definition at line 181 of file NTuple.h.

181{ return this->m_buffer; }
TYP * m_buffer
Pointer to data buffer.
Definition NTuple.h:125

◆ create()

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

28 {
29 return new _ArrayImp<TYP>( tup, name, info, idx, len, min, max, def );
30}
virtual const std::string & name() const =0
Access _Item name.
Abstract class describing a column-array in a N tuple.
Definition NTuple.h:159

◆ data() [1/2]

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.

179{ return this->m_buffer[i]; }

◆ data() [2/2]

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.

177{ return this->m_buffer[i]; }

◆ end()

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

Definition at line 182 of file NTuple.h.

182{ return this->m_buffer + this->length(); }
virtual long length() const =0
Access the buffer length.

◆ operator=()

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

Assignment operator.

Definition at line 166 of file NTuple.h.

166 {
167 long len = this->length();
168 if ( len == copy.length() ) {
169 const T* source = (const T*)copy.buffer();
170 std::copy_n( source, len, this->m_buffer );
171 return *this;
172 }
173 throw std::out_of_range( "N-tuple matrix cannot be copied! The index range does not match!" );
174 return *this;
175 }
virtual const void * buffer() const =0
Access data buffer (CONST)

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