| The Gaudi Framework v28r2p1 (f1a77ff4)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Protected Types | Protected Attributes | Private Member Functions | List of all members
NTuple::_DataImp< TYP > Class Template Reference

Concrete class discribing basic data items in an N tuple. More...

`#include <GaudiKernel/NTupleItems.h>`

Inheritance diagram for NTuple::_DataImp< TYP >:
[legend]
Collaboration diagram for NTuple::_DataImp< TYP >:
[legend]

## Public Types
typedef Range< TYP > | ItemRange
| Set type definition to make life more easy easy. More...
Public Types inherited from NTuple::_Data< TYP >
typedef Range< TYP > | ItemRange
| Set type definition to make life more easy easy. More...

## Public Member Functions
| _DataImp (INTuple *tup, std::string name, const std::type_info &info, std::string index, long len, TYP low, TYP high, TYP def)
| Standard Constructor. More...
| ~_DataImp () override
| Standard destructor. More...
std::string | typeName () const override
| Get proper type name. More...
void | reset () override
| Reset to default. More...
long | filled () const override
| Number of items filled. More...
INTupleItem * | indexItem () override
| Pointer to index column (if present, 0 else) More...
const INTupleItem * | indexItem () const override
| Pointer to index column (if present, 0 else) (CONST) More...
const std::type_info & | typeID () const override
| Compiler type ID. More...
long | size () const override
| Size of entire object. More...
void | release () override
| Destruct object. More...
bool | hasIndex () const override
| Is the tuple have an index column? More...
const std::string & | index () const override
| Access the index _Column. More...
const std::string & | name () const override
| Access _Column name. More...
long | type () const override
| TYP information of the item. More...
void | setType (long t) override
| Set the properties of the _Column. More...
void | setDefault (const TYP val) override
| Set default value. More...
const ItemRange & | range () const override
| Access the range if specified. More...
long | length () const override
| Access the buffer length. More...
const void * | buffer () const override
| Access data buffer (CONST) More...
virtual void * | buffer ()
| Access data buffer. More...
long | ndim () const override
| Dimension. More...
long | dim (long i) const override
| Access individual dimensions. More...
INTuple * | tuple () override
| Access to hosting ntuple. More...
Public Member Functions inherited from INTupleItem
virtual | ~INTupleItem ()=default
| destructor More...

## Protected Types
typedef const std::string & | CSTR
typedef const std::type_info & | CTYPE

## Protected Attributes
long | m_length
| Entire buffer length. More...
INTuple * | m_tuple
| Pointer to N tuple. More...
std::string | m_name
| _Column name More...
std::string | m_index
| Check that values are within a certain range while filling. More...
INTupleItem * | m_indexItem = nullptr
| Pointer to index item. More...
DataTypeInfo::Type | m_type
| _Column type More...
TYP | m_def
| Buffer with default value. More...
Range< TYP > | m_range
| Check that values are within a certain range while filling. More...
const std::type_info & | m_info
| Item type information. More...
Protected Attributes inherited from NTuple::_Data< TYP >
TYP * | m_buffer = nullptr
| Pointer to data buffer. More...

## Private Member Functions
| _DataImp (const _DataImp &)=delete
| Inhibit Copy Constructor. More...

## Additional Inherited Members

## Detailed Description

### template<class TYP>
class NTuple::_DataImp< TYP >

Concrete class discribing basic data items in an N tuple.

Definition at line 31 of file NTupleItems.h.

## Member Typedef Documentation

template<class TYP >

typedef const std::string& NTuple::_DataImp< TYP >::CSTR
| protected

Definition at line 42 of file NTupleItems.h.

template<class TYP >

typedef const std::type_info& NTuple::_DataImp< TYP >::CTYPE
| protected

Definition at line 43 of file NTupleItems.h.

template<class TYP >

typedef Range<TYP> NTuple::_DataImp< TYP >::ItemRange

