library: libTree
#include "TTreeSQL.h"

TTreeSQL


class description - source file - inheritance tree (.pdf)

class TTreeSQL : public TTree

Inheritance Chart:
TObject
<-
TNamed
TAttLine
TAttFill
TAttMarker
<-
TTree
<-
TTreeSQL

    protected:
virtual TBranch* BranchImp(const char* branchname, const char* classname, TClass* ptrClass, void* addobj, Int_t bufsize, Int_t splitlevel) virtual TBranch* BranchImp(const char* branchname, TClass* ptrClass, void* addobj, Int_t bufsize, Int_t splitlevel) void CheckBasket(TBranch* tb) Bool_t CheckBranch(TBranch* tb) Bool_t CheckTable(const TString& table) const TString ConvertTypeName(const TString& typeName) virtual TBasket* CreateBasket(TBranch* br) virtual void CreateBranch(const TString& branchName, const TString& typeName) TString CreateBranches(TSQLResult* rs) void CreateTable(const TString& table) vector<Int_t>* GetColumnIndice(TBranch* branch) void Init() void ResetQuery() public:
TTreeSQL(TSQLServer* server, TString DB, const TString& table) ~TTreeSQL() virtual Int_t Branch(TCollection* list, Int_t bufsize = 32000, Int_t splitlevel = 99, const char* name = "") virtual Int_t Branch(TList* list, Int_t bufsize = 32000, Int_t splitlevel = 99) virtual Int_t Branch(const char* folder, Int_t bufsize = 32000, Int_t splitlevel = 99) virtual TBranch* Branch(const char* name, void* address, const char* leaflist, Int_t bufsize) virtual TBranch* BranchOld(const char* name, const char* classname, void* addobj, Int_t bufsize = 32000, Int_t splitlevel = 1) virtual TBranch* Bronch(const char* name, const char* classname, void* addobj, Int_t bufsize = 32000, Int_t splitlevel = 99) static TClass* Class() virtual Int_t Fill() virtual Long64_t GetEntries() const virtual Long64_t GetEntriesFast() const virtual Int_t GetEntry(Long64_t entry = 0, Int_t getall = 0) TString GetTableName() virtual TClass* IsA() const virtual Long64_t LoadTree(Long64_t entry) virtual Long64_t PrepEntry(Long64_t entry) virtual void Refresh() virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members


    protected:
Int_t fCurrentEntry TString fDB TString fInsertQuery TString fQuery TString fTable TSQLResult* fResult TSQLRow* fRow TSQLServer* fServer Bool_t fBranchChecked

Class Description

                                                                      
 TTreeSQL                                                             
                                                                      
 Implement TTree for a SQL backend                                    
                                                                      


TTreeSQL(TSQLServer *server, TString DB, const TString& table) : TTree(table.Data(), "Database read from table: " + table, 0), fDB(DB), fTable(table.Data()), fResult(0), fRow(0), fServer(server), fBranchChecked(kFALSE)
 Constructor with an explicit TSQLServer

TBranch* BranchImp(const char *, const char *, TClass *, void *, Int_t , Int_t )

TBranch* BranchImp(const char *, TClass *, void *, Int_t , Int_t )

Int_t Branch(TCollection *, Int_t, Int_t, const char *)

Int_t Branch(TList *, Int_t, Int_t)

Int_t Branch(const char *, Int_t , Int_t)

TBranch* Bronch(const char *, const char *, void *, Int_t, Int_t)

TBranch* BranchOld(const char *, const char *, void *, Int_t, Int_t)

TBranch* Branch(const char *, const char *, void *, Int_t, Int_t)

TBranch* Branch(const char *name, void *address, const char *leaflist, Int_t bufsize)

void CheckBasket(TBranch *branch)

Bool_t CheckBranch(TBranch * tb)
 Check if the table has a column corresponding the branch
 and that the resultset are properly setup

Bool_t CheckTable(const TString &table) const
 Check the table exist in the database

TString ConvertTypeName(const TString& typeName )
 Convert from ROOT typename to SQL typename

TBasket* CreateBasket(TBranch * tb)

void CreateBranch(const TString &branchName, const TString &typeName)
 Create the column(s) in the database that correspond to the branch

TString CreateBranches(TSQLResult * rs)
 determine leaf description string

void CreateTable(const TString &table)
 Create the database table corresponding to this TTree.

void Init()
 Initializeation routine

Int_t Fill()

Long64_t GetEntries() const
 Get the number of rows in the database

Long64_t GetEntriesFast() const

Int_t GetEntry(Long64_t entry, Int_t getall)
 Load the data for the entry from the database.

Long64_t LoadTree(Long64_t entry)

Long64_t PrepEntry(Long64_t entry)
 Make sure the server and result set are setup for the requested entry

void Refresh()
  Refresh contents of this Tree and his branches from the current
  Tree status in the database
  One can call this function in case the Tree on its file is being
  updated by another process

void ResetQuery()



Inline Functions


                  void ~TTreeSQL()
        vector<Int_t>* GetColumnIndice(TBranch* branch)
               TString GetTableName()
               TClass* Class()
               TClass* IsA() const
                  void ShowMembers(TMemberInspector& insp, char* parent)
                  void Streamer(TBuffer& b)
                  void StreamerNVirtual(TBuffer& b)


Author: Philippe Canal and al. 08/2004
Last update: root/tree:$Name: $:$Id: TTreeSQL.cxx,v 1.4 2005/09/03 02:21:32 pcanal Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *


ROOT page - Class index - Class Hierarchy - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.