The Gaudi Framework  v31r0 (aeb156f0)
NTuple::Tuple Class Reference

Abstract base class which allows the user to interact with the actual N tuple implementation. More...

#include <GaudiKernel/NTuple.h>

Inheritance diagram for NTuple::Tuple:
Collaboration diagram for NTuple::Tuple:

Public Member Functions

template<class TYPE >
StatusCode item (const std::string &name, Item< TYPE > &result)
 Locate a scalar Item of data to the N tuple type safe. More...
 
template<class TYPE >
StatusCode item (const std::string &name, const Item< TYPE > &result) const
 Locate a scalar Item of data to the N tuple type safe (CONST) More...
 
template<class TYPE >
StatusCode item (const std::string &name, Array< TYPE > &result)
 Locate a Array of data to the N tuple type safe. More...
 
template<class TYPE >
StatusCode item (const std::string &name, const Array< TYPE > &result) const
 Locate a Array of data to the N tuple type safe (CONST) More...
 
template<class TYPE >
StatusCode item (const std::string &name, Matrix< TYPE > &result)
 Locate a Matrix of data to the N tuple type safe. More...
 
template<class TYPE >
StatusCode item (const std::string &name, const Matrix< TYPE > &result) const
 Locate a Matrix of data to the N tuple type safe (CONST) More...
 
template<class TYPE >
StatusCode addItem (const std::string &name, Item< TYPE > &itm)
 Add a scalar data item a N tuple. More...
 
template<class TYPE >
StatusCode addItem (const std::string &name, Item< TYPE * > &itm)
 Add an simple object item to an N tuple. More...
 
StatusCode addItem (const std::string &name, Item< IOpaqueAddress * > &itm)
 Add an address object item to an N tuple: specialized call. More...
 
template<class TYPE , class RANGE >
StatusCode addItem (const std::string &name, Item< TYPE > &itm, const RANGE low, const RANGE high)
 Add a scalar data item a N tuple with a range. More...
 
template<class TYPE >
StatusCode addItem (const std::string &name, long dim, Array< TYPE > &array)
 Add an fixed-size Array of data to a column wise N tuple. More...
 
template<class TYPE , class RANGE >
StatusCode addItem (const std::string &name, long dim, Array< TYPE > &array, const RANGE low, const RANGE high)
 Add an fixed-size Array of data to a column wise N tuple with a range. More...
 
template<class TYPE , class INDEX , class RANGE >
StatusCode addItem (const std::string &name, Item< INDEX > &index, Array< TYPE > &array, const RANGE low, const RANGE high)
 Add an indexed Array of data to a column wise N tuple with a range. More...
 
template<class TYPE , class INDEX , class RANGE >
StatusCode addIndexedItem (const std::string &name, Item< INDEX > &index, Array< TYPE > &array, const RANGE low, const RANGE high)
 Add an indexed Array of data to a column wise N tuple with a range. More...
 
template<class TYPE , class INDEX >
StatusCode addItem (const std::string &name, Item< INDEX > &index, Array< TYPE > &array)
 Add an indexed Array of data to a column wise N tuple. More...
 
template<class TYPE , class INDEX >
StatusCode addIndexedItem (const std::string &name, Item< INDEX > &index, Array< TYPE > &array)
 Add an indexed Array of data to a column wise N tuple. More...
 
template<class TYPE >
StatusCode addItem (const std::string &name, long cols, long rows, Matrix< TYPE > &matrix)
 Add an fixed size Matrix of data to a column wise N tuple. More...
 
template<class TYPE , class RANGE >
StatusCode addItem (const std::string &name, long cols, long rows, Matrix< TYPE > &result, const RANGE low, const RANGE high)
 Add an fixed size Matrix of data to a column wise N tuple. More...
 
template<class TYPE , class INDEX >
StatusCode addItem (const std::string &name, Item< INDEX > &index, Matrix< TYPE > &matrix, long rows)
 Add an variable size Matrix of data to a column wise N tuple. More...
 
template<class TYPE , class INDEX >
StatusCode addIndexedItem (const std::string &name, Item< INDEX > &col_index, long rows, Matrix< TYPE > &matrix)
 Add an variable size Matrix of data to a column wise N tuple. More...
 
template<class TYPE , class INDEX , class RANGE >
StatusCode addItem (const std::string &name, Item< INDEX > &index, Matrix< TYPE > &matrix, long rows, const RANGE low, const RANGE high)
 Add an variable size Matrix of data to a column wise N tuple. More...
 
template<class TYPE , class INDEX , class RANGE >
StatusCode addIndexedItem (const std::string &name, Item< INDEX > &index, long rows, Matrix< TYPE > &matrix, const RANGE low, const RANGE high)
 Add an variable size Matrix of data to a column wise N tuple. More...
 
- Public Member Functions inherited from DataObject
 DataObject ()
 Standard Constructor. More...
 
 DataObject (const DataObject &rhs)
 Copy Constructor. More...
 
DataObjectoperator= (const DataObject &rhs)
 Assignment Operator. More...
 
 DataObject (DataObject &&rhs)
 Move Constructor. More...
 
DataObjectoperator= (DataObject &&rhs)
 Move Assignment Operator. More...
 
virtual ~DataObject ()
 Standard Destructor. More...
 
