StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Friends | List of all members
TTable Class Reference
Inheritance diagram for TTable:
TDataSet St_Bfc St_daq_adc_tb St_daq_cld St_daq_sim_adc_tb St_daq_sim_cld St_dbConfig St_dst_bfc_status St_spline3 St_table_header St_tpc_cl StTab TGenericTable TIndexTable TTableDescriptor

Classes

class  iterator
 
class  piterator
 

Public Types

enum  EColumnType {
  kNAN, kFloat, kInt, kLong,
  kShort, kDouble, kUInt, kULong,
  kUShort, kUChar, kChar, kPtr,
  kBool, kEndColumnType
}
 
enum  ETableBits { kIsNotOwn = BIT(23) }
 
- Public Types inherited from TDataSet
enum  EDataSetPass {
  kContinue, kPrune, kStop, kUp,
  kStruct, kAll, kRefs, kMarked
}
 
enum  ESetBits { kMark = BIT(22), kArray = BIT(20) }
 
enum  EBitOpt { kSet = kTRUE, kReset = kFALSE }
 

Public Member Functions

 TTable (const char *name=0, Int_t size=0)
 Default TTable ctor.
 
 TTable (const char *name, Int_t n, Int_t size)
 Create TTable object and set array size to n longs.
 
 TTable (const char *name, Int_t n, Char_t *array, Int_t size)
 Create TTable object and initialize it with values of array.
 
 TTable (const char *name, const char *type, Int_t n, Char_t *array, Int_t size)
 Create TTable object and initialize it with values of array.
 
 TTable (const TTable &table)
 Copy constructor.
 
TTableoperator= (const TTable &rhs)
 
virtual ~TTable ()
 Delete TTable object.
 
virtual void Adopt (Int_t n, void *array)
 
virtual Int_t AddAt (const void *c)
 
virtual void AddAt (const void *c, Int_t i)
 
virtual void AddAt (TDataSet *dataset, Int_t idx=0)
 
virtual Long_t AppendRows (const void *row, UInt_t nRows)
 
virtual void AsString (void *buf, EColumnType type, Int_t width, std::ostream &out) const
 
const void * At (Int_t i) const
 Returns a pointer to the i-th row of the table.
 
virtual void Browse (TBrowser *b)
 Wrap each table coulumn with TColumnView object to browse.
 
virtual void CopySet (TTable &array)
 to be documented
 
Int_t CopyRows (const TTable *srcTable, Long_t srcRow=0, Long_t dstRow=0, Long_t nRows=0, Bool_t expand=kFALSE)
 
virtual void DeleteRows (Long_t indx, UInt_t nRows=1)
 
virtual void Draw (Option_t *opt)
 
virtual TH1 * Draw (TCut varexp, TCut selection, Option_t *option="", Int_t nentries=1000000000, Int_t firstentry=0)
 
virtual TH1 * Draw (const char *varexp, const char *selection, Option_t *option="", Int_t nentries=1000000000, Int_t firstentry=0)
 
void * GetArray () const
 
virtual TClass * GetRowClass () const
 to be documented
 
Int_t GetSize () const
 
virtual Long_t GetNRows () const
 Returns the number of the used rows for the wrapped table.
 
virtual Long_t GetRowSize () const
 Returns the size (in bytes) of one table row.
 
virtual Long_t GetTableSize () const
 Returns the number of the allocated rows.
 
virtual TTableDescriptorGetTableDescriptors () const
 protected: create a new TTableDescriptor descriptor for this table
 
virtual TTableDescriptorGetRowDescriptors () const
 to be documented
 
virtual const Char_t * GetType () const
 Returns the type of the wrapped C-structure kept as the TNamed title.
 
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)
 
virtual Long_t HasData () const
 
virtual Long_t InsertRows (const void *rows, Long_t indx, UInt_t nRows=1)
 
virtual Bool_t IsFolder () const
 
Int_t NaN ()
 
virtual Char_t * MakeExpression (const Char_t *expressions[], Int_t nExpressions)
 
virtual Char_t * Print (Char_t *buf, Int_t n) const
 Create IDL table defintion (to be used for XDF I/O)
 
virtual void Print (Option_t *opt="") const
 
virtual const Char_t * Print (Int_t row, Int_t rownumber=10, const Char_t *colfirst="", const Char_t *collast="") const
 
