62 void TTableDescriptor::Streamer(
TBuffer &R__b)
65 TTable::Streamer(R__b);
100 if (name)
delete []
name;
102 if (indxArray)
delete [] indxArray;
130 #ifdef NORESTRICTIONS 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;
271 varname = (
Char_t *) member->GetName();
272 #ifdef NORESTRICTIONS 280 if (member->IsaPointer() ) {
281 elementDescriptor.
fTypeSize =
sizeof(
void *);
282 const char *typeName = member->GetTypeName();
290 Int_t globalIndex = 1;
293 if ( (dim = member->GetArrayDim()) ) {
295 #ifdef NORESTRICTIONS 299 if (
UInt_t(dim) > maxDim) {
300 Error(
"LearnTable",
"Too many dimenstions - %d", dim);
304 for(
Int_t indx=0; indx < dim; indx++ ){
305 elementDescriptor.
fIndexArray[indx] = member->GetMaxIndex(indx);
306 globalIndex *= elementDescriptor.
fIndexArray[indx];
310 else Error(
"LearnTable",
"Wrong data type for <%s> structure",classPtr->
GetName());
311 elementDescriptor.
fSize = globalIndex * (elementDescriptor.
fTypeSize);
312 elementDescriptor.
fOffset = member->GetOffset();
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++)
417 if (strcmp(name,elementDescriptor->
fColumnName) == 0)
break;
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;
virtual const char * GetName() const
Returns name of object.
Int_t GetNdata()
Return the number of data members of this class Note that in case the list of data members is not yet...
void LearnTable(const TTable *parentTable)
to be documented
static TDataType * GetDataType(EDataType type)
Given a EDataType type, get the TDataType* that represents it.
TString GetTypeName()
Get basic type of typedef, e,g.
void * ReAllocate()
Reallocate this table leaving only (used rows)+1 allocated GetTableSize() = GetNRows() + 1 returns a ...
unsigned int fIndexArray[3]
All ROOT classes may have RTTI (run time type identification) support added.
virtual void SetName(const char *name)
Set the name of the TNamed.
virtual TClass * GetRowClass() const
to be documented
Buffer base class used for serializing objects.
TList * GetListOfDataMembers(Bool_t load=kTRUE)
Return list containing the TDataMembers of a class.
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 Int_t UpdateOffsets(const TTableDescriptor *newDesciptor)
"Schema evolution" Method updates the offsets with a new ones from another descriptor ...
virtual TDataSet * FindByName(const char *name, const char *path="", Option_t *opt="") const
Full description see: TDataSetIter::Find.
static TTableDescriptor * fgColDescriptors
const UInt_t * IndexArray(Int_t columnIndex) const
TableClassImp(TTableDescriptor, tableDescriptor_st) TTableDescriptor *TTableDescriptor
return column descriptor
const Char_t * ColumnName(Int_t columnIndex) const
static TString fgCommentsName
virtual TTableDescriptor * GetDescriptorPointer() const
to be documented
UInt_t Offset(Int_t columnIndex) const
virtual void Init(TClass *classPtr)
Create a descriptor of the C-structure defined by TClass TClass *classPtr must be a valid pointer to ...
UInt_t ColumnSize(Int_t columnIndex) const
TClass * RowClass() const
virtual Int_t AddAt(const void *c)
Append one row pointed by "c" to the descriptor.
TString CreateLeafList() const
Create a list of leaf to be useful for TBranch::TBranch ctor.
TTableDescriptor * fSecondDescriptor
UInt_t TypeSize(Int_t columnIndex) const
virtual void SetType(const char *const type)
to be documented
Basic data type descriptor (datatype information is obtained from CINT).
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 Error(const char *method, const char *msgfmt,...) const
Issue error message.
Int_t Size() const
Return size of object of this class.
The ROOT global object gROOT contains a list of all defined classes.
char * StrDup(const char *str)
Duplicate the string str.
TTable::EColumnType ColumnType(Int_t columnIndex) const
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...
static void SetCommentsSetName(const char *name=".comments")
set comments name
UInt_t NumberOfColumns() const
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.
void SetOffset(UInt_t offset, Int_t column)
static TTableDescriptor * MakeDescriptor(const char *structName)
MakeDescriptor(const char *structName) - static method structName - the name of the C structure to cr...
virtual void SetDescriptorPointer(TTableDescriptor *list)
to be documented
virtual Long_t GetNRows() const
Returns the number of the used rows for the wrapped table.
Int_t Size() const
Get size of basic typedef'ed type.
virtual ~TTableDescriptor()
class destructor
Int_t ColumnByName(const Char_t *columnName=0) const
Find the column index but the column name.
virtual Int_t GetSize() const
Int_t Sizeof() const
to be documented
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
UInt_t Dimensions(Int_t columnIndex) const
TDataSet * MakeCommentField(Bool_t createFlag=kTRUE)
Instantiate a comment dataset if any.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
const char * Data() const