virtual unsigned long addRef ()
 Add reference to object. More...
 
virtual unsigned long release ()
 release reference to object More...
 
virtual const CLIDclID () const
 Retrieve reference to class definition structure. More...
 
const std::stringname () const
 Retreive DataObject name. It is the name when registered in the store. More...
 
virtual StatusCode update ()
 Provide empty placeholder for internal object reconfiguration callback. More...
 
void setRegistry (IRegistry *pRegistry)
 Set pointer to Registry. More...
 
IRegistryregistry () const
 Get pointer to Registry. More...
 
LinkManagerlinkMgr () const
 Retrieve Link manager. More...
 
unsigned char version () const
 Retrieve version number of this object representation. More...
 
void setVersion (unsigned char vsn)
 Set version number of this object representation. More...
 
unsigned long refCount () const
 Return the refcount. More...
 
virtual std::ostreamfillStream (std::ostream &s) const
 Fill the output stream (ASCII) More...
 
- Public Member Functions inherited from INTuple
virtual ItemContaineritems ()=0
 Access item container. More...
 
virtual const ItemContaineritems () const =0
 Access item container (CONST) More...
 
virtual char * setBuffer (char *buff)=0
 Attach data buffer. More...
 
virtual const char * buffer () const =0
 Access data buffer (CONST) More...
 
virtual char * buffer ()=0
 Access data buffer. More...
 
virtual const std::stringtitle () const =0
 Object title. More...
 
virtual void reset ()=0
 Reset all entries to their default values. More...
 
virtual const INTupleItemfind (const std::string &name) const =0
 Find an item row of the Ntuple (CONST) More...
 
virtual INTupleItemfind (const std::string &name)=0
 Find an item row of the Ntuple. More...
 
virtual StatusCode add (INTupleItem *item)=0
 Add an item row to the N tuple. More...
 
virtual StatusCode remove (INTupleItem *item)=0
 Remove an item row (identified by pointer) from the N tuple. More...
 
virtual StatusCode remove (const std::string &name)=0
 Remove an item row (identified by name) from the N tuple. More...
 
virtual StatusCode attachSelector (ISelectStatement *sel)=0
 Attach selector. More...
 
virtual ISelectStatementselector ()=0
 Access selector. More...
 
virtual StatusCode write ()=0
 Write record of the NTuple (Shortcut of writeRecord) More...
 
virtual StatusCode writeRecord ()=0
 Write record of the NTuple. More...
 
virtual StatusCode read ()=0
 Read record of the NTuple (Shortcut of readRecord) More...
 
virtual StatusCode readRecord ()=0
 Read record of the NTuple. More...
 
virtual StatusCode save ()=0
 Save the NTuple. More...
 
virtual ~INTuple ()=default
 

Protected Member Functions

template<class TYPE >
StatusCode i_item (const std::string &name, _Item< TYPE > *&result) const
 Locate a _Column of data to the N tuple type safe. More...
 
template<class TYPE >
StatusCode i_item (const std::string &name, _Item< TYPE * > *&result) const
 Locate a _Column of data to the N tuple type unsafe for objects. More...
 
StatusCode i_item (const std::string &name, _Item< IOpaqueAddress * > *&result) const
 Locate a _Column of data to the N tuple type safe. More...
 
template<class TYPE >
StatusCode i_item (const std::string &name, _Array< TYPE > *&result) const
 Locate a _Array of data to the N tuple type safe. More...
 
template<class TYPE >
StatusCode i_item (const std::string &name, _Matrix< TYPE > *&result) const
 Locate a _Matrix of data to the N tuple type safe. More...
 
template<class TYPE >
StatusCode i_addItem (const std::string &name, long, const std::string &, TYPE low, TYPE high, _Item< TYPE > *&result)
 Add a _Item of data to the N tuple. More...
 
template<class TYPE >
StatusCode i_addItem (const std::string &name, long dim, const std::string &index, TYPE low, TYPE high, _Array< TYPE > *&result)
 Add a _Item of data to the N tuple. More...
 
template<class TYPE >
StatusCode i_addItem (const std::string &name, long dim1, long dim2, const std::string &index, TYPE low, TYPE high, _Matrix< TYPE > *&result)
 Add a _Item of data to the N tuple. More...
 
template<class TYPE >
StatusCode i_addObject (const std::string &name, _Item< TYPE * > *&result, const std::type_info &)
 
- Protected Member Functions inherited from INTuple
virtual INTupleItemi_find (const std::string &name) const =0
 Internally used by abstract classes. More...
 

Additional Inherited Members

- Public Types inherited from INTuple
typedef std::vector< INTupleItem * > ItemContainer
 
- Static Public Member Functions inherited from DataObject
static const CLIDclassID ()
 Retrieve reference to class definition structure (static access) More...
 

Detailed Description

Abstract base class which allows the user to interact with the actual N tuple implementation.

The class is abstract, because the template methods must be instantiated by the compiler at compile time. Otherwise the references would be unresolved.

Definition at line 375 of file NTuple.h.

Member Function Documentation

template<class TYPE , class INDEX , class RANGE >
StatusCode NTuple::Tuple::addIndexedItem ( const std::string name,
Item< INDEX > &  index,
Array< TYPE > &  array,
const RANGE  low,
const RANGE  high 
)
inline

Add an indexed Array of data to a column wise N tuple with a range.

