12 #ifndef ROOT_TTableDescriptor
13 #define ROOT_TTableDescriptor
16 #include "tableDescriptor.h"
34 static TString fgCommentsName;
35 virtual void Init(TClass *classPtr);
44 virtual Int_t
AddAt(
const void *c);
45 virtual void AddAt(
const void *c, Int_t i);
51 const Char_t *ColumnName(Int_t columnIndex)
const;
53 UInt_t NumberOfColumns()
const;
54 const UInt_t *IndexArray(Int_t columnIndex)
const;
55 UInt_t Offset(Int_t columnIndex)
const;
56 Int_t Offset(
const Char_t *columnName=0)
const;
57 UInt_t ColumnSize(Int_t columnIndex)
const;
58 Int_t ColumnSize(
const Char_t *columnName=0)
const;
59 UInt_t TypeSize(Int_t columnIndex)
const;
60 Int_t TypeSize(
const Char_t *columnName=0)
const;
61 UInt_t Dimensions(Int_t columnIndex)
const;
62 Int_t Dimensions(
const Char_t *columnName=0)
const;
63 TTable::EColumnType ColumnType(Int_t columnIndex)
const;
64 TTable::EColumnType ColumnType(
const Char_t *columnName=0)
const;
65 TClass *RowClass()
const;
66 void SetOffset(UInt_t offset,Int_t
column);
67 void SetSize(UInt_t size,Int_t column);
68 void SetTypeSize(UInt_t size,Int_t column);
69 void SetDimensions(UInt_t dim,Int_t column);
71 void SetColumnType(TTable::EColumnType type,Int_t column);
93 static const char *TableDictionary();
100 inline UInt_t TTableDescriptor::Offset(Int_t column)
const {
return ((
tableDescriptor_st *)
At(column))->fOffset; }
101 inline const UInt_t *TTableDescriptor::IndexArray(Int_t column)
const {
return ((
tableDescriptor_st *)
At(column))->fIndexArray;}
102 inline UInt_t TTableDescriptor::NumberOfColumns()
const {
return GetNRows(); }
103 inline UInt_t TTableDescriptor::ColumnSize(Int_t column)
const {
return ((
tableDescriptor_st *)
At(column))->fSize; }
104 inline UInt_t TTableDescriptor::TypeSize(Int_t column)
const {
return ((
tableDescriptor_st *)
At(column))->fTypeSize; }
105 inline UInt_t TTableDescriptor::Dimensions(Int_t column)
const {
return ((
tableDescriptor_st *)
At(column))->fDimensions;}
106 inline TTable::EColumnType TTableDescriptor::ColumnType(Int_t column)
const {
return EColumnType(((
tableDescriptor_st *)
At(column))->fType);}
107 inline TClass *TTableDescriptor::RowClass()
const {
return fRowClass;}
108 inline void TTableDescriptor::SetOffset(UInt_t offset,Int_t column) {((
tableDescriptor_st *)
At(column))->fOffset = offset;}
109 inline void TTableDescriptor::SetSize(UInt_t size,Int_t column) {((
tableDescriptor_st *)
At(column))->fSize = size; }
110 inline void TTableDescriptor::SetTypeSize(UInt_t size,Int_t column) {((
tableDescriptor_st *)
At(column))->fTypeSize = size; }
111 inline void TTableDescriptor::SetDimensions(UInt_t dim,Int_t column) {((
tableDescriptor_st *)
At(column))->fDimensions = dim; }
112 inline void TTableDescriptor::SetColumnType(TTable::EColumnType type,Int_t column) {((
tableDescriptor_st *)
At(column))->fType = type; }
void LearnTable(const TTable *parentTable)
to be documented
virtual void SetDescriptorPointer(TTableDescriptor *list)
set table descriptor
virtual TTableDescriptor * GetDescriptorPointer() const
return column descriptor
virtual Int_t UpdateOffsets(const TTableDescriptor *newDesciptor)
Int_t Sizeof() const
to be documented
TTable(const char *name=0, Int_t size=0)
Default TTable ctor.
Int_t ColumnByName(const Char_t *columnName=0) const
Find the column index but the column name.
virtual void Init(TClass *classPtr)
virtual Int_t AddAt(const void *c)
Append one row pointed by "c" to the descriptor.
virtual void SetType(const char *const type)
to be documented
virtual Long_t GetNRows() const
Returns the number of the used rows for the wrapped table.
static void SetCommentsSetName(const char *name=".comments")
set comments name
static TTableDescriptor * MakeDescriptor(const char *structName)
TString CreateLeafList() const
Create a list of leaf to be useful for TBranch::TBranch ctor.
const void * At(Int_t i) const
Returns a pointer to the i-th row of the table.
virtual ~TTableDescriptor()
class destructor
TDataSet * MakeCommentField(Bool_t createFlag=kTRUE)
Instantiate a comment dataset if any.