Set type definition to make life more easy easy.

Definition at line 64 of file NTupleItems.h.

## Constructor & Destructor Documentation

template<class TYP >

NTuple::_DataImp< TYP >::_DataImp | ( | const _DataImp< TYP > & |  | ) |
| private delete

Inhibit Copy Constructor.

template<class TYP >

NTuple::_DataImp< TYP >::_DataImp | ( | INTuple * | tup,
|  | std::string | name,
|  | const std::type_info & | info,
|  | std::string | index,
|  | long | len,
|  | TYP | low,
|  | TYP | high,
|  | TYP | def
| ) |  |
| inline

Standard Constructor.

Definition at line 66 of file NTupleItems.h.

67 : m_length(len), m_tuple(tup), m_name(std::move(name)), m_index(std::move(index)),
68 m_def(std::move(def)), m_range(std::move(low), std::move(high)), m_info(info)
69 {
70 m_type = typeid(TYP) == typeid(void*) ? DataTypeInfo::POINTER : DataTypeInfo::ID(info);
71 this->m_buffer = new TYP[m_length];
72 reset();
73 }
DataTypeInfo::POINTER
Definition: DataTypeInfo.h:28
DataTypeInfo::ID
static Type ID(const bool)
Access to type information: bool.
Definition: DataTypeInfo.h:32
NTuple::_DataImp::m_type
DataTypeInfo::Type m_type
_Column type
Definition: NTupleItems.h:55
NTuple::_DataImp::m_def
TYP m_def
Buffer with default value.
Definition: NTupleItems.h:57
NTuple::_DataImp::m_range
Range< TYP > m_range
Check that values are within a certain range while filling.
Definition: NTupleItems.h:59
NTuple::_DataImp::m_index
std::string m_index
Check that values are within a certain range while filling.
Definition: NTupleItems.h:51
NTuple::_DataImp::reset
void reset() override
Reset to default.
Definition: NTupleItems.h:83
std::move
T move(T...args)
NTuple::_DataImp::m_length
long m_length
Entire buffer length.
Definition: NTupleItems.h:45
NTuple::_DataImp::m_tuple
INTuple * m_tuple
Pointer to N tuple.
Definition: NTupleItems.h:47
NTuple::_DataImp::m_info
const std::type_info & m_info
Item type information.
Definition: NTupleItems.h:61
NTuple::_Data::m_buffer
TYP * m_buffer
Pointer to data buffer.
Definition: NTuple.h:114
NTuple::_DataImp::m_name
std::string m_name
_Column name
Definition: NTupleItems.h:49
template<class TYP >

NTuple::_DataImp< TYP >::~_DataImp | ( |  | ) |
| inline override

Standard destructor.

Definition at line 75 of file NTupleItems.h.

75 {
76 delete [] this->m_buffer;
77 }
NTuple::_Data::m_buffer
TYP * m_buffer
Pointer to data buffer.
Definition: NTuple.h:114

## Member Function Documentation

template<class TYP >

const void* NTuple::_DataImp< TYP >::buffer | ( |  | ) | const
| inline override virtual

Access data buffer (CONST)

Implements INTupleItem.

Definition at line 137 of file NTupleItems.h.

137 { return this->m_buffer; }
NTuple::_Data::m_buffer
TYP * m_buffer
Pointer to data buffer.
Definition: NTuple.h:114
template<class TYP >

virtual void* NTuple::_DataImp< TYP >::buffer | ( |  | ) |
| inline virtual

Access data buffer.

Definition at line 139 of file NTupleItems.h.

139 { return this->m_buffer; }
NTuple::_Data::m_buffer
TYP * m_buffer
Pointer to data buffer.
Definition: NTuple.h:114
template<class TYP >

long NTuple::_DataImp< TYP >::dim | ( | long | i | ) | const
| inline override virtual

Access individual dimensions.

Implements INTupleItem.