You should use this entry point to add a VARIABLE SIZE ARRAY to a column wise N-tuple. The dimension of the array is unspecified and depends on the data range, which you allowed for the index column.

Hence you have to be careful on the allowed data range of the index column, because the index column determines the total allocated memory.

Note: Checks on the data range are not implemented!

Parameters
nameName of the column in the column wise N-tuple
indexReference to the scalar index column used to determine the size of the array.
arrayReference to the Array<TYPE> datatype, which should be connected to the N-tuple.
lowLower edge of client data values allowed to fill into the N-tuple array.
highUpper edge of client data values allowed to fill into the N-tuple array.
Returns
StatusCode indicating success or failure.

Definition at line 660 of file NTuple.h.

661  {
662  return i_addItem( name, index->range().distance(), index->name(), TYPE( low ), TYPE( high ), array.m_ptr );
663  }
struct GAUDI_API array
Parametrisation class for redirection array - like implementation.
StatusCode i_addItem(const std::string &name, long, const std::string &, TYPE low, TYPE high, _Item< TYPE > *&result)
Add a _Item of data to the N tuple.
Definition: NTuple.h:420
template<class TYPE , class INDEX >
StatusCode NTuple::Tuple::addIndexedItem ( const std::string name,
Item< INDEX > &  index,
Array< TYPE > &  array 
)
inline

Add an indexed Array of data to a column wise N tuple.

You should use this entry point to add a VARIABLE SIZE ARRAY to a column wise N-tuple. The dimension of the array is unspecified and depends on the data range, which you allowed for the index column.

Hence, you have to be careful on the allowed data range of the index column, because the index column determines the total allocated memory.

Parameters
nameName of the column in the column wise N-tuple
indexReference to the scalar index column used to determine the size of the array.
arrayReference to the Array<TYPE> datatype, which should be connected to the N-tuple.
Returns
StatusCode indicating success or failure.

Definition at line 715 of file NTuple.h.

715  {
716  return i_addItem( name, index->range().distance(), index->name(), Range<TYPE>::min(), Range<TYPE>::max(),
717  array.m_ptr );
718  }
static TYP min()
Minimal number of data.
Definition: NTuple.h:82
static TYP max()
Maximal number of data.
Definition: NTuple.h:84
struct GAUDI_API array
Parametrisation class for redirection array - like implementation.
StatusCode i_addItem(const std::string &name, long, const std::string &, TYPE low, TYPE high, _Item< TYPE > *&result)
Add a _Item of data to the N tuple.
Definition: NTuple.h:420
template<class TYPE , class INDEX >
StatusCode NTuple::Tuple::addIndexedItem ( const std::string name,
Item< INDEX > &  col_index,
long  rows,
Matrix< TYPE > &  matrix 
)
inline

Add an variable size Matrix of data to a column wise N tuple.

You should use this entry point to add a VARIABLE SIZE MATRIX to a column wise N-tuple. The number of columns of the matrix is given by the allowed data range of the index column. The number of rows however, which are allowed in the matrix must be specified explicitly and cannot be variable.

Attention: Do not confuse with entry point to add a FIXED SIZE MATRIX.

Parameters
nameName of the column in the column wise N-tuple
indexReference to the scalar index column used to determine the number of data columns in the matrix
rowsNumber of data rows in the Matrix.
matrixReference to the Matrix<TYPE> datatype, which should be connected to the N-tuple.
Returns
StatusCode indicating success or failure.

Definition at line 822 of file NTuple.h.

822  {
823  return i_addItem( name, col_index->range().distance(), rows, col_index->name(), Range<TYPE>::min(),
824  Range<TYPE>::max(), matrix.m_ptr );
825  }
static TYP min()
Minimal number of data.
Definition: NTuple.h:82
static TYP max()
Maximal number of data.
Definition: NTuple.h:84
StatusCode i_addItem(const std::string &name, long, const std::string &, TYPE low, TYPE high, _Item< TYPE > *&result)
Add a _Item of data to the N tuple.
Definition: NTuple.h:420
template<class TYPE , class INDEX , class RANGE >
StatusCode NTuple::Tuple::addIndexedItem ( const std::string name,
Item< INDEX > &  index,
long  rows,
Matrix< TYPE > &  matrix,
const RANGE  low,
const RANGE  high 
)
inline

Add an variable size Matrix of data to a column wise N tuple.

You should use this entry point to add a VARIABLE SIZE MATRIX to a column wise N-tuple. The number of columns of the matrix is given by the allowed data range of the index column. The number of rows however, which are allowed in the matrix must be specified explicitly and cannot be variable. Also the range of allowed data values to be filled into the data area of the matrix can be specified.

Note: Checks on the data range are not implemented! Attention: Do not confuse with entry point to add a FIXED SIZE MATRIX.

Parameters
nameName of the column in the column wise N-tuple
indexReference to the scalar index column used to determine the number of data columns in the matrix
rowsNumber of data rows in the Matrix.
matrixReference to the Matrix<TYPE> datatype, which should be connected to the N-tuple.
lowLower edge of client data values allowed to fill into the N-tuple matrix.
highUpper edge of client data values allowed to fill into the N-tuple matrix.
Returns
StatusCode indicating success or failure.

Definition at line 893 of file NTuple.h.

