Loading [MathJax]/extensions/tex2jax.js
Go to the documentation of this file.
11 #ifndef GAUDI_NTUPLESVC_NTUPLEITEMS_H
12 #define GAUDI_NTUPLESVC_NTUPLEITEMS_H 1
15 #define ALLOW_ALL_TYPES
108 for (
int l = 0;
l < nd - 1;
l++ ) { len *=
dim(
l ); }
112 }
else if ( nd > 0 ) {
113 len *=
dim( nd - 1 );
151 const void*
buffer()
const override {
return this->m_buffer; }
153 virtual void*
buffer() {
return this->m_buffer; }
155 long ndim()
const override {
return 0; }
157 long dim(
long i )
const override {
return ( i == 0 ) ? 1 : 0; }
165 class _ItemImp :
virtual public _DataImp<TYP>,
virtual public _Item<TYP> {
176 void setDefault(
const TYP val )
override { this->m_def = val; }
180 long size()
const override {
return this->m_length *
sizeof( TYP ); }
186 class _ArrayImp :
virtual public _DataImp<TYP>,
virtual public _Array<TYP> {
192 TYP
min, TYP
max, TYP def )
197 void setDefault(
const TYP val )
override { this->m_def = val; }
201 long size()
const override {
return this->m_length *
sizeof( TYP ); }
203 long ndim()
const override {
return 1; }
205 long dim(
long i )
const override {
return ( i != 0 || this->hasIndex() ) ? 0 : this->m_length; }
211 class _MatrixImp :
virtual public _DataImp<TYP>,
virtual public _Matrix<TYP> {
217 long nrow, TYP
min, TYP
max, TYP def )
224 void setDefault(
const TYP val )
override { this->m_def = val; }
228 long size()
const override {
return this->m_length *
sizeof( TYP ); }
230 long ndim()
const override {
return 2; }
232 long dim(
long i )
const override {
233 return ( this->hasIndex() ) ? ( ( i == 0 ) ? this->m_rows : this->m_length / this->m_rows )
234 : ( ( i == 1 ) ? this->m_length / this->m_rows : this->m_rows );
238 #endif // GAUDI_NTUPLESVC_NTUPLEITEMS_H
Range< TYP > ItemRange
Set type definition to make life more easy easy.
const INTupleItem * indexItem() const override
Pointer to index column (if present, 0 else) (CONST)
static Type ID(const bool)
Access to type information: bool.
const ItemRange & range() const override
Access the range if specified.
long length() const override
Access the buffer length.
void setDefault(const TYP val) override
Set default value.
void setDefault(const TYP val) override
Compiler type ID.
long size() const override
Size of entire object.
Range< TYP > ItemRange
Set type definition to make life more easy easy.
const std::type_info & CTYPE
std::string typeName() const override
Get proper type name.
std::string m_index
Check that values are within a certain range while filling.
_ItemImp(INTuple *tup, const std::string &name, const std::type_info &info, TYP min, TYP max, TYP def)
Standard Constructor.
_ArrayImp(INTuple *tup, const std::string &name, const std::type_info &typ, const std::string &index, long len, TYP min, TYP max, TYP def)
Standard Constructor.
long m_length
Entire buffer length.
void release() override
Destruct object.
long size() const override
Size of entire object.
EventIDBase max(const EventIDBase &lhs, const EventIDBase &rhs)
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
virtual const INTupleItem * find(const std::string &name) const =0
Find an item row of the Ntuple (CONST)
const std::string & index() const override
Access the index _Column.
Concrete class discribing basic data items in an N tuple.
void setDefault(const TYP val) override
Compiler type ID.
void setType(long t) override
Set the properties of the _Column.
long ndim() const override
Dimension.
Abstract class describing basic data in an Ntuple.
long dim(long i) const override
Access individual dimensions.
const void * buffer() const override
Access data buffer (CONST)
INTuple * tuple() override
Access to hosting ntuple.
Range< TYP > ItemRange
Set type definition to make life more easy easy.
long size() const override
Size of entire object.
virtual const void * buffer() const =0
Access data buffer (CONST)
DataTypeInfo::Type m_type
_Column type
const ItemRange & range() const override
Access the range if specified.
void setDefault(const TYP val) override
Compiler type ID.
Concrete class discribing a column-array in a N tuple.
~_DataImp() override
Standard destructor.
const std::string & name() const override
Access _Column name.
EventIDBase min(const EventIDBase &lhs, const EventIDBase &rhs)
INTuple * m_tuple
Pointer to N tuple.
const std::type_info & m_info
Item type information.
Range< TYP > ItemRange
Set type definition to make life more easy easy.
_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.
Concrete class discribing a matrix column in a N tuple.
long filled() const override
Number of items filled.
Range< TYP > m_range
Check that values are within a certain range while filling.
const ItemRange & range() const override
Access the range if specified.
INTupleItem * m_indexItem
Pointer to index item.
INTupleItem * indexItem() override
Pointer to index column (if present, 0 else)
long dim(long i) const override
Access individual dimensions.
const ItemRange & range() const override
Access the range if specified.
long ndim() const override
Dimension.
virtual void * buffer()
Access data buffer.
std::string m_name
_Column name
_DataImp(const _DataImp &)=delete
Inhibit Copy Constructor.
long dim(long i) const override
Access individual dimensions.
const std::type_info & typeID() const override
Compiler type ID.
TYP m_def
Buffer with default value.
bool hasIndex() const override
Is the tuple have an index column?
long ndim() const override
Dimension.
void reset() override
Reset to default.
long type() const override
TYP information of the item.
_DataImp(INTuple *tup, std::string name, const std::type_info &info, std::string index, long len, TYP low, TYP high, TYP def)
Standard Constructor.
Concrete class discribing a column in a N tuple.
long size() const override
Size of entire object.