Reimplemented in NTuple::_MatrixImp< TYP >, and NTuple::_ArrayImp< TYP >.

Definition at line 143 of file NTupleItems.h.

143 { return (i==0) ? 1 : 0; }
template<class TYP >

long NTuple::_DataImp< TYP >::filled | ( |  | ) | const
| inline override virtual

Number of items filled.

Implements INTupleItem.

Definition at line 87 of file NTupleItems.h.

87 {
88 int len = 1;
89 int nd = ndim();
90 if ( m_length > 1 ) {
91 for ( int l = 0; l < nd-1; l++ ) {
92 len *= dim(l);
93 }
94 if ( indexItem() ) {
95 long *ll = (long*)m_indexItem->buffer();
96 len *= *ll;
97 }
98 else if ( nd > 0 ) {
99 len *= dim(nd-1);
100 }
101 }
102 return len;
103 }
NTuple::_DataImp::indexItem
INTupleItem * indexItem() override
Pointer to index column (if present, 0 else)
Definition: NTupleItems.h:105
NTuple::_DataImp::dim
long dim(long i) const override
Access individual dimensions.
Definition: NTupleItems.h:143
NTuple::_DataImp::ndim
long ndim() const override
Dimension.
Definition: NTupleItems.h:141
NTuple::_DataImp::m_length
long m_length
Entire buffer length.
Definition: NTupleItems.h:45
gaudirun.l
dictionary l
Definition: gaudirun.py:421
INTupleItem::buffer
virtual const void * buffer() const =0
Access data buffer (CONST)
NTuple::_DataImp::m_indexItem
INTupleItem * m_indexItem
Pointer to index item.
Definition: NTupleItems.h:53
template<class TYP >

bool NTuple::_DataImp< TYP >::hasIndex | ( |  | ) | const
| inline override virtual

Is the tuple have an index column?

Implements INTupleItem.

Definition at line 121 of file NTupleItems.h.

121 { return m_index.length()>0; }
NTuple::_DataImp::m_index
std::string m_index
Check that values are within a certain range while filling.
Definition: NTupleItems.h:51
std::string::length
T length(T...args)
template<class TYP >

const std::string& NTuple::_DataImp< TYP >::index | ( |  | ) | const
| inline override virtual

Access the index _Column.

Implements INTupleItem.

Definition at line 123 of file NTupleItems.h.

123 { return m_index; }
NTuple::_DataImp::m_index
std::string m_index
Check that values are within a certain range while filling.
Definition: NTupleItems.h:51
template<class TYP >

INTupleItem* NTuple::_DataImp< TYP >::indexItem | ( |  | ) |
| inline override virtual

Pointer to index column (if present, 0 else)

Implements INTupleItem.

Definition at line 105 of file NTupleItems.h.

105 {
106 if ( !m_indexItem ) m_indexItem = m_tuple->find(m_index);
107 return m_indexItem;
108 }
NTuple::_DataImp::m_index
std::string m_index
Check that values are within a certain range while filling.
Definition: NTupleItems.h:51
NTuple::_DataImp::m_tuple
INTuple * m_tuple
Pointer to N tuple.
Definition: NTupleItems.h:47
INTuple::find
virtual const INTupleItem * find(const std::string &name) const =0
Find an item row of the Ntuple (CONST)
NTuple::_DataImp::m_indexItem
INTupleItem * m_indexItem
Pointer to index item.
Definition: NTupleItems.h:53
template<class TYP >

const INTupleItem* NTuple::_DataImp< TYP >::indexItem | ( |  | ) | const
| inline override virtual

Pointer to index column (if present, 0 else) (CONST)

Implements INTupleItem.

Definition at line 110 of file NTupleItems.h.

