#include <TTreeSQL.h>
Inheritance diagram for TTreeSQL:
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 TBranch * | Bronch (const char *name, const char *classname, void *addobj, Int_t bufsize=32000, Int_t splitlevel=99) |
virtual TBranch * | BranchOld (const char *name, const char *classname, void *addobj, Int_t bufsize=32000, Int_t splitlevel=1) |
virtual TBranch * | Branch (const char *name, const char *classname, void *addobj, Int_t bufsize=32000, Int_t splitlevel=99) |
virtual TBranch * | Branch (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 TBranch * | Bronch (const char *name, const char *classname, void *addobj, Int_t bufsize=32000, Int_t splitlevel=99) |
virtual TBranch * | BranchOld (const char *name, const char *classname, void *addobj, Int_t bufsize=32000, Int_t splitlevel=1) |
virtual TBranch * | Branch (const char *name, const char *classname, void *addobj, Int_t bufsize=32000, Int_t splitlevel=99) |
virtual TBranch * | Branch (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 TBasket * | CreateBasket (TBranch *br) |
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 | 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 TBasket * | CreateBasket (TBranch *br) |
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) |
Protected Attributes | |
Int_t | fCurrentEntry |
TString | fDB |
TString | fInsertQuery |
TString | fQuery |
TString | fTable |
TSQLResult * | fResult |
TSQLRow * | fRow |
TSQLServer * | fServer |
Bool_t | fBranchChecked |
TSQLResult * | fResult |
TSQLRow * | fRow |
TSQLServer * | fServer |
Definition at line 43 of file TTreeSQL.h.
TTreeSQL::TTreeSQL | ( | TSQLServer * | server, | |
TString | DB, | |||
const TString & | table | |||
) |
TTreeSQL::TTreeSQL | ( | TSQLServer * | server, | |
TString | DB, | |||
const TString & | table | |||
) |
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().
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().
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().
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().
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().
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().
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().
Int_t TTreeSQL::Branch | ( | TCollection * | list, | |
Int_t | bufsize = 32000 , |
|||
Int_t | splitlevel = 99 , |
|||
const char * | name = "" | |||
) | [virtual] |
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().
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.
virtual Long64_t TTreeSQL::GetEntries | ( | const char * | sel | ) | [inline, virtual] |
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] |
Reimplemented from TTree.
Definition at line 721 of file TTreeSQL.cxx.
References TTree::fReadEntry, and PrepEntry().
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 | , | |
1 | ||||
) |
void TTreeSQL::CheckBasket | ( | TBranch * | tb | ) | [protected] |
TString TTreeSQL::CreateBranches | ( | TSQLResult * | rs | ) | [protected] |
void TTreeSQL::Init | ( | ) | [protected] |
void TTreeSQL::ResetQuery | ( | ) | [protected] |
virtual void TTreeSQL::CreateBranch | ( | const TString & | branchName, | |
const TString & | typeName | |||
) | [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.
Reimplemented from TTree.
virtual Long64_t TTreeSQL::GetEntries | ( | const char * | sel | ) | [inline, virtual] |
TString TTreeSQL::GetTableName | ( | ) | [inline] |
void TTreeSQL::Refresh | ( | ) | [virtual] |
Reimplemented from TTree.
TTreeSQL::ClassDef | ( | TTreeSQL | , | |
1 | ||||
) |
Int_t TTreeSQL::fCurrentEntry [protected] |
TString TTreeSQL::fDB [protected] |
Definition at line 47 of file TTreeSQL.h.
Referenced by CheckTable(), GetColumnIndice(), and Init().
TString TTreeSQL::fInsertQuery [protected] |
TString TTreeSQL::fQuery [protected] |
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] |
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] |
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.