894  {
895  return i_addItem( name, index->range().distance(), rows, index->name(), TYPE( low ), TYPE( high ), matrix.m_ptr );
896  }
StatusCode i_addItem(const std::string &name, long, const std::string &, TYPE low, TYPE high, _Item< TYPE > *&result)
Add a _Item of data to the N tuple.
Definition: NTuple.h:420
template<class TYPE >
StatusCode NTuple::Tuple::addItem ( const std::string name,
Item< TYPE > &  itm 
)
inline

Add a scalar data item a N tuple.

Use this entry point to connect any allowed scalar data type to an N-tuple. The value filled, may have any range. Do NOT use this entry point to specify an index column in a column wise N-tuple.

Parameters
nameName of the column in the column wise N-tuple
itmReference to the Item<TYPE> datatype, which should be connected to the N-tuple.
Returns
StatusCode indicating success or failure.

Definition at line 503 of file NTuple.h.

503  {
504  typedef Range<TYPE> _R;
505  return i_addItem( name, 1, "", _R::min(), _R::max(), itm.m_ptr );
506  }
EventIDBase min(const EventIDBase &lhs, const EventIDBase &rhs)
Definition: EventIDBase.h:202
EventIDBase max(const EventIDBase &lhs, const EventIDBase &rhs)
Definition: EventIDBase.h:215
StatusCode i_addItem(const std::string &name, long, const std::string &, TYPE low, TYPE high, _Item< TYPE > *&result)
Add a _Item of data to the N tuple.
Definition: NTuple.h:420
template<class TYPE >
StatusCode NTuple::Tuple::addItem ( const std::string name,
Item< TYPE * > &  itm 
)
inline

Add an simple object item to an N tuple.

Parameters
nameName of the column in the column wise N-tuple
itmReference to the Item<TYPE> datatype, which should be connected to the N-tuple.
Returns
StatusCode indicating success or failure.

Definition at line 517 of file NTuple.h.

517  {
518  return i_addObject( name, itm.m_ptr, typeid( TYPE ) );
519  }
StatusCode i_addObject(const std::string &name, _Item< TYPE * > *&result, const std::type_info &)
Definition: NTuple.h:449
StatusCode NTuple::Tuple::addItem ( const std::string name,
Item< IOpaqueAddress * > &  itm 
)
inline

Add an address object item to an N tuple: specialized call.

Parameters
nameName of the column in the column wise N-tuple
itmReference to the Item<TYPE> datatype, which should be connected to the N-tuple.
Returns
StatusCode indicating success or failure.

Definition at line 529 of file NTuple.h.

529  {
530  typedef Range<IOpaqueAddress*> _R;
531  return i_addItem( name, 1, "", _R::min(), _R::max(), itm.m_ptr );
532  }
EventIDBase min(const EventIDBase &lhs, const EventIDBase &rhs)
Definition: EventIDBase.h:202
EventIDBase max(const EventIDBase &lhs, const EventIDBase &rhs)
Definition: EventIDBase.h:215
StatusCode i_addItem(const std::string &name, long, const std::string &, TYPE low, TYPE high, _Item< TYPE > *&result)
Add a _Item of data to the N tuple.
Definition: NTuple.h:420
template<class TYPE , class RANGE >
StatusCode NTuple::Tuple::addItem ( const std::string name,
Item< TYPE > &  itm,
const RANGE  low,
const RANGE  high 
)
inline

Add a scalar data item a N tuple with a range.

Typically this entry point is used to specuify index column with a fixed data range for a column wise N-tuple.

Note: Checks on the data range are not implemented!

Parameters
nameName of the column in the column wise N-tuple
itmReference to the Item<TYPE> datatype, which should be connected to the N-tuple.
lowLower edge of client data values allowed to fill into the N-tuple array.
highUpper edge of client data values allowed to fill into the N-tuple array.
Returns
StatusCode indicating success or failure.

Definition at line 552 of file NTuple.h.

552  {
553  return i_addItem( name, 1, "", TYPE( low ), TYPE( high ), itm.m_ptr );
554  }
StatusCode i_addItem(const std::string &name, long, const std::string &, TYPE low, TYPE high, _Item< TYPE > *&result)
Add a _Item of data to the N tuple.
Definition: NTuple.h:420
template<class TYPE >
StatusCode NTuple::Tuple::addItem ( const std::string name,
long  dim,
Array< TYPE > &  array 
)
inline

Add an fixed-size Array of data to a column wise N tuple.

You should use this entry point to add a FIXED SIZE ARRAY to a column wise N-tuple. The dimension of the array must be specified.

Parameters
nameName of the column in the column wise N-tuple
dimLength of the array to be added to the N-tuple
arrayReference to the Array<TYPE> datatype, which should be connected to the N-tuple.
Returns
StatusCode indicating success or failure.

Definition at line 570 of file NTuple.h.

570  {
571  return i_addItem( name, dim, "", Range<TYPE>::min(), Range<TYPE>::max(), array.m_ptr );
572  }
static TYP min()
Minimal number of data.
Definition: NTuple.h:82
static TYP max()
Maximal number of data.
Definition: NTuple.h:84
struct GAUDI_API array
Parametrisation class for redirection array - like implementation.
StatusCode i_addItem(const std::string &name, long, const std::string &, TYPE low, TYPE high, _Item< TYPE > *&result)
Add a _Item of data to the N tuple.
Definition: NTuple.h:420
template<class TYPE , class RANGE >
StatusCode NTuple::Tuple::addItem ( const std::string name,
long  dim,
Array< TYPE > &  array,
const RANGE  low,
const RANGE  high 
)
inline

