All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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

virtual ~Tuple ()
 Standard destructor. More...
 
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 &)
 Copy Constructor. 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::string & name () 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::ostream & fillStream (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 void 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::string & title () 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 ()
 

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

Constructor & Destructor Documentation

virtual NTuple::Tuple::~Tuple ( )
inlinevirtual

Standard destructor.

Definition at line 497 of file NTuple.h.

497  {
498  }

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

745  {
746  return i_addItem( name,
747  index->range().distance(),
748  index->name(),
749  TYPE(low),
750  TYPE(high),
751  array.m_ptr);
752  }
struct GAUDI_API array
Parametrisation class for redirection array - like implementation.
const std::string & name() const
Retreive DataObject name. It is the name when registered in the store.
Definition: DataObject.cpp:68
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:432
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 811 of file NTuple.h.

814  {
815  return i_addItem( name,
816  index->range().distance(),
817  index->name(),
820  array.m_ptr);
821  }
static TYP min()
Minimal number of data.
Definition: NTuple.h:77
static TYP max()
Maximal number of data.
Definition: NTuple.h:79
struct GAUDI_API array
Parametrisation class for redirection array - like implementation.
const std::string & name() const
Retreive DataObject name. It is the name when registered in the store.
Definition: DataObject.cpp:68
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:432
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 955 of file NTuple.h.

959  {
960  return i_addItem( name,
961  col_index->range().distance(),
962  rows,
963  col_index->name(),
966  matrix.m_ptr);
967  }
static TYP min()
Minimal number of data.
Definition: NTuple.h:77
static TYP max()
Maximal number of data.
Definition: NTuple.h:79
const std::string & name() const
Retreive DataObject name. It is the name when registered in the store.
Definition: DataObject.cpp:68
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:432
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 1046 of file NTuple.h.

1052  {
1053  return i_addItem( name,
1054  index->range().distance(),
1055  rows,
1056  index->name(),
1057  TYPE(low),
1058  TYPE(high),
1059  matrix.m_ptr);
1060  }
const std::string & name() const
Retreive DataObject name. It is the name when registered in the store.
Definition: DataObject.cpp:68
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:432
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 551 of file NTuple.h.

551  {
552  typedef Range<TYPE> _R;
553  return i_addItem(name, 1, "", _R::min(), _R::max(), itm.m_ptr);
554  }
tuple itm
Definition: ana.py:57
#define min(a, b)
const std::string & name() const
Retreive DataObject name. It is the name when registered in the store.
Definition: DataObject.cpp:68
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:432
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 565 of file NTuple.h.

565  {
566  return i_addObject(name,itm.m_ptr,typeid(TYPE));
567  }
tuple itm
Definition: ana.py:57
StatusCode i_addObject(const std::string &name, _Item< TYPE * > *&result, const std::type_info &)
Definition: NTuple.h:488
const std::string & name() const
Retreive DataObject name. It is the name when registered in the store.
Definition: DataObject.cpp:68
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 578 of file NTuple.h.

578  {
579  typedef Range<IOpaqueAddress*> _R;
580  return i_addItem(name, 1, "", _R::min(), _R::max(), itm.m_ptr);
581  }
tuple itm
Definition: ana.py:57
#define min(a, b)
const std::string & name() const
Retreive DataObject name. It is the name when registered in the store.
Definition: DataObject.cpp:68
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:432
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 601 of file NTuple.h.

605  {
606  return i_addItem( name, 1, "", TYPE(low), TYPE(high), itm.m_ptr);
607  }
tuple itm
Definition: ana.py:57
const std::string & name() const
Retreive DataObject name. It is the name when registered in the store.
Definition: DataObject.cpp:68
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:432
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 623 of file NTuple.h.

626  {
627  return i_addItem(name,
628  dim,
629  "",
631  Range<TYPE>::max(),
632  array.m_ptr);
633  }
#define min(a, b)
struct GAUDI_API array
Parametrisation class for redirection array - like implementation.
const std::string & name() const
Retreive DataObject name. It is the name when registered in the store.
Definition: DataObject.cpp:68
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:432
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 655 of file NTuple.h.

660  {
661  return i_addItem(name,
662  dim,
663  "",
664  TYPE(low),
665  TYPE(high),
666  array.m_ptr);
667  }
struct GAUDI_API array
Parametrisation class for redirection array - like implementation.
const std::string & name() const
Retreive DataObject name. It is the name when registered in the store.
Definition: DataObject.cpp:68
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:432
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 700 of file NTuple.h.

705  {
706  return i_addItem( name,
707  index->range().distance(),
708  index->name(),
709  TYPE(low),
710  TYPE(high),
711  array.m_ptr);
712  }
struct GAUDI_API array
Parametrisation class for redirection array - like implementation.
const std::string & name() const
Retreive DataObject name. It is the name when registered in the store.
Definition: DataObject.cpp:68
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:432
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 779 of file NTuple.h.

782  {
783  return i_addItem( name,
784  index->range().distance(),
785  index->name(),
788  array.m_ptr);
789  }
static TYP min()
Minimal number of data.
Definition: NTuple.h:77
static TYP max()
Maximal number of data.
Definition: NTuple.h:79
struct GAUDI_API array
Parametrisation class for redirection array - like implementation.
const std::string & name() const
Retreive DataObject name. It is the name when registered in the store.
Definition: DataObject.cpp:68
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:432
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 841 of file NTuple.h.

845  {
846  return i_addItem(name,
847  cols,
848  rows,
849  "",
851  Range<TYPE>::max(),
852  matrix.m_ptr);
853  }
#define min(a, b)
const std::string & name() const
Retreive DataObject name. It is the name when registered in the store.
Definition: DataObject.cpp:68
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:432
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 878 of file NTuple.h.

884  {
885  return i_addItem(name,
886  cols,
887  rows,
888  "",
889  TYPE(low),
890  TYPE(high),
891  result.m_ptr);
892  }
const std::string & name() const
Retreive DataObject name. It is the name when registered in the store.
Definition: DataObject.cpp:68
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:432
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 920 of file NTuple.h.

924  {
925  return i_addItem( name,
926  index->range().distance(),
927  rows,
928  index->name(),
931  matrix.m_ptr);
932  }
static TYP min()
Minimal number of data.
Definition: NTuple.h:77
static TYP max()
Maximal number of data.
Definition: NTuple.h:79
const std::string & name() const
Retreive DataObject name. It is the name when registered in the store.
Definition: DataObject.cpp:68
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:432
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 1002 of file NTuple.h.

1008  {
1009  return i_addItem( name,
1010  index->range().distance(),
1011  rows,
1012  index->name(),
1013  TYPE(low),
1014  TYPE(high),
1015  matrix.m_ptr);
1016  }
const std::string & name() const
Retreive DataObject name. It is the name when registered in the store.
Definition: DataObject.cpp:68
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:432
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 432 of file NTuple.h.

437  {
438  if ( !i_find(name) ) {
439  TYPE nil;
440  nil = 0;
441  return add( result = _Item<TYPE>::create(this, name, typeid(TYPE), low, high, nil) );
442  }
443  return StatusCode::FAILURE;
444  }
virtual StatusCode add(INTupleItem *item)=0
Add an item row to the N tuple.
virtual INTupleItem * i_find(const std::string &name) const =0
Internally used by abstract classes.
const std::string & name() const
Retreive DataObject name. It is the name when registered in the store.
Definition: DataObject.cpp:68
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 447 of file NTuple.h.

452  {
453  if ( !i_find(name) && clID() == CLID_ColumnWiseTuple ) {
454  return add( result = _Array<TYPE>::create(this,
455  name,
456  typeid(TYPE),
457  index,
458  dim,
459  low,
460  high,
461  TYPE(0)) );
462  }
463  return StatusCode::FAILURE;
464  }
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:58
virtual INTupleItem * i_find(const std::string &name) const =0
Internally used by abstract classes.
const std::string & name() const
Retreive DataObject name. It is the name when registered in the store.
Definition: DataObject.cpp:68
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 467 of file NTuple.h.

473  {
474  if ( !i_find(name) && clID() == CLID_ColumnWiseTuple ) {
475  return add( result = _Matrix<TYPE>::create(this,
476  name,
477  typeid(TYPE),
478  index,
479  dim1,
480  dim2,
481  low,
482  high,
483  TYPE(0)) );
484  }
485  return StatusCode::FAILURE;
486  }
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:58
virtual INTupleItem * i_find(const std::string &name) const =0
Internally used by abstract classes.
const std::string & name() const
Retreive DataObject name. It is the name when registered in the store.
Definition: DataObject.cpp:68
template<class TYPE >
StatusCode NTuple::Tuple::i_addObject ( const std::string &  name,
_Item< TYPE * > *&  result,
const std::type_info &   
)
inlineprotected

Definition at line 488 of file NTuple.h.

488  {
489  if ( !i_find(name) && clID() == CLID_ColumnWiseTuple ) {
490  return add( result = (_Item<TYPE*>*)_Item<void*>::create(this, name, typeid(TYPE),0,0,0) );
491  }
492  return StatusCode::FAILURE;
493  }
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:58
virtual INTupleItem * i_find(const std::string &name) const =0
Internally used by abstract classes.
const std::string & name() const
Retreive DataObject name. It is the name when registered in the store.
Definition: DataObject.cpp:68
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 371 of file NTuple.h.

372  {
373  try {
374  result = dynamic_cast< _Item<TYPE>* > (i_find(name));
375  }
376  catch (...) {
377  result = 0;
378  }
379  return (0==result) ? StatusCode::FAILURE : StatusCode::SUCCESS;
380  }
virtual INTupleItem * i_find(const std::string &name) const =0
Internally used by abstract classes.
const std::string & name() const
Retreive DataObject name. It is the name when registered in the store.
Definition: DataObject.cpp:68
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 382 of file NTuple.h.

383  {
384  try {
385  _Item<void*>* p = dynamic_cast< _Item<void*>* > (i_find(name));
386  result = (_Item<TYPE*>*)p;
387  }
388  catch (...) {
389  result = 0;
390  }
391  return (0==result) ? StatusCode::FAILURE : StatusCode::SUCCESS;
392  }
virtual INTupleItem * i_find(const std::string &name) const =0
Internally used by abstract classes.
const std::string & name() const
Retreive DataObject name. It is the name when registered in the store.
Definition: DataObject.cpp:68
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 394 of file NTuple.h.

395  {
396  try {
397  result = dynamic_cast< _Item<IOpaqueAddress*>* > (i_find(name));
398  }
399  catch (...) {
400  result = 0;
401  }
402  return (0==result) ? StatusCode::FAILURE : StatusCode::SUCCESS;
403  }
virtual INTupleItem * i_find(const std::string &name) const =0
Internally used by abstract classes.
const std::string & name() const
Retreive DataObject name. It is the name when registered in the store.
Definition: DataObject.cpp:68
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 405 of file NTuple.h.

406  {
407  try {
408  if ( clID() == CLID_ColumnWiseTuple ) {
409  result = dynamic_cast< _Array<TYPE>* > (i_find(name));
410  }
411  }
412  catch (...) {
413  result = 0;
414  }
415  return (0==result) ? StatusCode::FAILURE : StatusCode::SUCCESS;
416  }
virtual const CLID & clID() const
Retrieve reference to class definition structure.
Definition: DataObject.cpp:58
virtual INTupleItem * i_find(const std::string &name) const =0
Internally used by abstract classes.
const std::string & name() const
Retreive DataObject name. It is the name when registered in the store.
Definition: DataObject.cpp:68
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 418 of file NTuple.h.

419  {
420  try {
421  if ( clID() == CLID_ColumnWiseTuple ) {
422  result = dynamic_cast< _Matrix<TYPE>* > (i_find(name));
423  }
424  }
425  catch (...) {
426  result = 0;
427  }
428  return (0==result) ? StatusCode::FAILURE : StatusCode::SUCCESS;
429  }
virtual const CLID & clID() const
Retrieve reference to class definition structure.
Definition: DataObject.cpp:58
virtual INTupleItem * i_find(const std::string &name) const =0
Internally used by abstract classes.
const std::string & name() const
Retreive DataObject name. It is the name when registered in the store.
Definition: DataObject.cpp:68
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 500 of file NTuple.h.

502  {
503  return i_item(name, result.m_ptr);
504  }
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:371
const std::string & name() const
Retreive DataObject name. It is the name when registered in the store.
Definition: DataObject.cpp:68
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 506 of file NTuple.h.

508  {
509  return i_item(name, result.m_ptr);
510  }
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:371
const std::string & name() const
Retreive DataObject name. It is the name when registered in the store.
Definition: DataObject.cpp:68
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 513 of file NTuple.h.

514  {
515  return i_item(name, result.m_ptr);
516  }
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:371
const std::string & name() const
Retreive DataObject name. It is the name when registered in the store.
Definition: DataObject.cpp:68
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 518 of file NTuple.h.

520  {
521  return i_item(name, result.m_ptr);
522  }
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:371
const std::string & name() const
Retreive DataObject name. It is the name when registered in the store.
Definition: DataObject.cpp:68
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 524 of file NTuple.h.

526  {
527  return i_item(name, result.m_ptr);
528  }
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:371
const std::string & name() const
Retreive DataObject name. It is the name when registered in the store.
Definition: DataObject.cpp:68
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 531 of file NTuple.h.

533  {
534  return i_item(name, result.m_ptr);
535  }
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:371
const std::string & name() const
Retreive DataObject name. It is the name when registered in the store.
Definition: DataObject.cpp:68

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