#include <NTupleItems.h>
Inheritance diagram for NTuple::_MatrixImp< TYP >:
Public Types | |
typedef Range< TYP > | ItemRange |
Set type definition to make life more easy easy. | |
Public Member Functions | |
_MatrixImp (INTuple *tup, const std::string &name, const std::type_info &typ, const std::string &index, long ncol, long nrow, TYP min, TYP max, TYP def) | |
Standard Constructor. | |
virtual | ~_MatrixImp () |
Standard Destructor. | |
virtual void | setDefault (const TYP val) |
Set default value. | |
virtual const ItemRange & | range () const |
Access the range if specified. | |
virtual long | size () const |
Size of entire object. | |
virtual long | ndim () const |
Dimension. | |
virtual long | dim (long i) const |
Access individual dimensions. | |
virtual std::string | typeName () const |
Get proper type name. | |
virtual void | reset () |
Reset to default. | |
virtual long | filled () const |
Number of items filled. | |
virtual INTupleItem * | indexItem () |
Pointer to index column (if present, 0 else). | |
virtual const INTupleItem * | indexItem () const |
Pointer to index column (if present, 0 else) (CONST). | |
virtual const std::type_info & | typeID () const |
Compiler type ID. | |
virtual void | release () |
Destruct object. | |
virtual bool | hasIndex () const |
Is the tuple have an index column? | |
virtual const std::string & | index () const |
Access the index _Column. | |
virtual const std::string & | name () const |
Access _Column name. | |
virtual long | type () const |
TYP information of the item. | |
virtual void | setType (long t) |
Set the properties of the _Column. | |
virtual long | length () const |
Access the buffer length. | |
virtual const void * | buffer () const |
Access data buffer (CONST). | |
virtual void * | buffer () |
Access data buffer. | |
virtual INTuple * | tuple () |
Access to hosting ntuple. | |
TYP * | column (long i) |
Access to data by reference. | |
const TYP * | column (long i) const |
Access to data by reference (CONST). | |
Static Public Member Functions | |
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. | |
Protected Types | |
typedef const std::string & | CSTR |
typedef const std::type_info & | CTYPE |
Protected Attributes | |
long | m_length |
Entire buffer length. | |
INTuple * | m_tuple |
Pointer to N tuple. | |
std::string | m_name |
_Column name | |
std::string | m_index |
Check that values are within a certain range while filling. | |
INTupleItem * | m_indexItem |
Pointer to index item. | |
DataTypeInfo::Type | m_type |
_Column type | |
TYP | m_def |
Buffer with default value. | |
Range< TYP > | m_range |
Check that values are within a certain range while filling. | |
const std::type_info & | m_info |
Item type information. | |
TYP * | m_buffer |
Pointer to data buffer. | |
long | m_rows |
Number of rows per column. |
Definition at line 211 of file NTupleItems.h.
typedef Range<TYP> NTuple::_MatrixImp< TYP >::ItemRange |
Set type definition to make life more easy easy.
Reimplemented from NTuple::_DataImp< TYP >.
Definition at line 215 of file NTupleItems.h.
typedef const std::string& NTuple::_DataImp< TYP >::CSTR [protected, inherited] |
Definition at line 44 of file NTupleItems.h.
typedef const std::type_info& NTuple::_DataImp< TYP >::CTYPE [protected, inherited] |
Definition at line 45 of file NTupleItems.h.
NTuple::_MatrixImp< TYP >::_MatrixImp | ( | INTuple * | tup, | |
const std::string & | name, | |||
const std::type_info & | typ, | |||
const std::string & | index, | |||
long | ncol, | |||
long | nrow, | |||
TYP | min, | |||
TYP | max, | |||
TYP | def | |||
) | [inline] |
Standard Constructor.
Definition at line 217 of file NTupleItems.h.
00219 : _DataImp<TYP>(tup, name, typ, index, nrow*ncol, min, max, def) { 00220 this->m_rows = nrow; 00221 }
virtual NTuple::_MatrixImp< TYP >::~_MatrixImp | ( | ) | [inline, virtual] |
virtual void NTuple::_MatrixImp< TYP >::setDefault | ( | const TYP | val | ) | [inline, virtual] |
Set default value.
Reimplemented from NTuple::_DataImp< TYP >.
Definition at line 227 of file NTupleItems.h.
00227 { this->m_def = val; }
virtual const ItemRange& NTuple::_MatrixImp< TYP >::range | ( | ) | const [inline, virtual] |
Access the range if specified.
Reimplemented from NTuple::_DataImp< TYP >.
Definition at line 229 of file NTupleItems.h.
00229 { return this->m_range; }
virtual long NTuple::_MatrixImp< TYP >::size | ( | ) | const [inline, virtual] |
Size of entire object.
Reimplemented from NTuple::_DataImp< TYP >.
Definition at line 231 of file NTupleItems.h.
00231 { return this->m_length*sizeof(TYP); }
virtual long NTuple::_MatrixImp< TYP >::ndim | ( | ) | const [inline, virtual] |
Dimension.
Reimplemented from NTuple::_DataImp< TYP >.
Definition at line 233 of file NTupleItems.h.
virtual long NTuple::_MatrixImp< TYP >::dim | ( | long | i | ) | const [inline, virtual] |
Access individual dimensions.
Reimplemented from NTuple::_DataImp< TYP >.
Definition at line 235 of file NTupleItems.h.
00235 { 00236 return (this->hasIndex()) ? 00237 ((i==0) ? 00238 this->m_rows : this->m_length/this->m_rows) : ((i==1) ? this->m_length/this->m_rows : this->m_rows); 00239 }
virtual std::string NTuple::_DataImp< TYP >::typeName | ( | ) | const [inline, virtual, inherited] |
Get proper type name.
Implements INTupleItem.
Definition at line 82 of file NTupleItems.h.
00082 { 00083 return System::typeinfoName( this->typeID() ); 00084 }
virtual void NTuple::_DataImp< TYP >::reset | ( | ) | [inline, virtual, inherited] |
Reset to default.
Implements INTupleItem.
Definition at line 86 of file NTupleItems.h.
00086 { 00087 TYP* buff = this->m_buffer; 00088 for ( size_t i = 0; i < static_cast<size_t>(m_length); i++ ) { 00089 *buff++ = m_def; 00090 } 00091 }
virtual long NTuple::_DataImp< TYP >::filled | ( | ) | const [inline, virtual, inherited] |
Number of items filled.
Implements INTupleItem.
Definition at line 93 of file NTupleItems.h.
00093 { 00094 int len = 1; 00095 int nd = ndim(); 00096 if ( m_length > 1 ) { 00097 for ( int l = 0; l < nd-1; l++ ) { 00098 len *= dim(l); 00099 } 00100 if ( indexItem() ) { 00101 long *ll = (long*)m_indexItem->buffer(); 00102 len *= *ll; 00103 } 00104 else if ( nd > 1 ) { 00105 len *= dim(nd); 00106 } 00107 } 00108 return len; 00109 }
virtual INTupleItem* NTuple::_DataImp< TYP >::indexItem | ( | ) | [inline, virtual, inherited] |
Pointer to index column (if present, 0 else).
Implements INTupleItem.
Definition at line 111 of file NTupleItems.h.
00111 { 00112 if ( 0 == m_indexItem ) { 00113 m_indexItem = m_tuple->find(m_index); 00114 } 00115 return m_indexItem; 00116 }
virtual const INTupleItem* NTuple::_DataImp< TYP >::indexItem | ( | ) | const [inline, virtual, inherited] |
Pointer to index column (if present, 0 else) (CONST).
Implements INTupleItem.
Definition at line 118 of file NTupleItems.h.
00118 { 00119 if ( 0 == m_indexItem ) { 00120 m_indexItem = m_tuple->find(m_index); 00121 } 00122 return m_indexItem; 00123 }
virtual const std::type_info& NTuple::_DataImp< TYP >::typeID | ( | ) | const [inline, virtual, inherited] |
Compiler type ID.
Implements INTupleItem.
Definition at line 125 of file NTupleItems.h.
00125 { return m_info;}
virtual void NTuple::_DataImp< TYP >::release | ( | ) | [inline, virtual, inherited] |
virtual bool NTuple::_DataImp< TYP >::hasIndex | ( | ) | const [inline, virtual, inherited] |
Is the tuple have an index column?
Implements INTupleItem.
Definition at line 131 of file NTupleItems.h.
00131 { return m_index.length()>0; }
virtual const std::string& NTuple::_DataImp< TYP >::index | ( | ) | const [inline, virtual, inherited] |
Access the index _Column.
Implements INTupleItem.
Definition at line 133 of file NTupleItems.h.
00133 { return m_index; }
virtual const std::string& NTuple::_DataImp< TYP >::name | ( | ) | const [inline, virtual, inherited] |
Access _Column name.
Implements INTupleItem.
Definition at line 135 of file NTupleItems.h.
00135 { return m_name; }
virtual long NTuple::_DataImp< TYP >::type | ( | ) | const [inline, virtual, inherited] |
TYP information of the item.
Implements INTupleItem.
Definition at line 137 of file NTupleItems.h.
00137 { return m_type; }
virtual void NTuple::_DataImp< TYP >::setType | ( | long | t | ) | [inline, virtual, inherited] |
Set the properties of the _Column.
Implements INTupleItem.
Definition at line 139 of file NTupleItems.h.
00139 { m_type=DataTypeInfo::Type(t); }
virtual long NTuple::_DataImp< TYP >::length | ( | ) | const [inline, virtual, inherited] |
Access the buffer length.
Implements INTupleItem.
Definition at line 145 of file NTupleItems.h.
00145 { return m_length; }
virtual const void* NTuple::_DataImp< TYP >::buffer | ( | ) | const [inline, virtual, inherited] |
Access data buffer (CONST).
Implements INTupleItem.
Definition at line 147 of file NTupleItems.h.
00147 { return this->m_buffer; }
virtual void* NTuple::_DataImp< TYP >::buffer | ( | ) | [inline, virtual, inherited] |
virtual INTuple* NTuple::_DataImp< TYP >::tuple | ( | ) | [inline, virtual, inherited] |
Access to hosting ntuple.
Implements INTupleItem.
Definition at line 155 of file NTupleItems.h.
00155 { return m_tuple; }
static _Matrix* NTuple::_Matrix< TYP >::create | ( | INTuple * | tup, | |
const std::string & | name, | |||
const std::type_info & | info, | |||
const std::string & | index, | |||
long | ncol, | |||
long | nrow, | |||
TYP | min, | |||
TYP | max, | |||
TYP | def | |||
) | [static, inherited] |
Create instance.
TYP* NTuple::_Matrix< TYP >::column | ( | long | i | ) | [inline, inherited] |
const TYP* NTuple::_Matrix< TYP >::column | ( | long | i | ) | const [inline, inherited] |
long NTuple::_DataImp< TYP >::m_length [protected, inherited] |
INTuple* NTuple::_DataImp< TYP >::m_tuple [protected, inherited] |
std::string NTuple::_DataImp< TYP >::m_name [protected, inherited] |
std::string NTuple::_DataImp< TYP >::m_index [protected, inherited] |
Check that values are within a certain range while filling.
Definition at line 53 of file NTupleItems.h.
INTupleItem* NTuple::_DataImp< TYP >::m_indexItem [mutable, protected, inherited] |
DataTypeInfo::Type NTuple::_DataImp< TYP >::m_type [protected, inherited] |
TYP NTuple::_DataImp< TYP >::m_def [protected, inherited] |
Range<TYP> NTuple::_DataImp< TYP >::m_range [protected, inherited] |
Check that values are within a certain range while filling.
Definition at line 61 of file NTupleItems.h.
const std::type_info& NTuple::_DataImp< TYP >::m_info [protected, inherited] |
TYP* NTuple::_Data< TYP >::m_buffer [protected, inherited] |
long NTuple::_Matrix< TYP >::m_rows [protected, inherited] |