Add an fixed-size Array of data to a column wise N tuple with a range.

You should use this entry point to add a FIXED SIZE ARRAY to a column wise N-tuple. The dimension of the array must be specified.

Note: Checks on the data range are not implemented!

Parameters
nameName of the column in the column wise N-tuple
dimLength of the array to be added to the N-tuple
arrayReference to the Array<TYPE> datatype, which should be connected to the N-tuple.
lowLower edge of client data values allowed to fill into the N-tuple array.
highUpper edge of client data values allowed to fill into the N-tuple array.
Returns
StatusCode indicating success or failure.

Definition at line 594 of file NTuple.h.

594  {
595  return i_addItem( name, dim, "", TYPE( low ), TYPE( high ), array.m_ptr );
596  }
struct GAUDI_API array
Parametrisation class for redirection array - like implementation.
StatusCode i_addItem(const std::string &name, long, const std::string &, TYPE low, TYPE high, _Item< TYPE > *&result)
Add a _Item of data to the N tuple.
Definition: NTuple.h:420
template<class TYPE , class INDEX , class RANGE >
StatusCode NTuple::Tuple::addItem ( const std::string name,
Item< INDEX > &  index,
Array< TYPE > &  array,
const RANGE  low,
const RANGE  high 
)
inline

Add an indexed Array of data to a column wise N tuple with a range.

You should use this entry point to add a VARIABLE SIZE ARRAY to a column wise N-tuple. The dimension of the array is unspecified and depends on the data range, which you allowed for the index column.

Hence you have to be careful on the allowed data range of the index column, because the index column determines the total allocated memory.

Note: Checks on the data range are not implemented!

Note: Due to confusion with the entry point to connecting a fixed size array the use of this function is DEPRECATED *** please use addIndexedItem(...) instead.

Parameters
nameName of the column in the column wise N-tuple
indexReference to the scalar index column used to determine the size of the array.
arrayReference to the Array<TYPE> datatype, which should be connected to the N-tuple.
lowLower edge of client data values allowed to fill into the N-tuple array.
highUpper edge of client data values allowed to fill into the N-tuple array.
Returns
StatusCode indicating success or failure.

Definition at line 629 of file NTuple.h.

630  {
631  return i_addItem( name, index->range().distance(), index->name(), TYPE( low ), TYPE( high ), array.m_ptr );
632  }
struct GAUDI_API array
Parametrisation class for redirection array - like implementation.
StatusCode i_addItem(const std::string &name, long, const std::string &, TYPE low, TYPE high, _Item< TYPE > *&result)
Add a _Item of data to the N tuple.
Definition: NTuple.h:420
template<class TYPE , class INDEX >
StatusCode NTuple::Tuple::addItem ( const std::string name,
Item< INDEX > &  index,
Array< TYPE > &  array 
)
inline

Add an indexed Array of data to a column wise N tuple.

You should use this entry point to add a VARIABLE SIZE ARRAY to a column wise N-tuple. The dimension of the array is unspecified and depends on the data range, which you allowed for the index column.

Hence, you have to be careful on the allowed data range of the index column, because the index column determines the total allocated memory.

Note: Due to confusion with the entry point to connecting a fixed size array the use of this member function is DEPRECATED *** please use addIndexedItem(...) instead.

Parameters
nameName of the column in the column wise N-tuple
indexReference to the scalar index column used to determine the size of the array.
arrayReference to the Array<TYPE> datatype, which should be connected to the N-tuple.
Returns
StatusCode indicating success or failure.

Definition at line 690 of file NTuple.h.

690  {
691  return i_addItem( name, index->range().distance(), index->name(), Range<TYPE>::min(), Range<TYPE>::max(),
692  array.m_ptr );
693  }
static TYP min()
Minimal number of data.
Definition: NTuple.h:82
static TYP max()
Maximal number of data.
Definition: NTuple.h:84
struct GAUDI_API array
Parametrisation class for redirection array - like implementation.
StatusCode i_addItem(const std::string &name, long, const std::string &, TYPE low, TYPE high, _Item< TYPE > *&result)
Add a _Item of data to the N tuple.
Definition: NTuple.h:420
template<class TYPE >
StatusCode NTuple::Tuple::addItem ( const std::string name,
long  cols,
long  rows,
Matrix< TYPE > &  matrix 
)
inline

Add an fixed size Matrix of data to a column wise N tuple.

You should use this entry point to add a FIXED SIZE MATRIX to a column wise N-tuple. The dimension of the matrix must be specified.

Attention: Do not confuse with entry point to add a VARIABLE SIZE MATRIX!

Parameters
nameName of the column in the column wise N-tuple
colsNumber of data columns in the Matrix.
rowsNumber of data rows in the Matrix.
matrixReference to the Matrix<TYPE> datatype, which should be connected to the N-tuple.
Returns
StatusCode indicating success or failure.

Definition at line 738 of file NTuple.h.

