4 gSystem->Load(
"St_base");
5 gSystem->Load(
"StChain");
6 gSystem->Load(
"StUtilities");
7 gSystem->Load(
"StIOMaker");
8 gSystem->Load(
"StarClassLibrary");
11 gSystem->Load(
"St_Tables");
12 gSystem->Load(
"StDbLib");
13 gSystem->Load(
"StDbBroker");
14 gSystem->Load(
"St_db_Maker");
18 dbMk->SetDateTime(20111001,0);
19 dbMk->SetFlavor(
"ofl");
25 DB = dbMk->GetDataBase(
"Calibrations/fgt/fgtElosCutoff");
27 std::cout <<
"ERROR: no table found in db, or malformed local db config" << std::endl;
31 St_fgtElosCutoff *dataset = 0;
32 dataset = (St_fgtElosCutoff*) DB->
Find(
"fgtElosCutoff");
33 Int_t rows = dataset->GetNRows();
35 std::cout <<
"INFO: found INDEXED table with " << rows <<
" rows" << std::endl;
39 fgtElosCutoff_st *table = dataset->GetTable();
40 std::cout << setprecision(10);
41 for (
int i = 0; i < 10000; i++) {
42 std::cout << i <<
"th channel: " << table[0]->cutoff[i] << std::endl;
44 std::cout <<
"COMMENT: " << table[0]->comment << std::endl;
46 std::cout <<
"ERROR: dataset does not contain requested table" << std::endl;
virtual TDataSet * Find(const char *path) const