6 #include "StDbManager.hh"
7 #include "StDbConfigNode.hh"
12 const char* fDbName =
"Calibrations_fgt";
13 const char* fTableName =
"fgtGain";
14 const char* fFlavorName =
"ofl";
15 time_t funixTime = time(0);
19 std::cout <<
" No timestamp specified " << std::endl;
24 std::cout <<
"No database name specified" << std::endl;
28 if ( fTableName == 0 ){
29 std::cout <<
"No table name specified" << std::endl;
35 mgr->setVerbose(fDebug);
40 StDbTable* dbtable = configNode->addDbTable(fTableName);
43 std::cout <<
" No Table : " << fTableName << std::endl;
47 if ( fFlavorName != 0 ){
48 dbtable->setFlavor(fFlavorName);
49 std::cout <<
"Flavor is set as " << fFlavorName <<
" by StDbTable::setFlavor." << std::endl;
51 std::cout <<
"Flavor is NOT assigned. Default value is set as 'ofl'. " << std::endl;
52 dbtable->setFlavor(
"ofl");
55 mgr->setRequestTime(funixTime);
57 mgr->fetchDbTable(dbtable);
60 std::cout << gain->Gain[0] << std::endl;
static StDbManager * Instance()
strdup(..) is not ANSI