738  {
739  return i_addItem( name, cols, rows, "", Range<TYPE>::min(), Range<TYPE>::max(), matrix.m_ptr );
740  }
static TYP min()
Minimal number of data.
Definition: NTuple.h:82
static TYP max()
Maximal number of data.
Definition: NTuple.h:84
StatusCode i_addItem(const std::string &name, long, const std::string &, TYPE low, TYPE high, _Item< TYPE > *&result)
Add a _Item of data to the N tuple.
Definition: NTuple.h:420
template<class TYPE , class RANGE >
StatusCode NTuple::Tuple::addItem ( const std::string name,
long  cols,
long  rows,
Matrix< TYPE > &  result,
const RANGE  low,
const RANGE  high 
)
inline

Add an fixed size Matrix of data to a column wise N tuple.

You should use this entry point to add a FIXED SIZE MATRIX to a column wise N-tuple. The dimension of the matrix must be specified.

Note: Checks on the data range are not implemented! Attention: Do not confuse with entry point to add a VARIABLE SIZE MATRIX!

Parameters
nameName of the column in the column wise N-tuple
colsNumber of data columns in the Matrix.
rowsNumber of data rows in the Matrix.
matrixReference to the Matrix<TYPE> datatype, which should be connected to the N-tuple.
lowLower edge of client data values allowed to fill into the N-tuple matrix.
highUpper edge of client data values allowed to fill into the N-tuple matrix.
Returns
StatusCode indicating success or failure.

Definition at line 765 of file NTuple.h.

766  {
767  return i_addItem( name, cols, rows, "", TYPE( low ), TYPE( high ), result.m_ptr );
768  }
StatusCode i_addItem(const std::string &name, long, const std::string &, TYPE low, TYPE high, _Item< TYPE > *&result)
Add a _Item of data to the N tuple.
Definition: NTuple.h:420
template<class TYPE , class INDEX >
StatusCode NTuple::Tuple::addItem ( const std::string name,
Item< INDEX > &  index,
Matrix< TYPE > &  matrix,
long  rows 
)
inline

Add an variable size Matrix of data to a column wise N tuple.

You should use this entry point to add a VARIABLE SIZE MATRIX to a column wise N-tuple. The number of columns of the matrix is given by the allowed data range of the index column. The number of rows however, which are allowed in the matrix must be specified explicitly and cannot be variable.

Attention: Do not confuse with entry point to add a FIXED SIZE MATRIX.

Note: Due to confusion with the entry point to connecting a fixed size matrix the use of this member function is DEPRECATED *** please use addIndexedItem(...) instead.

Parameters
nameName of the column in the column wise N-tuple
indexReference to the scalar index column used to determine the number of data columns in the matrix
matrixReference to the Matrix<TYPE> datatype, which should be connected to the N-tuple.
rowsNumber of data rows in the Matrix.
Returns
StatusCode indicating success or failure.

Definition at line 796 of file NTuple.h.

796  {
797  return i_addItem( name, index->range().distance(), rows, index->name(), Range<TYPE>::min(), Range<TYPE>::max(),
798  matrix.m_ptr );
799  }
static TYP min()
Minimal number of data.
Definition: NTuple.h:82
static TYP max()
Maximal number of data.
Definition: NTuple.h:84
StatusCode i_addItem(const std::string &name, long, const std::string &, TYPE low, TYPE high, _Item< TYPE > *&result)
Add a _Item of data to the N tuple.
Definition: NTuple.h:420
template<class TYPE , class INDEX , class RANGE >
StatusCode NTuple::Tuple::addItem ( const std::string name,
Item< INDEX > &  index,
Matrix< TYPE > &  matrix,
long  rows,
const RANGE  low,
const RANGE  high 
)
inline

Add an variable size Matrix of data to a column wise N tuple.

You should use this entry point to add a VARIABLE SIZE MATRIX to a column wise N-tuple. The number of columns of the matrix is given by the allowed data range of the index column. The number of rows however, which are allowed in the matrix must be specified explicitly and cannot be variable. Also the range of allowed data values to be filled into the data area of the matrix can be specified.

Note: Checks on the data range are not implemented! Attention: Do not confuse with entry point to add a FIXED SIZE MATRIX.

Note: Due to confusion with the entry point to connecting a fixed size matrix the use of this member function is DEPRECATED *** please use addIndexedItem(...) instead.

Parameters
nameName of the column in the column wise N-tuple
indexReference to the scalar index column used to determine the number of data columns in the matrix
matrixReference to the Matrix<TYPE> datatype, which should be connected to the N-tuple.
rowsNumber of data rows in the Matrix.
lowLower edge of client data values allowed to fill into the N-tuple matrix.
highUpper edge of client data values allowed to fill into the N-tuple matrix.
Returns
StatusCode indicating success or failure.

Definition at line 860 of file NTuple.h.

861  {
862  return i_addItem( name, index->range().distance(), rows, index->name(), TYPE( low ), TYPE( high ), matrix.m_ptr );
863  }
StatusCode i_addItem(const std::string &name, long, const std::string &, TYPE low, TYPE high, _Item< TYPE > *&result)
Add a _Item of data to the N tuple.
Definition: NTuple.h:420
template<class TYPE >
StatusCode NTuple::Tuple::i_addItem ( const std::string name,
long  ,
const std::string ,
TYPE  low,
TYPE  high,
_Item< TYPE > *&  result 
)
inlineprotected

