62void TTableDescriptor::Streamer(
TBuffer &R__b)
65 TTable::Streamer(R__b);
102 if (indxArray)
delete [] indxArray;
168 const Char_t typeMapTBranch[]=
"\0FIISDiisbBC";
171 for (
Int_t i=0;i<maxRows;i++){
172 if (i)
string +=
":";
182 Error(
"CreateLeafList()",
"Can not create leaflist for arrays");
185 for (k=0;k< nDim; k++) totalSize *= indx[k];
189 for ( k = 0; k < totalSize; k++) {
198 if (k != totalSize -1)
string +=
":";
257 if (!classPtr)
return;
259 if (!(classPtr->
GetNdata()))
return;
266 Int_t columnIndex = 0;
281 elementDescriptor.
fTypeSize =
sizeof(
void *);
290 Int_t globalIndex = 1;
299 if (
UInt_t(dim) > maxDim) {
300 Error(
"LearnTable",
"Too many dimenstions - %d", dim);
304 for(
Int_t indx=0; indx < dim; indx++ ){
306 globalIndex *= elementDescriptor.
fIndexArray[indx];
310 else Error(
"LearnTable",
"Wrong data type for <%s> structure",classPtr->
GetName());
311 elementDescriptor.
fSize = globalIndex * (elementDescriptor.
fTypeSize);
313 AddAt(elementDescriptor,member->
GetTitle(),columnIndex); columnIndex++;
342 if (!comments && createFlag)
361 for (
Int_t colCounter=0; colCounter < maxColumns; colCounter++) {
379 if (colNewIndx != colCounter) {
380 Printf(
"Schema evolution: \t%d column of the \"%s\" table has been moved to %d-th column\n",
381 colCounter,
ColumnName(colCounter),colNewIndx);
384 Printf(
"Schema evolution: \t%d column \"%s\" size has been changed\n",
389 Printf(
"Schema evolution: \t%d column \"%s\" of %d type has been lost\n",
398 Printf(
"Warning: One extra column has been introduced\n");
410 if (!elementDescriptor)
return i;
415 if ((bracket = strchr(
name,
'[')) ) *bracket = 0;
416 for (i=0; i < nRows; i++,elementDescriptor++)
420 if (i==nRows) i = -1;
424 Warning(
"ColumnByName",
"%s column contains a scalar value",columnName);
441 const char *openBracket = 0;
442 if ( (openBracket = strchr(columnName,
'[')) )
443 offset += atoi(openBracket+1)*
TypeSize(indx);
465 if (indx >= 0 ) indx =
TypeSize(indx);
493 Int_t fullRowSize = 0;
char * StrDup(const char *str)
Duplicate the string str.
TableClassImp(TTableDescriptor, tableDescriptor_st)
Buffer base class used for serializing objects.
The ROOT global object gROOT contains a list of all defined classes.
Int_t GetNdata()
Return the number of data members of this class Note that in case the list of data members is not yet...
TList * GetListOfDataMembers(Bool_t load=kTRUE)
Return list containing the TDataMembers of a class.
Int_t Size() const
Return size of object of this class.
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
All ROOT classes may have RTTI (run time type identification) support added.
Int_t GetMaxIndex(Int_t dim) const
Return maximum index for array dimension "dim".
Long_t GetOffset() const
Get offset from "this".
Int_t GetArrayDim() const
Return number of array dimensions.
Bool_t IsaPointer() const
Return true if data member is a pointer.
TDataType * GetDataType() const
const char * GetTypeName() const
Get type of data member, e,g.: "class TDirectory*" -> "TDirectory".
virtual void AddAtAndExpand(TDataSet *dataset, Int_t idx=0)
!!!! Under construction !!!!! Add TDataSet object at the "idx" position in ds or at the end of the da...
virtual TDataSet * FindByName(const char *name, const char *path="", Option_t *opt="") const
Full description see: TDataSetIter::Find.
Basic data type descriptor (datatype information is obtained from CINT).
TString GetTypeName()
Get basic type of typedef, e,g.
Int_t Size() const
Get size of basic typedef'ed type.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
virtual void SetName(const char *name)
Set the name of the TNamed.
virtual const char * GetTitle() const
Returns title of object.
virtual const char * GetName() const
Returns name of object.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
R__ALWAYS_INLINE Bool_t IsZombie() const
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
const char * Data() const
const Char_t * ColumnName(Int_t columnIndex) const
UInt_t Offset(Int_t columnIndex) const
UInt_t NumberOfColumns() const
TString CreateLeafList() const
Create a list of leaf to be useful for TBranch::TBranch ctor.
virtual void Init(TClass *classPtr)
Create a descriptor of the C-structure defined by TClass TClass *classPtr must be a valid pointer to ...
Int_t ColumnByName(const Char_t *columnName=0) const
Find the column index but the column name.
UInt_t TypeSize(Int_t columnIndex) const
virtual TTableDescriptor * GetDescriptorPointer() const
return column descriptor
UInt_t ColumnSize(Int_t columnIndex) const
const UInt_t * IndexArray(Int_t columnIndex) const
virtual void SetDescriptorPointer(TTableDescriptor *list)
set table descriptor
Int_t Sizeof() const
to be documented
static void SetCommentsSetName(const char *name=".comments")
set comments name
TTableDescriptor * fSecondDescriptor
TDataSet * MakeCommentField(Bool_t createFlag=kTRUE)
Instantiate a comment dataset if any.
TTable::EColumnType ColumnType(Int_t columnIndex) const
UInt_t Dimensions(Int_t columnIndex) const
void SetOffset(UInt_t offset, Int_t column)
TClass * RowClass() const
static TTableDescriptor * fgColDescriptors
void LearnTable(const TTable *parentTable)
to be documented
virtual ~TTableDescriptor()
class destructor
virtual Int_t UpdateOffsets(const TTableDescriptor *newDesciptor)
virtual Int_t AddAt(const void *c)
Append one row pointed by "c" to the descriptor.
static TTableDescriptor * MakeDescriptor(const char *structName)
MakeDescriptor(const char *structName) - static method structName - the name of the C structure to cr...
static TString fgCommentsName
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...
virtual void SetType(const char *const type)
to be documented
void * ReAllocate()
Reallocate this table leaving only (used rows)+1 allocated GetTableSize() = GetNRows() + 1 returns a ...
virtual Long_t GetNRows() const
Returns the number of the used rows for the wrapped table.
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...
virtual TClass * GetRowClass() const
to be documented
unsigned int fIndexArray[3]