virtual void PrintContents (Option_t *opt="") const
 to be documented
 
virtual const Char_t * PrintHeader () const
 Print general table inforamtion.
 
virtual void Project (const char *hname, const char *varexp, const char *selection="", Option_t *option="", Int_t nentries=1000000000, Int_t firstentry=0)
 
virtual Int_t Purge (Option_t *opt="")
 Shrink the table to free the unused but still allocated rows.
 
void * ReAllocate (Int_t newsize)
 
void * ReAllocate ()
 
virtual void SavePrimitive (std::ostream &out, Option_t *option="")
 Save a primitive as a C++ statement(s) on output stream "out".
 
virtual void Set (Int_t n)
 Set array size of TTable object to n longs. If n<0 leave array unchanged.
 
virtual void Set (Int_t n, Char_t *array)
 
virtual void SetNRows (Int_t n)
 
virtual void Reset (Int_t c=0)
 
Fill the entire table with byte "c" ;

/ c=0 "be default"

 
virtual void ResetMap (Bool_t wipe=kTRUE)
 
virtual void Update ()
 to be documented
 
virtual void Update (TDataSet *set, UInt_t opt=0)
 
void * operator[] (Int_t i)
 
const void * operator[] (Int_t i) const
 
virtual Int_t GetColumnIndex (const Char_t *columnName) const
 
virtual const Char_t * GetColumnName (Int_t columnIndex) const
 
virtual const UInt_t * GetIndexArray (Int_t columnIndex) const
 
virtual UInt_t GetNumberOfColumns () const
 
virtual UInt_t GetOffset (Int_t columnIndex) const
 
virtual Int_t GetOffset (const Char_t *columnName=0) const
 
virtual UInt_t GetColumnSize (Int_t columnIndex) const
 
virtual Int_t GetColumnSize (const Char_t *columnName=0) const
 
virtual UInt_t GetTypeSize (Int_t columnIndex) const
 
virtual Int_t GetTypeSize (const Char_t *columnName=0) const
 
virtual UInt_t GetDimensions (Int_t columnIndex) const
 
virtual Int_t GetDimensions (const Char_t *columnName=0) const
 
virtual EColumnType GetColumnType (Int_t columnIndex) const
 
virtual EColumnType GetColumnType (const Char_t *columnName=0) const
 
virtual const Char_t * GetColumnComment (Int_t columnIndex) const
 Get a comment from the table descriptor.
 
piterator pbegin ()
 
piterator pend ()
 
- Public Member Functions inherited from TDataSet
 TDataSet (const char *name="", TDataSet *parent=0, Bool_t arrayFlag=kFALSE)
 
 TDataSet (const TDataSet &src, EDataSetPass iopt=kAll)
 
 TDataSet (TNode &src)
 This copy ctor has been depricated (left for thwe sake of the backweard compatibility)
 
virtual ~TDataSet ()
 std::cout << "Default destructor for " << GetName() << " - " << GetTitle() << std::endl;
 
virtual void Add (TDataSet *dataset)
 
virtual void AddAtAndExpand (TDataSet *dataset, Int_t idx=0)
 
virtual void AddFirst (TDataSet *dataset)
 Add TDataSet object at the beginning of the dataset list of this dataset.
 
virtual void AddLast (TDataSet *dataset)
 Add TDataSet object at the end of the dataset list of this dataset.
 
TDataSetAt (Int_t idx) const
 
virtual TObject * Clone (const char *newname="") const
 the custom implementation fo the TObject::Clone
 
virtual TDataSetFind (const char *path) const
 
virtual TDataSetFindByName (const char *name, const char *path="", Option_t *opt="") const
 
virtual TDataSetFindByPath (const char *path) const
 Aliase for TDataSet::Find(const Char_t *path) method.
 
virtual TDataSetFindByTitle (const char *title, const char *path="", Option_t *opt="") const
 
TObject * FindObject (const char *name) const
 
TObject * FindObject (const TObject *o) const
 
virtual TDataSetFirst () const
 Return the first object in the list. Returns 0 when list is empty.
 
TObjArray * GetObjArray () const
 
virtual TSeqCollection * GetCollection () const
 
TList * GetList () const
 
virtual Int_t GetListSize () const
 
