TTreeSQL Class Reference

#include <TTreeSQL.h>

Inheritance diagram for TTreeSQL:

TTree TTree TAttMarker TAttFill TAttLine TNamed TAttMarker TAttFill TAttLine TNamed TAttMarker TAttFill TAttLine TNamed TAttMarker TAttFill TAttLine TNamed List of all members.

Public Member Functions

 TTreeSQL (TSQLServer *server, TString DB, const TString &table)
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 TBranchBronch (const char *name, const char *classname, void *addobj, Int_t bufsize=32000, Int_t splitlevel=99)
virtual TBranchBranchOld (const char *name, const char *classname, void *addobj, Int_t bufsize=32000, Int_t splitlevel=1)
virtual TBranchBranch (const char *name, const char *classname, void *addobj, Int_t bufsize=32000, Int_t splitlevel=99)
virtual TBranchBranch (const char *name, void *address, const char *leaflist, Int_t bufsize)
virtual Int_t Fill ()
virtual Int_t GetEntry (Long64_t entry=0, Int_t getall=0)
virtual Long64_t GetEntries () const
virtual Long64_t GetEntries (const char *sel)
virtual Long64_t GetEntriesFast () const
TString GetTableName ()
virtual Long64_t LoadTree (Long64_t entry)
virtual Long64_t PrepEntry (Long64_t entry)
void Refresh ()
 ClassDef (TTreeSQL, 1)
 TTreeSQL (TSQLServer *server, TString DB, const TString &table)
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 TBranchBronch (const char *name, const char *classname, void *addobj, Int_t bufsize=32000, Int_t splitlevel=99)
virtual TBranchBranchOld (const char *name, const char *classname, void *addobj, Int_t bufsize=32000, Int_t splitlevel=1)
virtual TBranchBranch (const char *name, const char *classname, void *addobj, Int_t bufsize=32000, Int_t splitlevel=99)
virtual TBranchBranch (const char *name, void *address, const char *leaflist, Int_t bufsize)
virtual Int_t Fill ()
virtual Int_t GetEntry (Long64_t entry=0, Int_t getall=0)
virtual Long64_t GetEntries () const
virtual Long64_t GetEntries (const char *sel)
virtual Long64_t GetEntriesFast () const
TString GetTableName ()
virtual Long64_t LoadTree (Long64_t entry)
virtual Long64_t PrepEntry (Long64_t entry)
void Refresh ()
 ClassDef (TTreeSQL, 1)

Protected Member Functions

