7 if (gClassTable->GetID(
"StDbManager") < 0) {
9 gSystem->Load(
"libTable");
10 gSystem->Load(
"St_base");
11 gSystem->Load(
"StChain");
12 gSystem->Load(
"StUtilities");
17 gSystem->Load(
"St_Tables.so");
18 gSystem->Load(
"StDbLib.so");
19 gSystem->Load(
"StDbBroker.so");
20 gSystem->Load(
"St_db_Maker.so");
28 void Db_PrintTable(
const Char_t *tabNam =
"Calibrations/ftpc/ftpcCoordTrans",
29 Int_t date = 20040227,
31 fprintf(stderr,
" 0. cout = %x \n", (
void*)cout);
32 if (dbMk == 0) Load();
33 dbMk->SetDateTime(date,time);
34 fprintf(stderr,
" 1. cout = %x \n",(
void*) cout);
37 const char* dbs[] = {
"Geometry",
"Calibrations",
"RunLog",
"Conditions",0};
38 for(
int i=0;dbs[i]!=0;i++)dbMk->GetDataBase(dbs[i]);
41 TDataSet *set = dbMk->GetDataBase(gSystem->DirName(tabNam));
42 table = (
TTable *) set->
Find(gSystem->BaseName(tabNam));
45 dbMk->GetValidity(table,t);
46 cout <<
"Validity:" << t[0].GetDate() <<
"/" << t[0].GetTime()
47 <<
" ----- " << t[1].GetDate() <<
"/" << t[1].GetTime() << endl;
49 if (Nrows > 10) Nrows = 10;
50 table->
Print(0,Nrows);
52 TString name(gSystem->BaseName(tabNam));
53 name += Form(
".%06i.%06i.root",t[0].GetDate(),t[0].GetTime());
54 TFile *f =
new TFile(name.Data(),
"RECREATE");
59 else cout <<
"Table:" << tabNam <<
" has not been found" << endl;
61 fprintf(stderr,
" 2. cout = %x \n",(
void*) cout);
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
virtual Long_t GetNRows() const
Returns the number of the used rows for the wrapped table.
virtual Char_t * Print(Char_t *buf, Int_t n) const
Create IDL table defintion (to be used for XDF I/O)
virtual TDataSet * Find(const char *path) const