TObject * GetMother () const
 
virtual TObject * GetObject () const
 The depricated method (left here for the sake of the backward compatibility)
 
virtual TDataSetGetParent () const
 
virtual TDataSetInstance () const
 
virtual TString Path () const
 return the full path of this data set
 
virtual EDataSetPass Pass (EDataSetPass(*callback)(TDataSet *), Int_t depth=0)
 
virtual EDataSetPass Pass (EDataSetPass(*callback)(TDataSet *, void *), void *user, Int_t depth=0)
 
virtual void Remove (TDataSet *set)
 Remiove the "set" from this TDataSet.
 
virtual TDataSetRemoveAt (Int_t idx)
 
virtual void SetMother (TDataSet *parent=0)
 
virtual void SetObject (TObject *obj)
 The depricated method (left here for the sake of the backward compatibility)
 
virtual void SetParent (TDataSet *parent=0)
 
virtual void SetWrite ()
 
virtual void Shunt (TDataSet *newParent=0)
 
virtual void Sort ()
 Sort recursively all members of the TDataSet with TList::Sort method.
 
virtual Bool_t IsEmpty () const
 return kTRUE if the "internal" collection has no member
 
virtual Bool_t IsMarked () const
 
virtual Bool_t IsThisDir (const char *dirname, int len=-1, int ignorecase=0) const
 
virtual TDataSetLast () const
 Return the last object in the list. Returns 0 when list is empty.
 
virtual void ls (Option_t *option="") const
 
virtual void ls (Int_t depth) const
 
void Mark ()
 
void UnMark ()
 
void MarkAll ()
 Mark all members of this dataset.
 
void UnMarkAll ()
 UnMark all members of this dataset.
 
void InvertAllMarks ()
 Invert mark bit for all members of this dataset.
 
void Mark (UInt_t flag, EBitOpt reset=kSet)
 
virtual TDataSetNext () const
 
virtual TDataSetPrev () const
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0)
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0) const
 

Static Public Member Functions

static TTableNew (const Char_t *name, const Char_t *type, void *array, UInt_t size)
 This static method creates a new TTable object if provided.
 
static const char * GetTypeName (EColumnType type)
 return table type name
 
static EColumnType GetTypeId (const char *typeName)
 
static const char * TableDictionary ()
 
- Static Public Member Functions inherited from TDataSet
static TDataSetGetMainSet ()
 return pointer to the main dataset
 
static TDataSetinstance ()
 

Static Public Attributes

static const char * fgTypeName [kEndColumnType]
 

Protected Member Functions

Bool_t BoundsOk (const char *where, Int_t at) const
 
Bool_t OutOfBoundsError (const char *where, Int_t i) const
 Generate an out-of-bounds error. Always returns false.
 
void CopyStruct (Char_t *dest, const Char_t *src)
 
Char_t * Create ()
 
virtual void Clear (Option_t *opt="")
 
virtual void Delete (Option_t *opt="")
 
virtual Bool_t EntryLoop (const Char_t *exprFileName, Int_t &action, TObject *obj, Int_t nentries=1000000000, Int_t firstentry=0, Option_t *option="")
 
Int_t SetfN (Long_t len)
 to be documented
 
void SetTablePointer (void *table)
 to be documented
 
void SetUsedRows (Int_t n)
 
virtual void SetType (const char *const type)
 to be documented
 
void StreamerHeader (TBuffer &b, Version_t version=3)
 Read "table parameters first".
 
void StreamerTable (TBuffer &b, Version_t version=3)
 Stream an object of class TTable.
 
virtual TTableDescriptorGetDescriptorPointer () const
 to be documented
 
virtual void SetDescriptorPointer (TTableDescriptor *list)
 to be documented
 
void ReAlloc (Int_t newsize)
 The table is reallocated if it is an owner of the internal array.
 
- Protected Member Functions inherited from TDataSet
virtual void SetMother (TObject *mother)
 
 TDataSet (const char *name, const char *title)
 
void AddMain (TDataSet *set)
 add data set to main data set
 
TDataSetGetRealParent ()
 return real parent
 
void MakeCollection ()
 Create the internal container at once if any.
 

Static Protected Member Functions

static const char * TableDictionary (const char *className, const char *structName, TTableDescriptor *&ColDescriptors)
 