110 {
111 if ( !m_indexItem ) m_indexItem = m_tuple->find(m_index);
112 return m_indexItem;
113 }
NTuple::_DataImp::m_index
std::string m_index
Check that values are within a certain range while filling.
Definition: NTupleItems.h:51
NTuple::_DataImp::m_tuple
INTuple * m_tuple
Pointer to N tuple.
Definition: NTupleItems.h:47
INTuple::find
virtual const INTupleItem * find(const std::string &name) const =0
Find an item row of the Ntuple (CONST)
NTuple::_DataImp::m_indexItem
INTupleItem * m_indexItem
Pointer to index item.
Definition: NTupleItems.h:53
template<class TYP >

long NTuple::_DataImp< TYP >::length | ( |  | ) | const
| inline override virtual

Access the buffer length.

Implements INTupleItem.

Definition at line 135 of file NTupleItems.h.

135 { return m_length; }
NTuple::_DataImp::m_length
long m_length
Entire buffer length.
Definition: NTupleItems.h:45
template<class TYP >

const std::string& NTuple::_DataImp< TYP >::name | ( |  | ) | const
| inline override virtual

Access _Column name.

Implements INTupleItem.

Definition at line 125 of file NTupleItems.h.

125 { return m_name; }
NTuple::_DataImp::m_name
std::string m_name
_Column name
Definition: NTupleItems.h:49
template<class TYP >

long NTuple::_DataImp< TYP >::ndim | ( |  | ) | const
| inline override virtual

Dimension.

Implements INTupleItem.

Reimplemented in NTuple::_MatrixImp< TYP >, and NTuple::_ArrayImp< TYP >.

Definition at line 141 of file NTupleItems.h.

141 { return 0; }
template<class TYP >

const ItemRange& NTuple::_DataImp< TYP >::range | ( |  | ) | const
| inline override virtual

Access the range if specified.

Implements NTuple::_Data< TYP >.

Reimplemented in NTuple::_MatrixImp< TYP >, NTuple::_ArrayImp< TYP >, and NTuple::_ItemImp< TYP >.

Definition at line 133 of file NTupleItems.h.

133 { return m_range; }
NTuple::_DataImp::m_range
Range< TYP > m_range
Check that values are within a certain range while filling.
Definition: NTupleItems.h:59
template<class TYP >

void NTuple::_DataImp< TYP >::release | ( |  | ) |
| inline override virtual

Destruct object.

Implements INTupleItem.

Definition at line 119 of file NTupleItems.h.

119 { delete this; }
template<class TYP >

void NTuple::_DataImp< TYP >::reset | ( |  | ) |
| inline override virtual

Reset to default.

Implements INTupleItem.

Definition at line 83 of file NTupleItems.h.

83 {
84 std::fill_n(this->m_buffer, m_length, m_def );
85 }
NTuple::_DataImp::m_def
TYP m_def
Buffer with default value.
Definition: NTupleItems.h:57
NTuple::_DataImp::m_length
long m_length
Entire buffer length.
Definition: NTupleItems.h:45
std::fill_n
T fill_n(T...args)
NTuple::_Data::m_buffer
TYP * m_buffer
Pointer to data buffer.
Definition: NTuple.h:114
template<class TYP >

void NTuple::_DataImp< TYP >::setDefault | ( | const TYP | val | ) |
| inline override virtual

Set default value.

Implements NTuple::_Data< TYP >.

Reimplemented in NTuple::_MatrixImp< TYP >, NTuple::_ArrayImp< TYP >, and NTuple::_ItemImp< TYP >.

Definition at line 131 of file NTupleItems.h.

131 { m_def = val; }
NTuple::_DataImp::m_def
TYP m_def
Buffer with default value.
Definition: NTupleItems.h:57
template<class TYP >

void NTuple::_DataImp< TYP >::setType | ( | long | t | ) |
| inline override virtual

Set the properties of the _Column.

Implements INTupleItem.

Definition at line 129 of file NTupleItems.h.