void CheckBasket (TBranch *tb)
Bool_t CheckBranch (TBranch *tb)
Bool_t CheckTable (const TString &table) const
TString CreateBranches (TSQLResult *rs)
std::vector< Int_t > * GetColumnIndice (TBranch *branch)
void Init ()
void ResetQuery ()
TString ConvertTypeName (const TString &typeName)
virtual void CreateBranch (const TString &branchName, const TString &typeName)
Bool_t CreateTable (const TString &table)
virtual TBasketCreateBasket (TBranch *br)
virtual TBranchBranchImp (const char *branchname, const char *classname, TClass *ptrClass, void *addobj, Int_t bufsize, Int_t splitlevel)
virtual TBranchBranchImp (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 CreateBranches (TSQLResult *rs)
std::vector< Int_t > * GetColumnIndice (TBranch *branch)
void Init ()
void ResetQuery ()
TString ConvertTypeName (const TString &typeName)
virtual void CreateBranch (const TString &branchName, const TString &typeName)
Bool_t CreateTable (const TString &table)
virtual TBasketCreateBasket (TBranch *br)
virtual TBranchBranchImp (const char *branchname, const char *classname, TClass *ptrClass, void *addobj, Int_t bufsize, Int_t splitlevel)
virtual TBranchBranchImp (const char *branchname, TClass *ptrClass, void *addobj, Int_t bufsize, Int_t splitlevel)

Protected Attributes

Int_t fCurrentEntry
TString fDB
TString fInsertQuery
TString fQuery
TString fTable
TSQLResultfResult
TSQLRowfRow
TSQLServerfServer
Bool_t fBranchChecked
TSQLResultfResult
TSQLRowfRow
TSQLServerfServer

Detailed Description

Definition at line 43 of file TTreeSQL.h.


Constructor & Destructor Documentation

TTreeSQL::TTreeSQL ( TSQLServer server,
TString  DB,
const TString table 
)

TTreeSQL::TTreeSQL ( TSQLServer server,
TString  DB,
const TString table 
)


Member Function Documentation

void TTreeSQL::CheckBasket ( TBranch tb  )  [protected]

Definition at line 178 of file TTreeSQL.cxx.

References TObjArray::AddAtAndExpand(), buffer, CreateBasket(), TBasketSQL::CreateBuffer(), fResult, TBranch::GetBasket(), TKey::GetBufferRef(), GetColumnIndice(), TObjArray::GetEntriesFast(), TBranch::GetListOfBaskets(), TBranch::GetListOfBranches(), TNamed::GetName(), i, and TObjArray::UncheckedAt().

Referenced by Fill().

Bool_t TTreeSQL::CheckBranch ( TBranch tb  )  [protected]

Definition at line 205 of file TTreeSQL.cxx.

References ConvertTypeName(), CreateBranch(), TObject::Error(), fServer, TBranch::GetBasket(), TSQLResult::GetFieldCount(), TSQLResult::GetFieldName(), TBranch::GetListOfLeaves(), TNamed::GetName(), TBranch::GetNleaves(), TBasketSQL::GetResultSet(), TLeaf::GetTypeName(), i, j, kFALSE, TString::kIgnoreCase, kTRUE, str, and TObjArray::UncheckedAt().

Referenced by Fill().

Bool_t TTreeSQL::CheckTable ( const TString table  )  const [protected]

Definition at line 254 of file TTreeSQL.cxx.

References TString::Data(), fDB, fServer, gErrorIgnoreLevel, TSQLServer::GetColumns(), TSQLServer::GetTables(), kFALSE, kFatal, TString::kIgnoreCase, kTRUE, TSQLResult::Next(), and row.

Referenced by Fill(), GetColumnIndice(), and GetEntries().

TString TTreeSQL::CreateBranches ( TSQLResult rs  )  [protected]

Definition at line 377 of file TTreeSQL.cxx.

References TObjArray::AddAtAndExpand(), TString::Append(), TTree::Branch(), CreateBasket(), TTree::fEntries, TBranch::GetBasketEntry(), TBranch::GetListOfBaskets(), TSQLResult::GetRowCount(), i, TString::Index(), TString::kIgnoreCase, kNPOS, TString::Length(), TSQLResult::Next(), TString::Remove(), TBranch::ResetAddress(), row, TBranch::SetEntries(), snprintf, and type.

Referenced by Init().

vector< Int_t > * TTreeSQL::GetColumnIndice ( TBranch branch  )  [protected]

Definition at line 611 of file TTreeSQL.cxx.

References CheckTable(), TObject::Error(), fDB, fServer, fTable, TSQLServer::GetColumns(), TBranch::GetListOfLeaves(), TNamed::GetName(), TBranch::GetNleaves(), TSQLResult::GetRowCount(), i, j, TString::kIgnoreCase, names, TSQLResult::Next(), row, str, TObjArray::UncheckedAt(), and value.

Referenced by CheckBasket(), and CreateBasket().

void TTreeSQL::Init (  )  [protected]

Definition at line 546 of file TTreeSQL.cxx.

References CreateBranches(), TString::Data(), fCurrentEntry, fDB, fQuery, fResult, fServer, fTable, TSQLServer::GetColumns(), GetEntries(), and TSQLServer::Query().

void TTreeSQL::ResetQuery (  )  [protected]

Definition at line 791 of file TTreeSQL.cxx.

References fInsertQuery, and fTable.

Referenced by Fill().

TString TTreeSQL::ConvertTypeName ( const TString typeName  )  [protected]

Definition at line 280 of file TTreeSQL.cxx.

References TString::Data(), and TObject::Error().

Referenced by CheckBranch(), and CreateTable().

void TTreeSQL::CreateBranch ( const TString branchName,
const TString typeName 
) [protected, virtual]

Definition at line 355 of file TTreeSQL.cxx.

References TString::Data(), TObject::Error(), fServer, fTable, and TSQLServer::Query().

Referenced by CheckBranch(), and CreateTable().

Bool_t TTreeSQL::CreateTable ( const TString table  )  [protected]

Definition at line 483 of file TTreeSQL.cxx.

References ConvertTypeName(), CreateBranch(), TString::Data(), TObject::Error(), TTree::fBranches, fQuery, fResult, fServer, TObjArray::GetEntriesFast(), TLeaf::GetLenStatic(), TBranch::GetListOfLeaves(), TNamed::GetName(), TBranch::GetNleaves(), TLeaf::GetTypeName(), i, j, length, TSQLServer::Query(), str, and TObjArray::UncheckedAt().

Referenced by Fill().

TBasket * TTreeSQL::CreateBasket ( TBranch br  )  [protected, virtual]

Reimplemented from TTree.

Definition at line 337 of file TTreeSQL.cxx.

References TObject::Error(), fInsertQuery, fResult, fRow, fServer, GetColumnIndice(), and TNamed::GetName().

Referenced by CheckBasket(), and CreateBranches().

TBranch * TTreeSQL::BranchImp ( const char *  branchname,
const char *  classname,
TClass ptrClass,
void *  addobj,
Int_t  bufsize,
Int_t  splitlevel 
) [protected, virtual]

Reimplemented from TTree.

Definition at line 67 of file TTreeSQL.cxx.

References TObject::Fatal().

TBranch * TTreeSQL::BranchImp ( const char *  branchname,
TClass ptrClass,
void *  addobj,
Int_t  bufsize,
Int_t  splitlevel 
) [protected, virtual]

Reimplemented from TTree.

Definition at line 78 of file TTreeSQL.cxx.

References TObject::Fatal().

Int_t TTreeSQL::Branch ( TCollection list,
Int_t  bufsize = 32000,
Int_t  splitlevel = 99,
const char *  name = "" 
) [virtual]

Reimplemented from TTree.

Definition at line 88 of file TTreeSQL.cxx.

References TObject::Fatal().

Int_t TTreeSQL::Branch ( TList list,
Int_t  bufsize = 32000,
Int_t  splitlevel = 99 
) [virtual]

Reimplemented from TTree.

Definition at line 98 of file TTreeSQL.cxx.

References TObject::Fatal().

Int_t TTreeSQL::Branch ( const char *  folder,
Int_t  bufsize = 32000,
Int_t  splitlevel = 99 
) [virtual]

Reimplemented from TTree.

Definition at line 107 of file TTreeSQL.cxx.

References TObject::Fatal().

TBranch * TTreeSQL::Bronch ( const char *  name,
const char *  classname,
void *  addobj,
Int_t  bufsize = 32000,
Int_t  splitlevel = 99 
) [virtual]

Reimplemented from TTree.

Definition at line 117 of file TTreeSQL.cxx.

References TObject::Fatal().

TBranch * TTreeSQL::BranchOld ( const char *  name,
const char *  classname,
void *  addobj,
Int_t  bufsize = 32000,
Int_t  splitlevel = 1 
) [virtual]

Reimplemented from TTree.

Definition at line 127 of file TTreeSQL.cxx.

References TObject::Fatal().

TBranch * TTreeSQL::Branch ( const char *  name,
const char *  classname,
void *  addobj,
Int_t  bufsize = 32000,
Int_t  splitlevel = 99 
) [virtual]

Reimplemented from TTree.

Definition at line 137 of file TTreeSQL.cxx.

References TObject::Fatal().

TBranch * TTreeSQL::Branch ( const char *  name,
void *  address,
const char *  leaflist,
Int_t  bufsize 
) [virtual]

Reimplemented from TTree.

Definition at line 147 of file TTreeSQL.cxx.

References TTree::Branch(), TObject::Fatal(), TTree::fBranches, TObjArray::GetEntriesFast(), TNamed::GetName(), i, TString::Index(), and TObjArray::UncheckedAt().

Int_t TTreeSQL::Fill (  )  [virtual]

Reimplemented from TTree.

Definition at line 562 of file TTreeSQL.cxx.

References CheckBasket(), CheckBranch(), CheckTable(), CreateTable(), TString::Data(), TObject::Error(), fBranchChecked, TTree::fBranches, TTree::fEntries, TTree::Fill(), fInsertQuery, fServer, fTable, TObjArray::GetEntriesFast(), TNamed::GetName(), i, kTRUE, TString::Length(), PrepEntry(), TSQLServer::Query(), TString::Remove(), ResetQuery(), and TObjArray::UncheckedAt().

Int_t TTreeSQL::GetEntry ( Long64_t  entry = 0,
Int_t  getall = 0 
) [virtual]

Reimplemented from TTree.

Definition at line 712 of file TTreeSQL.cxx.

References TTree::GetEntry(), and PrepEntry().

Long64_t TTreeSQL::GetEntries (  )  const [virtual]

Reimplemented from TTree.

Definition at line 676 of file TTreeSQL.cxx.

References CheckTable(), TString::Data(), TTree::fEntries, fServer, fTable, GetEntriesFast(), TSQLServer::Query(), and val.

Referenced by Init(), and Refresh().

virtual Long64_t TTreeSQL::GetEntries ( const char *  sel  )  [inline, virtual]

Reimplemented from TTree.

Definition at line 88 of file TTreeSQL.h.

References TTree::GetEntries().

Long64_t TTreeSQL::GetEntriesFast (  )  const [virtual]

Reimplemented from TTree.

Definition at line 703 of file TTreeSQL.cxx.

References TTree::fEntries.

Referenced by GetEntries().

TString TTreeSQL::GetTableName (  )  [inline]

Definition at line 90 of file TTreeSQL.h.

References fTable.

Long64_t TTreeSQL::LoadTree ( Long64_t  entry  )  [virtual]

Reimplemented from TTree.

Definition at line 721 of file TTreeSQL.cxx.

References TTree::fReadEntry, and PrepEntry().

Long64_t TTreeSQL::PrepEntry ( Long64_t  entry  )  [virtual]

Definition at line 730 of file TTreeSQL.cxx.

References TString::Data(), fCurrentEntry, TTree::fEntries, fQuery, TTree::fReadEntry, fResult, fRow, fServer, TSQLResult::Next(), and TSQLServer::Query().

Referenced by Fill(), GetEntry(), and LoadTree().

void TTreeSQL::Refresh (  )  [virtual]

Reimplemented from TTree.

Definition at line 776 of file TTreeSQL.cxx.

References fCurrentEntry, fResult, fRow, and GetEntries().

TTreeSQL::ClassDef ( TTreeSQL  ,
 
)

void TTreeSQL::CheckBasket ( TBranch tb  )  [protected]

Bool_t TTreeSQL::CheckBranch ( TBranch tb  )  [protected]

Bool_t TTreeSQL::CheckTable ( const TString table  )  const [protected]

TString TTreeSQL::CreateBranches ( TSQLResult rs  )  [protected]

std::vector<Int_t>* TTreeSQL::GetColumnIndice ( TBranch branch  )  [protected]

void TTreeSQL::Init (  )  [protected]

void TTreeSQL::ResetQuery (  )  [protected]

TString TTreeSQL::ConvertTypeName ( const TString typeName  )  [protected]

virtual void TTreeSQL::CreateBranch ( const TString branchName,
const TString typeName 
) [protected, virtual]

Bool_t TTreeSQL::CreateTable ( const TString table  )  [protected]

virtual TBasket* TTreeSQL::CreateBasket ( TBranch br  )  [protected, virtual]

Reimplemented from TTree.

virtual TBranch* TTreeSQL::BranchImp ( const char *  branchname,
const char *  classname,
TClass ptrClass,
void *  addobj,
Int_t  bufsize,
Int_t  splitlevel 
) [protected, virtual]

Reimplemented from TTree.

virtual TBranch* TTreeSQL::BranchImp ( const char *  branchname,
TClass ptrClass,
void *  addobj,
Int_t  bufsize,
Int_t  splitlevel 
) [protected, virtual]

Reimplemented from TTree.

virtual Int_t TTreeSQL::Branch ( TCollection list,
Int_t  bufsize = 32000,
Int_t  splitlevel = 99,
const char *  name = "" 
) [virtual]

Reimplemented from TTree.

virtual Int_t TTreeSQL::Branch ( TList list,
Int_t  bufsize = 32000,
Int_t  splitlevel = 99 
) [virtual]

Reimplemented from TTree.

virtual Int_t TTreeSQL::Branch ( const char *  folder,
Int_t  bufsize = 32000,
Int_t  splitlevel = 99 
) [virtual]

Reimplemented from TTree.

virtual TBranch* TTreeSQL::Bronch ( const char *  name,
const char *  classname,
void *  addobj,
Int_t  bufsize = 32000,
Int_t  splitlevel = 99 
) [virtual]

Reimplemented from TTree.

virtual TBranch* TTreeSQL::BranchOld ( const char *  name,
const char *  classname,
void *  addobj,
Int_t  bufsize = 32000,
Int_t  splitlevel = 1 
) [virtual]

Reimplemented from TTree.

virtual TBranch* TTreeSQL::Branch ( const char *  name,
const char *  classname,
void *  addobj,
Int_t  bufsize = 32000,
Int_t  splitlevel = 99 
) [virtual]

Reimplemented from TTree.

virtual TBranch* TTreeSQL::Branch ( const char *  name,
void *  address,
const char *  leaflist,
Int_t  bufsize 
) [virtual]

Reimplemented from TTree.

virtual Int_t TTreeSQL::Fill (  )  [virtual]

Reimplemented from TTree.

virtual Int_t TTreeSQL::GetEntry ( Long64_t  entry = 0,
Int_t  getall = 0 
) [virtual]

Reimplemented from TTree.

virtual Long64_t TTreeSQL::GetEntries (  )  const [virtual]

Reimplemented from TTree.

virtual Long64_t TTreeSQL::GetEntries ( const char *  sel  )  [inline, virtual]

Reimplemented from TTree.

Definition at line 88 of file TTreeSQL.h.

References TTree::GetEntries().

virtual Long64_t TTreeSQL::GetEntriesFast (  )  const [virtual]

Reimplemented from TTree.

TString TTreeSQL::GetTableName (  )  [inline]

Definition at line 90 of file TTreeSQL.h.

References fTable.

virtual Long64_t TTreeSQL::LoadTree ( Long64_t  entry  )  [virtual]

Reimplemented from TTree.

virtual Long64_t TTreeSQL::PrepEntry ( Long64_t  entry  )  [virtual]

void TTreeSQL::Refresh (  )  [virtual]

Reimplemented from TTree.

TTreeSQL::ClassDef ( TTreeSQL  ,
 
)


Member Data Documentation

Int_t TTreeSQL::fCurrentEntry [protected]

Definition at line 46 of file TTreeSQL.h.

Referenced by Init(), PrepEntry(), and Refresh().

TString TTreeSQL::fDB [protected]

Definition at line 47 of file TTreeSQL.h.

Referenced by CheckTable(), GetColumnIndice(), and Init().

TString TTreeSQL::fInsertQuery [protected]

Definition at line 48 of file TTreeSQL.h.

Referenced by CreateBasket(), Fill(), and ResetQuery().

TString TTreeSQL::fQuery [protected]

Definition at line 49 of file TTreeSQL.h.

Referenced by CreateTable(), Init(), and PrepEntry().

TString TTreeSQL::fTable [protected]

Definition at line 50 of file TTreeSQL.h.

Referenced by CreateBranch(), Fill(), GetColumnIndice(), GetEntries(), GetTableName(), Init(), and ResetQuery().

TSQLResult* TTreeSQL::fResult [protected]

Definition at line 51 of file TTreeSQL.h.

Referenced by CheckBasket(), CreateBasket(), CreateTable(), Init(), PrepEntry(), and Refresh().

TSQLRow* TTreeSQL::fRow [protected]

Definition at line 52 of file TTreeSQL.h.

Referenced by CreateBasket(), PrepEntry(), and Refresh().

TSQLServer* TTreeSQL::fServer [protected]

Definition at line 53 of file TTreeSQL.h.

Referenced by CheckBranch(), CheckTable(), CreateBasket(), CreateBranch(), CreateTable(), Fill(), GetColumnIndice(), GetEntries(), Init(), and PrepEntry().

Bool_t TTreeSQL::fBranchChecked [protected]

Definition at line 54 of file TTreeSQL.h.

Referenced by Fill().

TSQLResult* TTreeSQL::fResult [protected]

Definition at line 51 of file TTreeSQL.h.

TSQLRow* TTreeSQL::fRow [protected]

Definition at line 52 of file TTreeSQL.h.

TSQLServer* TTreeSQL::fServer [protected]

Definition at line 53 of file TTreeSQL.h.


The documentation for this class was generated from the following files:
Generated on Tue Jul 5 16:48:10 2011 for ROOT_528-00b_version by  doxygen 1.5.1