Logo ROOT   6.10/09
Reference Guide
TTable.h
Go to the documentation of this file.
1 // @(#)root/table:$Id$
2 // Author: Valery Fine(fine@mail.cern.ch) 03/07/98
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TTable
13 #define ROOT_TTable
14 
15 //////////////////////////////////////////////////////////////////////////
16 // //
17 // TTable //
18 // //
19 // It is a base class to create a "wrapper" class //
20 // holding the plain C-structure array //
21 // (1 element of the structure per element) //
22 // //
23 //////////////////////////////////////////////////////////////////////////
24 
25 #ifdef __CINT__
26 #pragma Ccomment on
27 #endif
28 
29 #include "Ttypes.h"
30 #include "TDataSet.h"
31 #include "tableDescriptor.h"
32 #ifndef ROOT_TCut
33 # include "TCut.h"
34 #endif
35 
36 #ifndef __CINT__
37 # include <string.h>
38 # include <assert.h>
39 #endif
40 
41 #include <vector>
42 
43 class TTableDescriptor;
44 class TH1;
45 class TTableMap;
46 typedef TTableMap* Ptr_t;
47 
48 class TTable : public TDataSet {
49  friend class TDataSet;
50  friend class St_XDFFile;
51 protected:
52  Long_t fSize; // Size of the one element (row) of the table
53 
54 protected:
55 
56  Int_t fN; //Number of array elements
57  Char_t *fTable; // Array of (fN*fSize) longs
58  Long_t fMaxIndex; // The used capacity of this array
59 
60  Bool_t BoundsOk(const char *where, Int_t at) const;
61  Bool_t OutOfBoundsError(const char *where, Int_t i) const;
62 
63  void CopyStruct(Char_t *dest, const Char_t *src);
64  Char_t *Create();
65  virtual void Clear(Option_t *opt="");
66  virtual void Delete(Option_t *opt="");
67  virtual Bool_t EntryLoop(const Char_t *exprFileName,Int_t &action, TObject *obj, Int_t nentries=1000000000, Int_t firstentry=0, Option_t *option="");
68  Int_t SetfN(Long_t len);
69  void SetTablePointer(void *table);
70  void SetUsedRows(Int_t n);
71  virtual void SetType(const char *const type);
72  void StreamerHeader(TBuffer &b,Version_t version=3);
73  void StreamerTable(TBuffer &b,Version_t version=3);
74  virtual TTableDescriptor *GetDescriptorPointer() const;
75  virtual void SetDescriptorPointer(TTableDescriptor *list);
76 
77  void ReAlloc(Int_t newsize);
78  static const char *TableDictionary(const char *className,const char *structName,TTableDescriptor *&ColDescriptors);
79 
80 public:
81 
85  enum ETableBits {
86  kIsNotOwn = BIT(23) // if the TTable wrapper doesn't own the STAF table
87  // As result of the Update() method for example
88  };
89  static const char *fgTypeName[kEndColumnType];
90  TTable(const char *name=0, Int_t size=0);
91  TTable(const char *name, Int_t n,Int_t size);
92  TTable(const char *name, Int_t n, Char_t *array,Int_t size);
93  TTable(const char *name, const char *type, Int_t n, Char_t *array, Int_t size);
94  TTable(const TTable &table);
95  TTable &operator=(const TTable &rhs);
96  virtual ~TTable();
97 
98  virtual void Adopt(Int_t n, void *array);
99  virtual Int_t AddAt(const void *c);
100  virtual void AddAt(const void *c, Int_t i);
101  virtual void AddAt(TDataSet *dataset,Int_t idx=0);
102  virtual Long_t AppendRows(const void *row, UInt_t nRows);
103  virtual void AsString(void *buf, EColumnType type, Int_t width, std::ostream &out) const;
104  const void *At(Int_t i) const;
105  virtual void Browse(TBrowser *b);
106  virtual void CopySet(TTable &array);
107  Int_t CopyRows(const TTable *srcTable,Long_t srcRow=0, Long_t dstRow=0, Long_t nRows=0, Bool_t expand=kFALSE);
108  virtual void DeleteRows(Long_t indx,UInt_t nRows=1);
109  virtual void Draw(Option_t *opt);
110  virtual TH1 *Draw(TCut varexp, TCut selection, Option_t *option=""
111  ,Int_t nentries=1000000000, Int_t firstentry=0);
112  virtual TH1 *Draw(const char *varexp, const char *selection, Option_t *option=""
113  ,Int_t nentries=1000000000, Int_t firstentry=0); // *MENU*
114  void *GetArray() const ;
115  virtual TClass *GetRowClass() const ;
116  Int_t GetSize() const { return fN; }
117  virtual Long_t GetNRows() const;
118  virtual Long_t GetRowSize() const;
119  virtual Long_t GetTableSize() const;
120  virtual TTableDescriptor *GetTableDescriptors() const;
121  virtual TTableDescriptor *GetRowDescriptors() const;
122  virtual const Char_t *GetType() const;
123  virtual void Fit(const char *formula ,const char *varexp, const char *selection="",Option_t *option="" ,Option_t *goption=""
124  ,Int_t nentries=1000000000, Int_t firstentry=0); // *MENU*
125 
126  virtual Long_t HasData() const { return 1; }
127  virtual Long_t InsertRows(const void *rows, Long_t indx, UInt_t nRows=1);
128  virtual Bool_t IsFolder() const;
129  Int_t NaN();
130  static TTable *New(const Char_t *name, const Char_t *type, void *array, UInt_t size);
131  virtual Char_t *MakeExpression(const Char_t *expressions[],Int_t nExpressions);
132  virtual Char_t *Print(Char_t *buf,Int_t n) const ;
133  virtual void Print(Option_t *opt="") const;
134  virtual const Char_t *Print(Int_t row, Int_t rownumber=10,
135  const Char_t *colfirst="", const Char_t *collast="") const; // *MENU*
136  virtual void PrintContents(Option_t *opt="") const;
137  virtual const Char_t *PrintHeader() const; // *MENU*
138  virtual void Project(const char *hname, const char *varexp, const char *selection="", Option_t *option=""
139  ,Int_t nentries=1000000000, Int_t firstentry=0);
140 
141  virtual Int_t Purge(Option_t *opt="");
142 
143  void *ReAllocate(Int_t newsize);
144  void *ReAllocate();
145  virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
146  virtual void Set(Int_t n);
147  virtual void Set(Int_t n, Char_t *array);
148  virtual void SetNRows(Int_t n);
149  virtual void Reset(Int_t c=0);
150  virtual void ResetMap(Bool_t wipe=kTRUE);
151  virtual void Update();
152  virtual void Update(TDataSet *set,UInt_t opt=0);
153  void *operator[](Int_t i);
154  const void *operator[](Int_t i) const;
155 
156 
157  // ---- Table descriptor service ------
158 
159  virtual Int_t GetColumnIndex(const Char_t *columnName) const;
160  virtual const Char_t *GetColumnName(Int_t columnIndex) const;
161  virtual const UInt_t *GetIndexArray(Int_t columnIndex) const;
162  virtual UInt_t GetNumberOfColumns() const;
163  virtual UInt_t GetOffset(Int_t columnIndex) const;
164  virtual Int_t GetOffset(const Char_t *columnName=0) const;
165  virtual UInt_t GetColumnSize(Int_t columnIndex) const;
166  virtual Int_t GetColumnSize(const Char_t *columnName=0) const;
167  virtual UInt_t GetTypeSize(Int_t columnIndex) const;
168  virtual Int_t GetTypeSize(const Char_t *columnName=0) const ;
169  virtual UInt_t GetDimensions(Int_t columnIndex) const;
170  virtual Int_t GetDimensions(const Char_t *columnName=0) const ;
171  virtual EColumnType GetColumnType(Int_t columnIndex) const;
172  virtual EColumnType GetColumnType(const Char_t *columnName=0) const;
173  virtual const Char_t *GetColumnComment(Int_t columnIndex) const;
174 
175  static const char *GetTypeName(EColumnType type);
176  static EColumnType GetTypeId(const char *typeName);
177 
178  // Table index iterator:
179  class iterator {
180  public:
181  typedef std::vector<Long_t>::iterator vec_iterator;
182  typedef std::vector<Long_t>::const_iterator vec_const_iterator;
183  private:
186  vec_iterator fCurrentRow;
187  public:
188  iterator(): fRowSize(0), fThisTable(0) {;}
189  iterator(const TTable &table, vec_iterator &arowPtr) :
190  fRowSize(table.GetRowSize()), fThisTable(&table), fCurrentRow(arowPtr) {;}
191  iterator(const TTable &table, vec_const_iterator &arowPtr) :
192  fRowSize(table.GetRowSize()), fThisTable(&table),
193  fCurrentRow(*(std::vector<Long_t>::iterator *)(void *)&arowPtr) {;}
194  //fCurrentRow(* const_cast<std::vector<Long_t>::iterator *>(&arowPtr) ) {;}
195  iterator(const iterator& iter) : fRowSize (iter.fRowSize), fThisTable(iter.fThisTable),fCurrentRow(iter.fCurrentRow){}
196  iterator &operator=(const iterator& iter) { fRowSize = iter.fRowSize; fThisTable = iter.fThisTable; fCurrentRow=iter.fCurrentRow; return *this; }
197  void operator++() { ++fCurrentRow; }
198  void operator++(int) { fCurrentRow++; }
199  void operator--() { --fCurrentRow; }
200  void operator--(int) { fCurrentRow--; }
201  iterator operator+(Int_t idx) { std::vector<Long_t>::iterator addition = fCurrentRow+idx; return iterator(*fThisTable,addition); }
202  iterator operator-(Int_t idx) { std::vector<Long_t>::iterator subtraction = fCurrentRow-idx; return iterator(*fThisTable,subtraction); }
203  void operator+=(Int_t idx) { fCurrentRow+=idx; }
204  void operator-=(Int_t idx) { fCurrentRow-=idx; }
205  void *rowPtr() const { return (void *)(((const char *)fThisTable->GetArray()) + (*fCurrentRow)*fRowSize ); }
206  operator void *() const { return rowPtr(); }
207  Int_t operator-(const iterator &it) const { return (*fCurrentRow)-(*(it.fCurrentRow)); }
208  Long_t operator *() const { return *fCurrentRow; }
209  Bool_t operator==(const iterator &t) const { return ( (fCurrentRow == t.fCurrentRow) && (fThisTable == t.fThisTable) ); }
210  Bool_t operator!=(const iterator &t) const { return !operator==(t); }
211 
212  const TTable &Table() const { return *fThisTable;}
213  const Long_t &RowSize() const { return fRowSize;}
214 #ifndef __CINT__
215  const std::vector<Long_t>::iterator &Row() const { return fCurrentRow;}
216 #endif
217  };
218 
219 #ifndef __CINT__
220  // pointer iterator
221  // This create an iterator to iterate over all table column of the
222  // type provided.
223  // For example" piterator(table,kPtr) is to iterate over
224  // all cells of (TTableMap *) type
225 
226  class piterator {
227  private:
228  std::vector<ULong_t> fPtrs;
234 
235  protected:
236  void **column() {return fCurrentColPtr = (void **)(fCurrentRowPtr + fPtrs[fCurrentColIndex]);}
237 
238  public:
239  piterator(const TTable *t=0,EColumnType type=kPtr);
240  piterator(const piterator& iter);
241  void operator=(const piterator& iter);
242 
243  void operator++();
244  void operator++(int);
245  void operator--();
246  void operator--(int);
247 
248 // operator const char *() const;
249  void **operator *();
250 
251  Bool_t operator==(const piterator &t) const;
252  Bool_t operator!=(const piterator &t) const;
253 
254  UInt_t Row() const;
255  UInt_t Column() const;
256 
257  void MakeEnd(UInt_t lastRowIndex);
258  }; // class iterator over pointers
259 
260  piterator pbegin(){ return piterator(this); }
261  piterator pend(){ piterator pLast(this); pLast.MakeEnd(GetNRows()); return pLast; }
262 #endif
263  static const char *TableDictionary() { return 0; };
264  ClassDef(TTable,4) // vector of the C structures
265 };
266 
267 //________________________________________________________________________
268 inline void TTable::AddAt(TDataSet *dataset,Int_t idx)
269 { TDataSet::AddAt(dataset,idx); }
270 
271 //________________________________________________________________________
272 inline Bool_t TTable::BoundsOk(const char *where, Int_t at) const
273 {
274  return (at < 0 || at >= fN)
275  ? OutOfBoundsError(where, at)
276  : kTRUE;
277 }
278 
279 //________________________________________________________________________
280 inline void *TTable::GetArray() const { return (void *)fTable;}
281 
282 //________________________________________________________________________
283 inline void TTable::Print(Option_t *) const { Print((Char_t *)0,Int_t(0)); }
284 
285 //________________________________________________________________________
287 //________________________________________________________________________
289 // ULong_t &operator(){ return GetTable();}
290 
291 //________________________________________________________________________
292 inline void *TTable::operator[](Int_t i)
293 {
294  if (!BoundsOk("TTable::operator[]", i))
295  i = 0;
296  return (void *)(fTable+i*fSize);
297 }
298 
299 //________________________________________________________________________
300 inline const void *TTable::operator[](Int_t i) const
301 {
302  if (!BoundsOk("TTable::operator[]", i))
303  i = 0;
304  return (const void *)(fTable+i*fSize);
305 }
306 
307 //________________________________________________________________________
308 inline void TTable::Draw(Option_t *opt)
309 { Draw(opt, "", "", 1000000000, 0); }
310 
311 #ifndef __CINT__
312  //________________________________________________________________________________________________________________
314  fPtrs (iter.fPtrs),
315  fCurrentRowIndex(iter.fCurrentRowIndex),
316  fCurrentColIndex(iter.fCurrentColIndex),
317  fRowSize(iter.fRowSize),
318  fCurrentRowPtr(iter.fCurrentRowPtr),
319  fCurrentColPtr(iter.fCurrentColPtr)
320  {}
321  //________________________________________________________________________________________________________________
322  inline void TTable::piterator::operator=(const piterator& iter){
323  fPtrs = iter.fPtrs;
326  fRowSize = iter.fRowSize;
329  }
330  //________________________________________________________________________________________________________________
332  {
334  if (fCurrentColIndex >= fPtrs.size()) {
335  fCurrentColIndex = 0;
338  }
339  column();
340  }
341  //________________________________________________________________________________________________________________
343  //________________________________________________________________________________________________________________
345  {
346  if (fCurrentColIndex > 0) {
348  fCurrentColIndex = fPtrs.size()-1;
351  } else {
353  }
354  column();
355  }
356  //________________________________________________________________________________________________________________
358  //________________________________________________________________________________________________________________
359  // inline TTable::piterator::operator const char *() const { return fCurrentColPtr; }
360  //________________________________________________________________________________________________________________
361  inline void **TTable::piterator::operator *() { return fCurrentColPtr; }
362  //________________________________________________________________________________________________________________
364  return (
367 // && (fCurrentRowPtr == t.fCurrentRowPtr )
368 // && (fCurrentColPtr == t.fCurrentColPtr )
369  );
370  }
371  //________________________________________________________________________________________________________________
372  inline Bool_t TTable::piterator::operator!=(const piterator &t) const { return !operator==(t); }
373  //________________________________________________________________________________________________________________
374  inline void TTable::piterator::MakeEnd(UInt_t lastRowIndex){fCurrentColIndex = 0; fCurrentRowIndex = lastRowIndex;}
375  //________________________________________________________________________________________________________________
377  //________________________________________________________________________________________________________________
379 #endif
380 
381 #endif
TTableMap * Ptr_t
Definition: TTable.h:45
virtual void AsString(void *buf, EColumnType type, Int_t width, std::ostream &out) const
AsString represents the value provided via "void *b" with type defined by "name". ...
Definition: TTable.cxx:228
virtual Long_t InsertRows(const void *rows, Long_t indx, UInt_t nRows=1)
void InsertRows(cons void *row, Long_t indx, UInt_t nRows)
Definition: TTable.cxx:1206
ETableBits
Definition: TTable.h:85
UInt_t Row() const
Definition: TTable.h:376
Int_t SetfN(Long_t len)
to be documented
Definition: TTable.cxx:2183
Long_t fSize
Definition: TTable.h:52
void * ReAllocate()
Reallocate this table leaving only (used rows)+1 allocated GetTableSize() = GetNRows() + 1 returns a ...
Definition: TTable.cxx:1225
short Version_t
Definition: RtypesCore.h:61
piterator pbegin()
Definition: TTable.h:260
void SetUsedRows(Int_t n)
Definition: TTable.h:286
virtual Long_t HasData() const
Definition: TTable.h:126
iterator operator-(Int_t idx)
Definition: TTable.h:202
const char Option_t
Definition: RtypesCore.h:62
#define BIT(n)
Definition: Rtypes.h:75
UInt_t fRowSize
Definition: TTable.h:231
iterator(const TTable &table, vec_iterator &arowPtr)
Definition: TTable.h:189
virtual Bool_t IsFolder() const
return Folder flag to be used by TBrowse object The table is a folder if
Definition: TTable.cxx:1460
virtual TClass * GetRowClass() const
to be documented
Definition: TTable.cxx:1378
Int_t GetSize() const
Definition: TTable.h:116
Buffer base class used for serializing objects.
Definition: TBuffer.h:40
virtual const Char_t * PrintHeader() const
Print general table inforamtion.
Definition: TTable.cxx:1624
void StreamerHeader(TBuffer &b, Version_t version=3)
Read "table parameters first".
Definition: TTable.cxx:2144
static const char * TableDictionary()
Definition: TTable.h:263
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
STL namespace.
TTable & operator=(const TTable &rhs)
TTable assignment operator.
Definition: TTable.cxx:1086
virtual const Char_t * GetType() const
Returns the type of the wrapped C-structure kept as the TNamed title.
Definition: TTable.cxx:1448
void operator++()
Definition: TTable.h:197
virtual void Browse(TBrowser *b)
Wrap each table coulumn with TColumnView object to browse.
Definition: TTable.cxx:1297
void ** fCurrentColPtr
Definition: TTable.h:233
virtual TTableDescriptor * GetDescriptorPointer() const
to be documented
Definition: TTable.cxx:2245
virtual Char_t * Print(Char_t *buf, Int_t n) const
Create IDL table defintion (to be used for XDF I/O)
Definition: TTable.cxx:1552
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
Definition: TTable.cxx:1819
void ** operator*()
Definition: TTable.h:361
void operator-=(Int_t idx)
Definition: TTable.h:204
TTable(const char *name=0, Int_t size=0)
Default TTable ctor.
Definition: TTable.cxx:1034
#define ClassDef(name, id)
Definition: Rtypes.h:297
Bool_t operator!=(const piterator &t) const
Definition: TTable.h:372
virtual const UInt_t * GetIndexArray(Int_t columnIndex) const
Definition: TTable.cxx:2431
void operator--()
Definition: TTable.h:199
virtual void SetNRows(Int_t n)
Definition: TTable.h:288
const std::vector< Long_t >::iterator & Row() const
Definition: TTable.h:215
EColumnType
Definition: TTable.h:82
const Long_t & RowSize() const
Definition: TTable.h:213
virtual void Draw(Option_t *opt)
Default Draw method for all objects.
Definition: TTable.h:308
virtual void Set(Int_t n)
Set array size of TTable object to n longs. If n<0 leave array unchanged.
Definition: TTable.cxx:1961
Bool_t OutOfBoundsError(const char *where, Int_t i) const
Generate an out-of-bounds error. Always returns false.
Definition: TTable.cxx:1544
Int_t CopyRows(const TTable *srcTable, Long_t srcRow=0, Long_t dstRow=0, Long_t nRows=0, Bool_t expand=kFALSE)
CopyRows copies nRows from starting from the srcRow of srcTable to the dstRow in this table upto nRow...
Definition: TTable.cxx:331
const TTable * fThisTable
Definition: TTable.h:185
A specialized string object used for TTree selections.
Definition: TCut.h:25
const void * At(Int_t i) const
Returns a pointer to the i-th row of the table.
Definition: TTable.cxx:302
Bool_t operator==(const iterator &t) const
Definition: TTable.h:209
virtual Bool_t EntryLoop(const Char_t *exprFileName, Int_t &action, TObject *obj, Int_t nentries=1000000000, Int_t firstentry=0, Option_t *option="")
EntryLoop creates a CINT bytecode to evaluate the given expressions for all table rows in loop and fi...
Definition: TTable.cxx:788
void * operator[](Int_t i)
Definition: TTable.h:292
void operator+=(Int_t idx)
Definition: TTable.h:203
Using a TBrowser one can browse all ROOT objects.
Definition: TBrowser.h:37
virtual TTableDescriptor * GetRowDescriptors() const
to be documented
Definition: TTable.cxx:2231
friend class St_XDFFile
Definition: TTable.h:50
virtual void SetType(const char *const type)
to be documented
Definition: TTable.cxx:1982
piterator pend()
Definition: TTable.h:261
virtual const Char_t * GetColumnComment(Int_t columnIndex) const
Get a comment from the table descriptor.
Definition: TTable.cxx:1169
virtual Int_t AddAt(const void *c)
Add the "row" at the GetNRows() position, and reallocate the table if neccesary, and return the row i...
Definition: TTable.cxx:1125
virtual Long_t AppendRows(const void *row, UInt_t nRows)
Append nRows row of the array "row" to the table return.
Definition: TTable.cxx:1181
virtual UInt_t GetDimensions(Int_t columnIndex) const
Definition: TTable.cxx:2443
virtual void Fit(const char *formula, const char *varexp, const char *selection="", Option_t *option="", Option_t *goption="", Int_t nentries=1000000000, Int_t firstentry=0)
-*-*-*-*-*-*-*-*Fit a projected item(s) from a TTable-*-*-*-*-*-*-*-*-* *-* =========================...
Definition: TTable.cxx:1426
unsigned int UInt_t
Definition: RtypesCore.h:42
Char_t * fTable
Definition: TTable.h:57
void ** column()
Definition: TTable.h:236
virtual const Char_t * GetColumnName(Int_t columnIndex) const
Definition: TTable.cxx:2430
virtual void Update()
to be documented
Definition: TTable.cxx:2386
Int_t NaN()
return the total number of the NaN for float/double cells of this table Thanks Victor Perevoztchikov ...
Definition: TTable.cxx:1478
virtual void ResetMap(Bool_t wipe=kTRUE)
Clean all filled columns with the pointers to TTableMap if any wipe = kTRUE - delete all object the M...
Definition: TTable.cxx:2096
virtual void DeleteRows(Long_t indx, UInt_t nRows=1)
Delete one or several rows from the table.
Definition: TTable.cxx:363
std::vector< ULong_t > fPtrs
Definition: TTable.h:228
Long_t operator*() const
Definition: TTable.h:208
void operator=(const piterator &iter)
Definition: TTable.h:322
The ROOT global object gROOT contains a list of all defined classes.
Definition: TClass.h:71
void * GetArray() const
Definition: TTable.h:280
iterator(const iterator &iter)
Definition: TTable.h:195
const Bool_t kFALSE
Definition: RtypesCore.h:92
Int_t operator-(const iterator &it) const
Definition: TTable.h:207
virtual ~TTable()
Delete TTable object.
Definition: TTable.cxx:1101
std::vector< Long_t >::iterator vec_iterator
Definition: TTable.h:181
long Long_t
Definition: RtypesCore.h:50
iterator(const TTable &table, vec_const_iterator &arowPtr)
Definition: TTable.h:191
virtual UInt_t GetColumnSize(Int_t columnIndex) const
Definition: TTable.cxx:2437
void StreamerTable(TBuffer &b, Version_t version=3)
Stream an object of class TTable.
Definition: TTable.cxx:2126
iterator & operator=(const iterator &iter)
Definition: TTable.h:196
virtual TTableDescriptor * GetTableDescriptors() const
protected: create a new TTableDescriptor descriptor for this table
Definition: TTable.cxx:213
Bool_t BoundsOk(const char *where, Int_t at) const
Definition: TTable.h:272
vec_iterator fCurrentRow
Definition: TTable.h:186
virtual void AddAt(TDataSet *dataset, Int_t idx=0)
Add TDataSet object at the "idx" position in ds or at the end of the dataset The final result is defi...
Definition: TDataSet.cxx:235
int type
Definition: TGX11.cxx:120
int nentries
Definition: THbookFile.cxx:89
void SetTablePointer(void *table)
to be documented
Definition: TTable.cxx:1973
void CopyStruct(Char_t *dest, const Char_t *src)
Copy the C-structure src into the new location the length of the strucutre is defined by this class d...
Definition: TTable.cxx:1154
The TH1 histogram class.
Definition: TH1.h:56
static EColumnType GetTypeId(const char *typeName)
return the Id of the C basic type by given name return kNAN if the name provided fits no knwn basic n...
Definition: TTable.cxx:291
static TTable * New(const Char_t *name, const Char_t *type, void *array, UInt_t size)
This static method creates a new TTable object if provided.
Definition: TTable.cxx:1519
virtual Int_t GetColumnIndex(const Char_t *columnName) const
Definition: TTable.cxx:2429
UInt_t Column() const
Definition: TTable.h:378
Definition: TTable.h:48
virtual Long_t GetTableSize() const
Returns the number of the allocated rows.
Definition: TTable.cxx:1405
const Char_t * fCurrentRowPtr
Definition: TTable.h:232
Mother of all ROOT objects.
Definition: TObject.h:37
char Char_t
Definition: RtypesCore.h:29
iterator operator+(Int_t idx)
Definition: TTable.h:201
virtual Char_t * MakeExpression(const Char_t *expressions[], Int_t nExpressions)
Create CINT macro to evaluate the user-provided expresssion Expression may contains: ...
Definition: TTable.cxx:2012
typedef void((*Func_t)())
void operator++()
Definition: TTable.h:331
virtual void PrintContents(Option_t *opt="") const
to be documented
Definition: TTable.cxx:1778
static const char * GetTypeName(EColumnType type)
return table type name
Definition: TTable.cxx:281
virtual void Project(const char *hname, const char *varexp, const char *selection="", Option_t *option="", Int_t nentries=1000000000, Int_t firstentry=0)
-*-*-*-*-*-*-*-*Make a projection of a TTable using selections-*-*-*-*-*-* *-* ======================...
Definition: TTable.cxx:1796
Bool_t operator==(const piterator &t) const
Definition: TTable.h:363
#define dest(otri, vertexptr)
Definition: triangle.c:1040
virtual Long_t GetNRows() const
Returns the number of the used rows for the wrapped table.
Definition: TTable.cxx:1391
Char_t * Create()
Allocate a space for the new table, if any Sleep for a while if space is not available and try again...
Definition: TTable.cxx:1271
void MakeEnd(UInt_t lastRowIndex)
Definition: TTable.h:374
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
Definition: TRolke.cxx:630
void operator++(int)
Definition: TTable.h:198
virtual UInt_t GetTypeSize(Int_t columnIndex) const
Definition: TTable.cxx:2440
Bool_t operator!=(const iterator &t) const
Definition: TTable.h:210
virtual Long_t GetRowSize() const
Returns the size (in bytes) of one table row.
Definition: TTable.cxx:1398
Int_t fN
Definition: TTable.h:56
Long_t fRowSize
Definition: TTable.h:184
virtual void SetDescriptorPointer(TTableDescriptor *list)
to be documented
Definition: TTable.cxx:2254
piterator(const TTable *t=0, EColumnType type=kPtr)
to be documented
Definition: TTable.cxx:2453
virtual void Delete(Option_t *opt="")
Delete the internal array and free the memory it occupied if this object did own this array...
Definition: TTable.cxx:1369
virtual EColumnType GetColumnType(Int_t columnIndex) const
Definition: TTable.cxx:2446
void operator--(int)
Definition: TTable.h:200
void operator--()
Definition: TTable.h:344
virtual void Clear(Option_t *opt="")
Deletes the internal array of this class if this object does own its internal table.
Definition: TTable.cxx:1345
static const char * fgTypeName[kEndColumnType]
Definition: TTable.h:89
UInt_t fCurrentRowIndex
Definition: TTable.h:229
const TTable & Table() const
Definition: TTable.h:212
const Bool_t kTRUE
Definition: RtypesCore.h:91
virtual void Adopt(Int_t n, void *array)
Adopt array arr into TTable, i.e.
Definition: TTable.cxx:1110
const Int_t n
Definition: legend1.C:16
virtual UInt_t GetNumberOfColumns() const
Definition: TTable.cxx:2432
Long_t fMaxIndex
Definition: TTable.h:58
virtual void CopySet(TTable &array)
to be documented
Definition: TTable.cxx:1161
void * rowPtr() const
Definition: TTable.h:205
virtual UInt_t GetOffset(Int_t columnIndex) const
Definition: TTable.cxx:2434
void ReAlloc(Int_t newsize)
The table is reallocated if it is an owner of the internal array.
Definition: TTable.cxx:1246
std::vector< Long_t >::const_iterator vec_const_iterator
Definition: TTable.h:182
virtual void Reset(Int_t c=0)
Fill the entire table with byte "c" ; / c=0 "be default".
Definition: TTable.cxx:2081
virtual Int_t Purge(Option_t *opt="")
Shrink the table to free the unused but still allocated rows.
Definition: TTable.cxx:1810
UInt_t fCurrentColIndex
Definition: TTable.h:230