1 #ifndef GAUDI_NTUPLESVC_NTUPLEITEMS_H 2 #define GAUDI_NTUPLESVC_NTUPLEITEMS_H 1 5 #define ALLOW_ALL_TYPES 80 , m_name(
std::move( name ) )
81 , m_index(
std::move( index ) )
82 , m_def(
std::move( def ) )
83 , m_range(
std::move( low ),
std::move( high ) )
101 if ( m_length > 1 ) {
102 for (
int l = 0;
l < nd - 1;
l++ ) {
106 long* ll = (
long*)m_indexItem->
buffer();
108 }
else if ( nd > 0 ) {
109 len *=
dim( nd - 1 );
117 if ( !m_indexItem ) m_indexItem = m_tuple->
find( m_index );
123 if ( !m_indexItem ) m_indexItem = m_tuple->
find( m_index );
129 long size()
const override {
return m_length *
sizeof( TYP ); }
153 long ndim()
const override {
return 0; }
155 long dim(
long i )
const override {
return ( i == 0 ) ? 1 : 0; }
171 :
_DataImp<TYP>( tup, name, info,
"", 1, min, max, def )
196 TYP min, TYP max, TYP def )
197 :
_DataImp<TYP>( tup, name, typ, index, len, min, max, def )
211 long ndim()
const override {
return 1; }
226 long nrow, TYP min, TYP max, TYP def )
227 :
_DataImp<TYP>( tup, name, typ, index, nrow * ncol, min, max, def )
242 long ndim()
const override {
return 2; }
244 long dim(
long i )
const override 246 return ( this->
hasIndex() ) ? ( ( i == 0 ) ? this->m_rows : this->
m_length / this->m_rows )
247 : ( ( i == 1 ) ? this->
m_length / this->m_rows : this->m_rows );
251 #endif // GAUDI_NTUPLESVC_NTUPLEITEMS_H const ItemRange & range() const override
Access the range if specified.
const std::string & index() const override
Access the index _Column.
_DataImp(const _DataImp &)=delete
Inhibit Copy Constructor.
~_DataImp() override
Standard destructor.
long filled() const override
Number of items filled.
_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.
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Range< TYP > ItemRange
Set type definition to make life more easy easy.
Abstract class describing a matrix column in a N tuple.
static Type ID(const bool)
Access to type information: bool.
Abstract class describing a column in a N tuple.
const ItemRange & range() const override
Access the range if specified.
Concrete class discribing a matrix column in a N tuple.
DataTypeInfo::Type m_type
_Column type
INTupleItem * indexItem() override
Pointer to index column (if present, 0 else)
TYP m_def
Buffer with default value.
Range< TYP > m_range
Check that values are within a certain range while filling.
_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.
const std::string & name() const override
Access _Column name.
_DataImp(INTuple *tup, std::string name, const std::type_info &info, std::string index, long len, TYP low, TYP high, TYP def)
Standard Constructor.
std::string typeName() const override
Get proper type name.
Data provider interface definition.
virtual void * buffer()
Access data buffer.
Range< TYP > ItemRange
Set type definition to make life more easy easy.
long length() const override
Access the buffer length.
NTuple interface class definition.
const std::type_info & typeID() const override
Compiler type ID.
std::string m_index
Check that values are within a certain range while filling.
NTuple interface class definition.
void reset() override
Reset to default.
long size() const override
Size of entire object.
long dim(long i) const override
Access individual dimensions.
long dim(long i) const override
Access individual dimensions.
bool hasIndex() const override
Is the tuple have an index column?
const ItemRange & range() const override
Access the range if specified.
void setDefault(const TYP val) override
Set default value.
void setDefault(const TYP val) override
Compiler type ID.
Concrete class discribing a column-array in a N tuple.
long type() const override
TYP information of the item.
const ItemRange & range() const override
Access the range if specified.
long ndim() const override
Dimension.
Range< TYP > ItemRange
Set type definition to make life more easy easy.
Abstract class describing basic data in an Ntuple.
void release() override
Destruct object.
Range< TYP > ItemRange
Set type definition to make life more easy easy.
const void * buffer() const override
Access data buffer (CONST)
long ndim() const override
Dimension.
long m_length
Entire buffer length.
virtual const void * buffer() const =0
Access data buffer (CONST)
INTuple * m_tuple
Pointer to N tuple.
long size() const override
Size of entire object.
long size() const override
Size of entire object.
Concrete class discribing a column in a N tuple.
const std::type_info & m_info
Item type information.
Concrete class discribing basic data items in an N tuple.
TYP * m_buffer
Pointer to data buffer.
std::string m_name
_Column name
const INTupleItem * indexItem() const override
Pointer to index column (if present, 0 else) (CONST)
INTuple * tuple() override
Access to hosting ntuple.
virtual const INTupleItem * find(const std::string &name) const =0
Find an item row of the Ntuple (CONST)
void setDefault(const TYP val) override
Compiler type ID.
void setType(long t) override
Set the properties of the _Column.
long size() const override
Size of entire object.
long ndim() const override
Dimension.
_ItemImp(INTuple *tup, const std::string &name, const std::type_info &info, TYP min, TYP max, TYP def)
Standard Constructor.
long dim(long i) const override
Access individual dimensions.
INTupleItem * m_indexItem
Pointer to index item.
void setDefault(const TYP val) override
Compiler type ID.
const std::type_info & CTYPE
Abstract class describing a column-array in a N tuple.