File: TFTable.cpp Version: 1.0 Author: Reiner Rohlfs (GADC) History: 1.0 17.07.03 first released version
TFTable() | |
TFTable(const TFTable& table) | |
TFTable(TTree* tree) | |
TFTable(const char* name, UInt_t numRows = 0) | |
TFTable(const char* name, const char* fileName) | |
virtual | ~TFTable() |
void | TObject::AbstractMethod(const char* method) const |
virtual void | TFHeader::AddAttribute(const TFBaseAttr& attr, Bool_t replace = kTRUE) |
virtual Int_t | AddColumn(TFBaseCol* column, Bool_t replace = kFALSE) |
virtual TFBaseCol& | AddColumn(const char* name, TClass* colDataType, Bool_t replace = kFALSE) |
virtual void | TObject::AppendPad(Option_t* option = "") |
virtual void | TObject::Browse(TBrowser* b) |
static TClass* | Class() |
virtual const char* | TObject::ClassName() const |
virtual void | TNamed::Clear(Option_t* option = "") |
virtual TObject* | TNamed::Clone(const char* newname = "") const |
virtual void | TFIOElement::CloseElement() |
virtual Int_t | TNamed::Compare(const TObject* obj) const |
virtual void | TNamed::Copy(TObject& named) const |
virtual void | TFHeader::DelAttribute(const char* key, Int_t index = -1) |
virtual void | TObject::Delete(Option_t* option = "") |
virtual void | DeleteColumn(const char* name) |
virtual Int_t | DeleteElement(Bool_t updateMemory = kFALSE) |
virtual void | DeleteRows(UInt_t numRows = 1, UInt_t pos = TF_MAX_ROWS) |
virtual Int_t | TObject::DistancetoPrimitive(Int_t px, Int_t py) |
virtual void | TObject::Draw(Option_t* option = "") |
virtual void | TObject::DrawClass() const |
virtual TObject* | TObject::DrawClone(Option_t* option = "") const |
virtual void | TObject::Dump() const |
virtual void | TObject::Error(const char* method, const char* msgfmt) const |
virtual void | TObject::Execute(const char* method, const char* params, Int_t* error = 0) |
virtual void | TObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0) |
virtual void | TObject::ExecuteEvent(Int_t event, Int_t px, Int_t py) |
virtual void | TObject::Fatal(const char* method, const char* msgfmt) const |
virtual void | TNamed::FillBuffer(char*& buffer) |
virtual TObject* | TObject::FindObject(const char* name) const |
virtual TObject* | TObject::FindObject(const TObject* obj) const |
virtual TFBaseAttr& | TFHeader::GetAttribute(const char* key, UInt_t index = 0) const |
virtual TFBaseCol& | GetColumn(const char* name) const |
virtual Int_t | TFIOElement::GetCompressionLevel() |
virtual Int_t | TFIOElement::GetCycle() const |
virtual Option_t* | TObject::GetDrawOption() const |
static Long_t | TObject::GetDtorOnly() |
virtual const char* | TFIOElement::GetFileName() const |
virtual const char* | TObject::GetIconName() const |
virtual const char* | TNamed::GetName() const |
virtual UInt_t | TFHeader::GetNumAttributes(const char* key = NULL) const |
virtual UInt_t | GetNumColumns() const |
virtual UInt_t | GetNumRows() const |
virtual char* | TObject::GetObjectInfo(Int_t px, Int_t py) const |
static Bool_t | TObject::GetObjectStat() |
virtual Option_t* | TObject::GetOption() const |
virtual const char* | TNamed::GetTitle() const |
virtual UInt_t | TObject::GetUniqueID() const |
virtual Bool_t | TObject::HandleTimer(TTimer* timer) |
virtual ULong_t | TNamed::Hash() const |
virtual void | TObject::Info(const char* method, const char* msgfmt) const |
virtual Bool_t | TObject::InheritsFrom(const char* classname) const |
virtual Bool_t | TObject::InheritsFrom(const TClass* cl) const |
virtual void | InsertRows(UInt_t numRows = 1, UInt_t pos = TF_MAX_ROWS) |
virtual void | TObject::Inspect() const |
void | TObject::InvertBit(UInt_t f) |
virtual TClass* | IsA() const |
virtual Bool_t | TObject::IsEqual(const TObject* obj) const |
virtual Bool_t | TFIOElement::IsFileConnected() const |
virtual Bool_t | TObject::IsFolder() const |
Bool_t | TObject::IsOnHeap() const |
virtual Bool_t | TNamed::IsSortable() const |
Bool_t | TObject::IsZombie() const |
virtual void | TNamed::ls(Option_t* option = "") const |
virtual TFAttrIter | TFHeader::MakeAttrIterator() const |
virtual TFColIter | MakeColIterator() const |
virtual TGraphErrors* | MakeGraph(const char* xCol, const char* yCol, const char* xErrCol = NULL, const char* yErrCol = NULL, TGraphErrors* graph = NULL) |
virtual TFRowIter | MakeRowIterator() const |
virtual TTree* | MakeTree(TFNameConvert* nameConvert = NULL) const |
void | TObject::MayNotUse(const char* method) const |
virtual Bool_t | TObject::Notify() |
static void | TObject::operator delete(void* ptr) |
static void | TObject::operator delete(void* ptr, void* vp) |
static void | TObject::operator delete[](void* ptr) |
static void | TObject::operator delete[](void* ptr, void* vp) |
void* | TObject::operator new(size_t sz) |
void* | TObject::operator new(size_t sz, void* vp) |
void* | TObject::operator new[](size_t sz) |
void* | TObject::operator new[](size_t sz, void* vp) |
virtual TFTable& | operator=(const TFTable& table) |
virtual bool | operator==(const TFHeader& ioelement) const |
virtual TFBaseCol& | operator[](const char* name) const |
virtual void | TObject::Paint(Option_t* option = "") |
virtual void | TObject::Pop() |
virtual void | Print(Option_t* option = "") const |
virtual void | TFHeader::PrintH(Option_t* option = "") const |
virtual Int_t | TObject::Read(const char* name) |
virtual void | TObject::RecursiveRemove(TObject* obj) |
virtual void | Reserve(UInt_t rows) |
void | TObject::ResetBit(UInt_t f) |
virtual void | TObject::SaveAs(const char* filename = "", Option_t* option = "") const |
virtual Int_t | SaveElement(const char* fileName = NULL, Int_t compLevel = -1) |
virtual void | TObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "") |
void | TObject::SetBit(UInt_t f) |
void | TObject::SetBit(UInt_t f, Bool_t set) |
virtual void | TFIOElement::SetCompressionLevel(Int_t level) |
virtual void | TObject::SetDrawOption(Option_t* option = "") |
static void | TObject::SetDtorOnly(void* obj) |
void | TFIOElement::SetFileAccess(FMode mode) |
void | TFIOElement::SetIO(TFVirtualIO* io) |
virtual void | TNamed::SetName(const char* name) |
virtual void | TNamed::SetNameTitle(const char* name, const char* title) |
static void | TObject::SetObjectStat(Bool_t stat) |
virtual void | TNamed::SetTitle(const char* title = "") |
virtual void | TObject::SetUniqueID(UInt_t uid) |
virtual void | ShowMembers(TMemberInspector& insp, char* parent) |
virtual Int_t | TNamed::Sizeof() const |
virtual void | Streamer(TBuffer& b) |
void | StreamerNVirtual(TBuffer& b) |
virtual void | TObject::SysError(const char* method, const char* msgfmt) const |
Bool_t | TObject::TestBit(UInt_t f) const |
Int_t | TObject::TestBits(UInt_t f) const |
virtual void | TObject::UseCurrentStyle() |
virtual void | TObject::Warning(const char* method, const char* msgfmt) const |
virtual Int_t | TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) |
virtual Int_t | TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const |
virtual void | TObject::DoError(int level, const char* location, const char* fmt, va_list va) const |
void | TObject::MakeZombie() |
virtual void | TFIOElement::NewFile(const char* fileName) |
virtual void | UpdateMemory() |
void | ReadAllCol() const |
set<TFColWrapper,less<TFColWrapper>,allocator<TFColWrapper> >::iterator | ReadCol(const char* name) const |
enum TObject::EStatusBits { | kCanDelete | |
kMustCleanup | ||
kObjInCanvas | ||
kIsReferenced | ||
kHasUUID | ||
kCannotPick | ||
kNoContextMenu | ||
kInvalidObject | ||
}; | ||
enum TObject::[unnamed] { | kIsOnHeap | |
kNotDeleted | ||
kZombie | ||
kBitMask | ||
kSingleKey | ||
kOverwrite | ||
kWriteDelete | ||
}; |
UInt_t | fAlreadyRead | ! number of columns already read from file |
list<TFBaseAttr*> | TFHeader::fAttr | a list of attributes |
ColList | fColumns | ! sorted list of all columns of this table |
FMode | TFIOElement::fFileAccess | !access to the file read, readwrite |
TString | TNamed::fName | object identifier |
UInt_t | fNumRows | number of rows of this table |
Bool_t | fReadAll | ! kTRUE if all columns read from file |
TString | TNamed::fTitle | object title |
TFVirtualIO* | TFIOElement::fio | !interface to the file |
Inheritance Chart: | |||||||||||||||||||||||
|
Default constructor. The table has no columns, no rows and is not associated with a table in a file. Don't use this constructor. The table should have at least a name.
The table has no columns, numRows rows and is not associated with a table in a file. name is the id of the new table. Default value of numRows is 0.
A new table is created. It has no columns, no rows but is associated with a table in a file. name is the id of the new table. fileName is the file name of the file with this new table. The file extension define the used file type: *.fits, *.fts, *fit and *.fits.gz define a FITS file. *.root define a ROOT file and *.asro and anything else define a ASRO file. The file may already exist or will be created. Other objects with the same name can exist without problem in the same file. Each object with the same name has a unique cycle number. Use GetCycle() to ask for this cycle number. Use the global function TFReadTable() to read and update an already existing table from an ASRO file, a ROOT file or a FITS file.
Copy constructor. But even if the input table is associated with a table in a file, this new table is NOT associated with this or an other table in a file. The new table exist only in memory.
Even if the input table is associated with a table in a file, this table is NOT associated with this or an other table in a file. If this table was associates with a table in a file before this function the file is closed without update. After this function call this table exist only in memory, but can be saved in a file with the SaveElement() function.
Adds one column to the table. The column names in one table have to be unique. If a column with the same name already exist and replace == kTRUE the old column is deleted and replaced by the new one. If replace == kFALSE (the default value) the new column is not added to the table and an error is written to the TFError class. The column is adopted to the table and will be deleted by the table when the table is deleted from memory. The number of rows of the column will be increased or decreased to the number of rows of the table, respectively.
Creates a new column of type colDataType and adds it to the table. The column names in one table have to be unique. If a column with the same name already exist and replace == kTRUE the old column is deleted and replaced by the new one. If replace == kFALSE (the default value) the new column is not added to the table and either TFException is thrown or a reference to the already existing column named "name" is returned, depending on a call of TFError::SetErrorType(). The column is adopted to the table and will be deleted by the table when the table is deleted from memory. The number of rows of the new column will be set to the number of rows of the table. Use the static member function Class() of the required column data type to pass a TClass variable at the second parameter.
Deletes the column with the id name from this table and from memory. If the table is associated with a file the column is also immediately deleted in the file without calling the SaveElement() function. If a column with the id "name" does not exist in this table the function does nothing, no warning and no error message.
Gets a reference of the column with name "name". The column is still adopted to the table and will be deleted from memory when the table is deleted. If no column with name "name" exist in the table a TFException is thrown or a reference to a NULL pointer is returned, depending on a call of TFError::SetErrorType().
Returns an iterator for all columns. This iterator can be used to retrieve all columns if their names are unknown.
Returns an iterator for all rows of this table. This iterator can be used to sort the rows depending on a column and to filter rows. The filter can be expressed with a c - statement and can depend on values in any column and on row number. See TFRowIter for more information on sorting and filter.
Insert rows into the table. All columns of the table are updated. pos is the first index of the new rows. If pos is greater than the actual number of rows in the table all new rows are inserted at the end of the table. The index of the row number is 0 based. The table in the file is not updated. Use the SaveElement() to update the table in the ASRO, ROOT or FITS file.
Delete numRows from all columns. The first removed column has the index pos. The index of the row numbers is 0 based. If pos + numRows is greater than the actual number of rows all rows beginning with row number pos are deleted. If pos is greater or equal than the actual number of rows than no rows are deleted. But if pos == TF_MAX_ROWS the last numRows of the table are removed.
To avoid memory movements each time a new row is inserted
into the table some additional rows are allocated more than
necessary. These additional rows are used the next time new
rows are inserted. "rows" defines the maximum number of rows that
can be used before new memory will be allocated.
Reads all not yet read columns from the ASRO, ROOT or FITS file into memory Private function, called automatically if needed.
Updates the table in the ASRO, ROOT or FITS file with the data of this table in memory. If fileName is defined the old file is closed and the table is written into this new file named fileName. compLevel defines the compression level in the ASRO and ROOT file. It is not used for FITS files. To set compLevel and to update the table in the same file set fileName to an empty string "". This function without any parameter has to be used to update the ASRO, the ROOT or the FITS file with any change of the table. This function does nothing if the table was opened with kFRead
Deletes the table in the file, but not in memory. Closes the file and deletes the file if this table is the last element in the file. Note: Some columns of the table may not yet be read from the table and are not in memory. Set updateMemory to kTRUE to have access to all columns of this table after it is deleted in the file. The default value of updateMemeory is kFALSE.
creates a TTree from all basic column of this table. Each column is copied in one branch of the tree. The tree gets the name of this table, each branch gets the name of its column. nameConvert can be NULL. But it will be adopted by this function and will be deleted by this function if it is not NULL. The calling function has to delete the returning tree.
A TGraphErrors is created from all data of two columns and two further columns can be used for the errors. The column names, used to fill the graph has to be passed as the first 4 parameters. It is possible to use columns of different tables: The first time call MakeGraph with graph == NULL and some column names may be set to NULL as well. Call MakeGraph of the further tables and pass the returned graph of the first call as the 5th parameter. At any call column names can be set to NULL or "". These are not used to fill the graph. The number of points of the graph is the number of rows of the first table. It is not necessary to derfine columns for the X - and Y - errors. Null values in a column are set to 0 in the graph, for the X - and Y values as well as for the errors. If the first table has less than 2 rows or if a column does not exist in the table an error message is written to TFError.