Add a _Item of data to the N tuple.

Definition at line 420 of file NTuple.h.

421  {
422  if ( !i_find( name ) ) {
423  TYPE nil;
424  nil = 0;
425  return add( result = _Item<TYPE>::create( this, name, typeid( TYPE ), low, high, nil ) );
426  }
427  return StatusCode::FAILURE;
428  }
virtual StatusCode add(INTupleItem *item)=0
Add an item row to the N tuple.
constexpr static const auto FAILURE
Definition: StatusCode.h:86
static _Item * create(INTuple *tup, const std::string &name, const std::type_info &info, TYP min, TYP max, TYP def)
Create instance.
Definition: NTupleItems.cpp:26
virtual INTupleItem * i_find(const std::string &name) const =0
Internally used by abstract classes.
template<class TYPE >
StatusCode NTuple::Tuple::i_addItem ( const std::string name,
long  dim,
const std::string index,
TYPE  low,
TYPE  high,
_Array< TYPE > *&  result 
)
inlineprotected

Add a _Item of data to the N tuple.

Definition at line 431 of file NTuple.h.

432  {
433  if ( !i_find( name ) && clID() == CLID_ColumnWiseTuple ) {
434  return add( result = _Array<TYPE>::create( this, name, typeid( TYPE ), index, dim, low, high, TYPE( 0 ) ) );
435  }
436  return StatusCode::FAILURE;
437  }
virtual StatusCode add(INTupleItem *item)=0
Add an item row to the N tuple.
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.
Definition: NTupleItems.cpp:33
virtual const CLID & clID() const
Retrieve reference to class definition structure.
Definition: DataObject.cpp:56
constexpr static const auto FAILURE
Definition: StatusCode.h:86
virtual INTupleItem * i_find(const std::string &name) const =0
Internally used by abstract classes.
template<class TYPE >
StatusCode NTuple::Tuple::i_addItem ( const std::string name,
long  dim1,
long  dim2,
const std::string index,
TYPE  low,
TYPE  high,
_Matrix< TYPE > *&  result 
)
inlineprotected

Add a _Item of data to the N tuple.

Definition at line 440 of file NTuple.h.

441  {
442  if ( !i_find( name ) && clID() == CLID_ColumnWiseTuple ) {
443  return add( result =
444  _Matrix<TYPE>::create( this, name, typeid( TYPE ), index, dim1, dim2, low, high, TYPE( 0 ) ) );
445  }
446  return StatusCode::FAILURE;
447  }
virtual StatusCode add(INTupleItem *item)=0
Add an item row to the N tuple.
virtual const CLID & clID() const
Retrieve reference to class definition structure.
Definition: DataObject.cpp:56
constexpr static const auto FAILURE
Definition: StatusCode.h:86
virtual INTupleItem * i_find(const std::string &name) const =0
Internally used by abstract classes.
static _Matrix * 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)
Create instance.
Definition: NTupleItems.cpp:40
template<class TYPE >
StatusCode NTuple::Tuple::i_addObject ( const std::string name,
_Item< TYPE * > *&  result,
const std::type_info  
)
inlineprotected

Definition at line 449 of file NTuple.h.

449  {
450  if ( !i_find( name ) && clID() == CLID_ColumnWiseTuple ) {
451  return add( result = (_Item<TYPE*>*)_Item<void*>::create( this, name, typeid( TYPE ), 0, 0, 0 ) );
452  }
453  return StatusCode::FAILURE;
454  }
virtual StatusCode add(INTupleItem *item)=0
Add an item row to the N tuple.
virtual const CLID & clID() const
Retrieve reference to class definition structure.
Definition: DataObject.cpp:56
constexpr static const auto FAILURE
Definition: StatusCode.h:86
static _Item * create(INTuple *tup, const std::string &name, const std::type_info &info, TYP min, TYP max, TYP def)
Create instance.
Definition: NTupleItems.cpp:26
virtual INTupleItem * i_find(const std::string &name) const =0
Internally used by abstract classes.
template<class TYPE >
StatusCode NTuple::Tuple::i_item ( const std::string name,
_Item< TYPE > *&  result 
) const
inlineprotected

Locate a _Column of data to the N tuple type safe.

Definition at line 380 of file NTuple.h.

380  {
381  try {
382  result = dynamic_cast<_Item<TYPE>*>( i_find( name ) );
383  } catch ( ... ) { result = nullptr; }
384  return result ? StatusCode::SUCCESS : StatusCode::FAILURE;
385  }
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
constexpr static const auto FAILURE
Definition: StatusCode.h:86
virtual INTupleItem * i_find(const std::string &name) const =0
Internally used by abstract classes.
template<class TYPE >
StatusCode NTuple::Tuple::i_item ( const std::string name,
_Item< TYPE * > *&  result 
) const
inlineprotected

Locate a _Column of data to the N tuple type unsafe for objects.

Definition at line 388 of file NTuple.h.

388  {
389  try {
390  _Item<void*>* p = dynamic_cast<_Item<void*>*>( i_find( name ) );
391  result = (_Item<TYPE*>*)p;
392  } catch ( ... ) { result = nullptr; }
393  return result ? StatusCode::SUCCESS : StatusCode::FAILURE;
394  }
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
constexpr static const auto FAILURE
Definition: StatusCode.h:86
virtual INTupleItem * i_find(const std::string &name) const =0
Internally used by abstract classes.
StatusCode NTuple::Tuple::i_item ( const std::string name,
_Item< IOpaqueAddress * > *&  result 
) const
inlineprotected

