3 #include "StDbManager.hh"
4 #include "StDbManager.hh"
5 #include "StDbConfigNode.hh"
7 #include "StDbXmlReader.h"
8 #include "StDbXmlWriter.h"
9 #include "StDbElementIndex.hh"
16 #include "kretDbBlobS.hh"
24 StDbConfigNode* nodeHead = mgr->initConfig(dbConditions,dbEemc,
"VerA");
25 assert(nodeHead); printf(
"node found 1\n");
28 assert(nodeOnl); printf(
"node found 2\n");
30 printf(
"access DB table ...");
32 tab = nodeOnl->addDbTable(
"ETOW");
35 if(tab->GetNRows()<=0) {
36 printf(
"JB: FAILED : tab->GetNRows()=%d\n",tab->GetNRows());
return 0;
38 elist = tab->getElementID(nrows);
39 printf(
"nrows=%d, elis=%d\n", nrows,*elist);
44 strncpy(blob.comment,
"comJ1 AA",KRETDbMaxComment);
45 strncpy(blob.dataS,
"bodyJ1 AA",KRETmxBlobSlen);
49 unsigned int tStore=(
unsigned int) time(0);
51 printf(
"JB: time Store=%s",ctime((
const time_t *)&tStore));
52 mgr->setStoreTime(tStore);
57 printf(
"write DB table ...");
58 int ret= mgr->storeDbTable(tab);
60 printf(
"JB: storeTables() done\n");
62 printf(
"JB: Some problems with storeDbTable() ???\n" );
virtual void SetTable(char *data, int nrows, int *idList=0)
calloc'd version of data for StRoot
static StDbManager * Instance()
strdup(..) is not ANSI