- Static Protected Member Functions inherited from TDataSet
static EDataSetPass SortIt (TDataSet *ds)
 
static EDataSetPass SortIt (TDataSet *ds, void *user)
 

Protected Attributes

Long_t fSize
 
Int_t fN
 
Char_t * fTable
 
Long_t fMaxIndex
 
- Protected Attributes inherited from TDataSet
TDataSetfParent
 
TSeqCollection * fList
 

Friends

class TDataSet
 
class St_XDFFile
 

Additional Inherited Members

- Static Protected Attributes inherited from TDataSet
static TDataSetfgMainSet = &mainSet
 

Detailed Description

Definition at line 48 of file TTable.h.

Member Function Documentation

Int_t TTable::AddAt ( const void *  row)
virtual

Add the "row" at the GetNRows() position, and reallocate the table if neccesary, and return the row index the "row" has occupied.

row == 0 see method TTable::AddAt(const void *row, Int_t i)

Reimplemented in TTableDescriptor.

Definition at line 1122 of file TTable.cxx.

References GetNRows(), GetTableSize(), and ReAllocate().

Referenced by TTableDescriptor::AddAt(), St_pp2pp_Maker::DoerPp2pp(), StBFChain::SetFlags(), TResponseTable::SetResponse(), and StBFChain::Setup().

void TTable::AddAt ( const void *  row,
Int_t  i 
)
virtual

Add one element ("row") of structure at position "i". Check for out of bounds.

   If the row == 0 the "i" cell is still occupied and

filled with the pattern "ff"

Reimplemented in TTableDescriptor.

Definition at line 1138 of file TTable.cxx.

void TTable::AddAt ( TDataSet dataset,
Int_t  idx = 0 
)
inlinevirtual

Add TDataSet object at the "idx" position in ds or at the end of the dataset The final result is defined by either TList::AddAt or TObjArray::AddAt methods

Reimplemented from TDataSet.

Reimplemented in TTableDescriptor.

Definition at line 267 of file TTable.h.

References TDataSet::AddAt().

void TTable::Adopt ( Int_t  n,
void *  arr 
)
virtual

Adopt array arr into TTable, i.e. don't copy arr but use it directly in TTable. User may not delete arr, TTable dtor will do it.

Definition at line 1107 of file TTable.cxx.

References Clear(), and SetfN().

Referenced by Update().

Long_t TTable::AppendRows ( const void *  row,
UInt_t  nRows 
)
virtual