Locate a _Column of data to the N tuple type safe.

Definition at line 396 of file NTuple.h.

396  {
397  try {
398  result = dynamic_cast<_Item<IOpaqueAddress*>*>( i_find( name ) );
399  } catch ( ... ) { result = nullptr; }
400  return result ? StatusCode::SUCCESS : StatusCode::FAILURE;
401  }
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
constexpr static const auto FAILURE
Definition: StatusCode.h:86
virtual INTupleItem * i_find(const std::string &name) const =0
Internally used by abstract classes.
template<class TYPE >
StatusCode NTuple::Tuple::i_item ( const std::string name,
_Array< TYPE > *&  result 
) const
inlineprotected

Locate a _Array of data to the N tuple type safe.

Definition at line 404 of file NTuple.h.

404  {
405  try {
406  if ( clID() == CLID_ColumnWiseTuple ) { result = dynamic_cast<_Array<TYPE>*>( i_find( name ) ); }
407  } catch ( ... ) { result = nullptr; }
408  return result ? StatusCode::SUCCESS : StatusCode::FAILURE;
409  }
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
virtual const CLID & clID() const
Retrieve reference to class definition structure.
Definition: DataObject.cpp:56
constexpr static const auto FAILURE
Definition: StatusCode.h:86
virtual INTupleItem * i_find(const std::string &name) const =0
Internally used by abstract classes.
template<class TYPE >
StatusCode NTuple::Tuple::i_item ( const std::string name,
_Matrix< TYPE > *&  result 
) const
inlineprotected

Locate a _Matrix of data to the N tuple type safe.

Definition at line 412 of file NTuple.h.

412  {
413  try {
414  if ( clID() == CLID_ColumnWiseTuple ) { result = dynamic_cast<_Matrix<TYPE>*>( i_find( name ) ); }
415  } catch ( ... ) { result = nullptr; }
416  return result ? StatusCode::SUCCESS : StatusCode::FAILURE;
417  }
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
virtual const CLID & clID() const
Retrieve reference to class definition structure.
Definition: DataObject.cpp:56
constexpr static const auto FAILURE
Definition: StatusCode.h:86
virtual INTupleItem * i_find(const std::string &name) const =0
Internally used by abstract classes.
template<class TYPE >
StatusCode NTuple::Tuple::item ( const std::string name,
Item< TYPE > &  result 
)
inline

Locate a scalar Item of data to the N tuple type safe.

Definition at line 459 of file NTuple.h.

459  {
460  return i_item( name, result.m_ptr );
461  }
StatusCode i_item(const std::string &name, _Item< TYPE > *&result) const
Locate a _Column of data to the N tuple type safe.
Definition: NTuple.h:380
template<class TYPE >
StatusCode NTuple::Tuple::item ( const std::string name,
const Item< TYPE > &  result 
) const
inline

Locate a scalar Item of data to the N tuple type safe (CONST)

Definition at line 464 of file NTuple.h.

464  {
465  return i_item( name, result.m_ptr );
466  }
StatusCode i_item(const std::string &name, _Item< TYPE > *&result) const
Locate a _Column of data to the N tuple type safe.
Definition: NTuple.h:380
template<class TYPE >
StatusCode NTuple::Tuple::item ( const std::string name,
Array< TYPE > &  result 
)
inline

Locate a Array of data to the N tuple type safe.

Definition at line 469 of file NTuple.h.

469  {
470  return i_item( name, result.m_ptr );
471  }
StatusCode i_item(const std::string &name, _Item< TYPE > *&result) const
Locate a _Column of data to the N tuple type safe.
Definition: NTuple.h:380
template<class TYPE >
StatusCode NTuple::Tuple::item ( const std::string name,
const Array< TYPE > &  result 
) const
inline

Locate a Array of data to the N tuple type safe (CONST)

Definition at line 474 of file NTuple.h.

474  {
475  return i_item( name, result.m_ptr );
476  }
StatusCode i_item(const std::string &name, _Item< TYPE > *&result) const
Locate a _Column of data to the N tuple type safe.
Definition: NTuple.h:380
template<class TYPE >
StatusCode NTuple::Tuple::item ( const std::string name,
Matrix< TYPE > &  result 
)
inline

Locate a Matrix of data to the N tuple type safe.

Definition at line 479 of file NTuple.h.

479  {
480  return i_item( name, result.m_ptr );
481  }
StatusCode i_item(const std::string &name, _Item< TYPE > *&result) const
Locate a _Column of data to the N tuple type safe.
Definition: NTuple.h:380
template<class TYPE >
StatusCode NTuple::Tuple::item ( const std::string name,
const Matrix< TYPE > &  result 
) const
inline

Locate a Matrix of data to the N tuple type safe (CONST)

Definition at line 485 of file NTuple.h.

485  {
486  return i_item( name, result.m_ptr );
487  }
StatusCode i_item(const std::string &name, _Item< TYPE > *&result) const
Locate a _Column of data to the N tuple type safe.
Definition: NTuple.h:380

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