129 { m_type=DataTypeInfo::Type(t); }
NTuple::_DataImp::m_type
DataTypeInfo::Type m_type
_Column type
Definition: NTupleItems.h:55
DataTypeInfo::Type
Type
Definition: DataTypeInfo.h:22
template<class TYP >

long NTuple::_DataImp< TYP >::size | ( |  | ) | const
| inline override virtual

Size of entire object.

Implements INTupleItem.

Reimplemented in NTuple::_MatrixImp< TYP >, NTuple::_ArrayImp< TYP >, and NTuple::_ItemImp< TYP >.

Definition at line 117 of file NTupleItems.h.

117 { return m_length*sizeof(TYP); }
NTuple::_DataImp::m_length
long m_length
Entire buffer length.
Definition: NTupleItems.h:45
template<class TYP >

INTuple* NTuple::_DataImp< TYP >::tuple | ( |  | ) |
| inline override virtual

Access to hosting ntuple.

Implements INTupleItem.

Definition at line 145 of file NTupleItems.h.

145 { return m_tuple; }
NTuple::_DataImp::m_tuple
INTuple * m_tuple
Pointer to N tuple.
Definition: NTupleItems.h:47
template<class TYP >

long NTuple::_DataImp< TYP >::type | ( |  | ) | const
| inline override virtual

TYP information of the item.

Implements INTupleItem.

Definition at line 127 of file NTupleItems.h.

127 { return m_type; }
NTuple::_DataImp::m_type
DataTypeInfo::Type m_type
_Column type
Definition: NTupleItems.h:55
template<class TYP >

const std::type_info& NTuple::_DataImp< TYP >::typeID | ( |  | ) | const
| inline override virtual

Compiler type ID.

Implements INTupleItem.

Definition at line 115 of file NTupleItems.h.

115 { return m_info;}
NTuple::_DataImp::m_info
const std::type_info & m_info
Item type information.
Definition: NTupleItems.h:61
template<class TYP >

std::string NTuple::_DataImp< TYP >::typeName | ( |  | ) | const
| inline override virtual

Get proper type name.

Implements INTupleItem.

Definition at line 79 of file NTupleItems.h.

79 {
80 return System::typeinfoName( this->typeID() );
81 }
System::typeinfoName
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:299
NTuple::_DataImp::typeID
const std::type_info & typeID() const override
Compiler type ID.
Definition: NTupleItems.h:115

## Member Data Documentation

template<class TYP >

TYP NTuple::_DataImp< TYP >::m_def
| protected

Buffer with default value.

Definition at line 57 of file NTupleItems.h.

template<class TYP >

std::string NTuple::_DataImp< TYP >::m_index
| protected

Check that values are within a certain range while filling.

Definition at line 51 of file NTupleItems.h.

template<class TYP >

INTupleItem* NTuple::_DataImp< TYP >::m_indexItem = nullptr
| mutable protected

Pointer to index item.

Definition at line 53 of file NTupleItems.h.

template<class TYP >

const std::type_info& NTuple::_DataImp< TYP >::m_info
| protected

Item type information.

Definition at line 61 of file NTupleItems.h.

template<class TYP >

long NTuple::_DataImp< TYP >::m_length
| protected

Entire buffer length.

Definition at line 45 of file NTupleItems.h.

template<class TYP >

std::string NTuple::_DataImp< TYP >::m_name
| protected

_Column name

Definition at line 49 of file NTupleItems.h.

template<class TYP >

Range<TYP> NTuple::_DataImp< TYP >::m_range
| protected

Check that values are within a certain range while filling.

Definition at line 59 of file NTupleItems.h.

template<class TYP >

INTuple* NTuple::_DataImp< TYP >::m_tuple
| protected

Pointer to N tuple.

Definition at line 47 of file NTupleItems.h.

template<class TYP >

DataTypeInfo::Type NTuple::_DataImp< TYP >::m_type
| protected

_Column type

Definition at line 55 of file NTupleItems.h.

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

- GaudiKernel/GaudiKernel/NTupleItems.h