Append nRows row of the array "row" to the table return

  • the new table size (# of table rows)
  • 0 if the object doesn't own the internal array and can not expand it

Definition at line 1178 of file TTable.cxx.

References GetNRows(), and ReAllocate().

void TTable::AsString ( void *  buf,
EColumnType  type,
Int_t  width,
std::ostream &  out 
) const
virtual

AsString represents the value provided via "void *b" with type defined by "name"

void *buf - the pointer to the value to be printed out. type - the basic data type for the value above width - the number of psotion to be used to print the value out

Definition at line 229 of file TTable.cxx.

Referenced by Print(), and SavePrimitive().

void TTable::Clear ( Option_t *  opt = "")
protectedvirtual

Deletes the internal array of this class if this object does own its internal table

Definition at line 1342 of file TTable.cxx.

References ResetMap(), and SetfN().

Referenced by Adopt(), Delete(), and Set().

Int_t TTable::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 nRows or by the end of this table.

This table if automaticaly increased if expand = kTRUE. The old values of this table rows are to be destroyed and replaced with the new ones.

PARAMETERS: srcTable - a pointer to the table "donor" srcRow - the index of the first row of the table donor to copy from dstRow - the index of the first row of this table to copy to nRows - the total number of rows to be copied. This table will be expanded as needed if expand = kTRUE (it is kFALSE "by default") = 0 to copy ALL remain rows from the srcTable. expand - flag whether this table should reallocated if needed.

RETURN: the number of the rows been copied

Definition at line 332 of file TTable.cxx.

References GetNRows(), GetRowSize(), GetTableSize(), GetType(), and ReAllocate().

Referenced by DeleteRows(), and InsertRows().

void TTable::CopyStruct ( Char_t *  dest,
const Char_t *  src 
)
protected

Copy the C-structure src into the new location the length of the strucutre is defined by this class descriptor

Definition at line 1151 of file TTable.cxx.

Referenced by CopySet(), and Set().

Char_t * TTable::Create ( )
protected

Allocate a space for the new table, if any Sleep for a while if space is not available and try again

Definition at line 1268 of file TTable.cxx.

References GetType().

Referenced by Set().

void TTable::Delete ( Option_t *  opt = "")
protectedvirtual

Delete the internal array and free the memory it occupied if this object did own this array

Then perform TDataSet::Delete(opt)

Reimplemented from TDataSet.

Definition at line 1366 of file TTable.cxx.

References Clear(), and TDataSet::Delete().

Referenced by ~TTable().

void TTable::DeleteRows ( Long_t  indx,
UInt_t  nRows = 1 
)
virtual

Delete one or several rows from the table

Int_t indx - index of the first row to be deleted Int_t nRows - the total number of rows to be deleted = 1 "by default

Definition at line 364 of file TTable.cxx.

References CopyRows(), and GetNRows().

TH1 * TTable::Draw ( TCut  varexp,
TCut  selection,
Option_t *  option = "",
Int_t  nentries = 1000000000,
Int_t  firstentry = 0 
)
virtual

Draw expression varexp for specified entries.

This function accepts TCut objects as arguments. Useful to use the string operator + example: table.Draw("x",cut1+cut2+cut3);

TCutG object with "CUTG" name can be created via the graphics editor.

Definition at line 380 of file TTable.cxx.

TH1 * TTable::Draw ( const char *  varexp00,
const char *  selection,
Option_t *  option = "",
Int_t  nentries = 1000000000,
Int_t  firstentry = 0 
)
virtual

Draw expression varexp for specified entries.

varexp is an expression of the general form e1:e2:e3 where e1,etc is a C++ expression referencing a combination of the TTable columns One can use two extra meta variable "i$" and "n$" along with the table column names. i$ is to involve the current row number n$ refers the total num,ber of rows of this table provided by TTable::GetNRows()

Example: varexp = x simplest case: draw a 1-Dim distribution of column named x = sqrt(x) : draw distribution of sqrt(x) = x*y/z = y:sqrt(x) 2-Dim dsitribution of y versus sqrt(x) = i$:sqrt(x) 2-Dim dsitribution of i versus sqrt(x[i]) = phep[0]:sqrt(phep[3]) 2-Dim dsitribution of phep[0] versus sqrt(phep[3])

Note that the variables e1, e2 or e3 may contain a boolean expression as well. example, if e1= x*(y<0), the value histogrammed will be x if y<0 and will be 0 otherwise.

selection is a C++ expression with a combination of the columns. The value corresponding to the selection expression is used as a weight to fill the histogram. If the expression includes only boolean operations, the result is 0 or 1. If the result is 0, the histogram is not filled. In general, the expression may be of the form:

value*(boolean expression)

if boolean expression is true, the histogram is filled with a weight = value. Examples: selection1 = "x<y && sqrt(z)>3.2 && 6 < i$ && i$ < n$" selection2 = "(x+y)*(sqrt(z)>3.2" selection3 = "signal*(log(signal)>1.2)" selection1 returns a weigth = 0 or 1 selection2 returns a weight = x+y if sqrt(z)>3.2 returns a weight = 0 otherwise. selection3 returns a weight = signal if log(signal)>1.2

option is the drawing option see TH1::Draw for the list of all drawing options. If option contains the string "goff", no graphics is generated.

nentries is the number of entries to process (default is all) first is the first entry to process (default is 0)

Saving the result of Draw to an histogram

By default the temporary histogram created is called htemp. If varexp0 contains >>hnew (following the variable(s) name(s), the new histogram created is called hnew and it is kept in the current directory. Example: tree.Draw("sqrt(x)>>hsqrt","y>0") will draw sqrt(x) and save the histogram as "hsqrt" in the current directory.

By default, the specified histogram is reset. To continue to append data to an existing histogram, use "+" in front of the histogram name; table.Draw("sqrt(x)>>+hsqrt","y>0") will not reset hsqrt, but will continue filling.

Making a Profile histogram

In case of a 2-Dim expression, one can generate a TProfile histogram instead of a TH2F histogram by specyfying option=prof or option=profs. The option=prof is automatically selected in case of y:x>>pf where pf is an existing TProfile histogram.

Saving the result of Draw to a TEventList

TTable::Draw can be used to fill a TEventList object (list of entry numbers) instead of histogramming one variable. If varexp0 has the form >>elist , a TEventList object named "elist" is created in the current directory. elist will contain the list of entry numbers satisfying the current selection. Example: tree.Draw(">>yplus","y>0") will create a TEventList object named "yplus" in the current directory. In an interactive session, one can type (after TTable::Draw) yplus.Print("all") to print the list of entry numbers in the list.

By default, the specified entry list is reset. To continue to append data to an existing list, use "+" in front of the list name; table.Draw(">>+yplus","y>0") will not reset yplus, but will enter the selected entries at the end of the existing list.

Definition at line 480 of file TTable.cxx.

References EntryLoop(), GetNRows(), and MakeExpression().

Bool_t TTable::EntryLoop ( const Char_t *  exprFileName,
Int_t &  action,
TObject *  obj,
Int_t  nentries = 1000000000,
Int_t  firstentry = 0,
Option_t *  option = "" 
)
protectedvirtual

EntryLoop creates a CINT bytecode to evaluate the given expressions for all table rows in loop and fill the appropriated histograms.

Solution for Byte code From: Masaharu Goto MXJ02.nosp@m.154@.nosp@m.nifty.nosp@m..ne..nosp@m.jp To: fine@.nosp@m.bnl..nosp@m.gov Cc: rootd.nosp@m.ev@h.nosp@m.psalo.nosp@m..cer.nosp@m.n.ch Sent: 13-th august 1999 year 23:01

action = 1 Fill 1-D histogram obj = 2 Fill 2-D histogram obj = 3 Fill 3-D histogram obj = 4 Fill Profile histogram obj = 5 Fill a TEventlist = 11 Estimate Limits = 12 Fill 2-D PolyMarker obj = 13 Fill 3-D PolyMarker obj action < 0 Evaluate Limits for case abs(action)

Load file

Definition at line 785 of file TTable.cxx.

References GetNRows(), GetRowDescriptors(), and GetRowSize().

Referenced by Draw().

void TTable::Fit ( const char *  formula,
const char *  varexp,
const char *  selection = "",
Option_t *  option = "",
Option_t *  goption = "",
Int_t  nentries = 1000000000,
Int_t  firstentry = 0 
)
virtual

Fit a projected item(s) from a TTable.

formula is a TF1 expression.

See TTable::Draw for explanations of the other parameters.

By default the temporary histogram created is called htemp. If varexp contains >>hnew , the new histogram created is called hnew and it is kept in the current directory. Example: table.Fit(pol4,"sqrt(x)>>hsqrt","y>0") will fit sqrt(x) and save the histogram as "hsqrt" in the current directory.

Definition at line 1422 of file TTable.cxx.

TTable::EColumnType TTable::GetTypeId ( const char *  typeName)
static

return the Id of the C basic type by given name return kNAN if the name provided fits no knwn basic name.

Definition at line 292 of file TTable.cxx.

Referenced by TTableDescriptor::LearnTable().

Long_t TTable::InsertRows ( const void *  row,
Long_t  indx,
UInt_t  nRows = 1 
)
virtual

void InsertRows(cons void *row, Long_t indx, UInt_t nRows)

Insert one or several rows into the table at "indx" position The rest table stuff is shifted down

cons void - a pointer to the array of rows to be inserted Long_t indx = The position these rows will be inserted to Int_t nRows - the total number of rows to be inserted = 1 "by default return: The number of the rows has been shifted to accomodate the new rows.

Definition at line 1203 of file TTable.cxx.

References CopyRows(), and GetNRows().

Bool_t TTable::IsFolder ( ) const
virtual

return Folder flag to be used by TBrowse object The table is a folder if

  • it has sub-dataset or
  • GetNRows > 0

Reimplemented from TDataSet.

Definition at line 1456 of file TTable.cxx.

References GetNRows().

Char_t * TTable::MakeExpression ( const Char_t *  expressions[],
Int_t  nExpressions 
)
virtual

Create CINT macro to evaluate the user-provided expresssion Expression may contains:

  • the table columen names
  • 2 meta names: i$ - the current column index, n$ - the total table size provided by TTable::GetNRows() method

return the name of temporary file with the current expressions

Definition at line 2003 of file TTable.cxx.

References GetNRows(), and GetRowDescriptors().

Referenced by Draw().

Int_t TTable::NaN ( )

return the total number of the NaN for float/double cells of this table Thanks Victor Perevoztchikov

Definition at line 1474 of file TTable.cxx.

References GetNRows(), GetRowDescriptors(), and GetRowSize().

Referenced by St_Module::CheckResults(), and StMaker::ClearDS().

TTable & TTable::operator= ( const TTable rhs)

TTable assignment operator. This operator REALLOCATEs this table to fit the number of the USED rows of the source table if any

Definition at line 1083 of file TTable.cxx.

References GetNRows(), GetType(), and Set().

const Char_t * TTable::Print ( Int_t  row,
Int_t  rownumber = 10,
const Char_t *  colfirst = "",
const Char_t *  collast = "" 
) const
virtual

Print the contents of internal table per COLUMN.

row - the index of the first row to print (counting from ZERO) rownumber - the total number of rows to print out (=10 by default)

(No use !) Char_t *colfirst, *collast - the names of the first/last to print out (not implemented yet)

Definition at line 1640 of file TTable.cxx.

References AsString(), GetNRows(), GetRowDescriptors(), GetRowSize(), GetTypeName(), TTableDescriptor::MakeCommentField(), and PrintHeader().

void TTable::Project ( const char *  hname,
const char *  varexp,
const char *  selection = "",
Option_t *  option = "",
Int_t  nentries = 1000000000,
Int_t  firstentry = 0 
)
virtual

Make a projection of a TTable using selections.

Depending on the value of varexp (described in Draw) a 1-D,2-D,etc projection of the TTable will be filled in histogram hname. Note that the dimension of hname must match with the dimension of varexp.

Definition at line 1787 of file TTable.cxx.

void * TTable::ReAllocate ( Int_t  newsize)

Reallocate this table leaving only <newsize> allocated GetTableSize() = newsize; returns a pointer to the first row of the reallocated table Note: The table is reallocated if it is an owner of the internal array

Definition at line 1234 of file TTable.cxx.

References ReAlloc().

Referenced by StMaker::ClearDS().

void * TTable::ReAllocate ( )

Reallocate this table leaving only (used rows)+1 allocated GetTableSize() = GetNRows() + 1 returns a pointer to the first row of the reallocated table Note: The table is reallocated if it is an owner of the internal array

Definition at line 1222 of file TTable.cxx.

References GetNRows(), and ReAlloc().

Referenced by AddAt(), AppendRows(), CopyRows(), TTableDescriptor::LearnTable(), and Purge().

void TTable::ResetMap ( Bool_t  wipe = kTRUE)
virtual

Clean all filled columns with the pointers to TTableMap if any wipe = kTRUE - delete all object the Map's point to kFALSE - zero pointer, do not call "delete" though

Definition at line 2087 of file TTable.cxx.

Referenced by Clear(), and Reset().

void TTable::Set ( Int_t  n,
Char_t *  array 
)
virtual

Set array size of TTable object to n longs and copy array. If n<0 leave array unchanged.

Definition at line 2101 of file TTable.cxx.

References Clear(), CopyStruct(), Create(), and SetfN().

const char * TTable::TableDictionary ( const char *  className,
const char *  structName,
TTableDescriptor *&  ColDescriptors 
)
staticprotected

Query the TClass instance for the C-stucture dicitonary This method is to be used with TableImp CPP macro (see $ROOTSYS/table/inc/Ttypes.h

Definition at line 2410 of file TTable.cxx.

References TableDictionary().

Referenced by TableDictionary().

void TTable::Update ( TDataSet set,
UInt_t  opt = 0 
)
virtual

Kill the table current data and adopt those from set

Reimplemented from TDataSet.

Definition at line 2385 of file TTable.cxx.

References Adopt(), GetNRows(), and TDataSet::Update().

Member Data Documentation

const char * TTable::fgTypeName
static
Initial value:
= {
"NAN", "float", "int", "long", "short", "double",
"unsigned int", "unsigned long","unsigned short",
"unsigned char", "char", "Ptr_t"
}

Definition at line 89 of file TTable.h.


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