StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
eemcDb.C
1 // $Id: eemcDb.C,v 1.1 2013/01/25 16:46:49 stevens4 Exp $
2 // Descripion: a kind of swiss army knife for EEMC databases
3 // Author: Piotr A. Zolnierczuk (IUCF)
4 // Contributions: Jan Balewski (IUCF)
5 //
6 // Note: log info at the bottom now
7 //
8 #include "StDbManager.hh"
9 #include "StDbSql.hh"
10 #include "StDbConfigNode.hh"
11 #include "StDbTable.h"
12 #include "StDbXmlReader.h"
13 #include "StDbXmlWriter.h"
14 #include "StDbElementIndex.hh"
15 
16 #include <stdlib.h>
17 #include <stdio.h>
18 
19 #include <string.h>
20 #include <getopt.h>
21 #include <time.h>
22 #include <errno.h>
23 #include <unistd.h>
24 
25 
26 #include "EEmcDbIO.h"
27 #include "eemcDb.h"
28 
29 
30 const char *cvsRevision="$Revision: 1.1 $";
31 const char *keyToEverything = "jas";
32 const char *dbTimeFormat[] = {
33  "%Y-%m-%d %H:%M:%S",
34  "%Y-%m-%d %H:%M",
35  "%Y-%m-%d",
36  "%s",
37  0
38 };
39 
40 
41 // global flags
42 enum EEmcDbAction action = GetDB;
43 char *argv0 = NULL; // program name
44 char *dbPath = NULL;
45 char *dbTime = "now";
46 char *dbExpTime = NULL;
47 char *dbFile = NULL;
48 char *dbFlavor = "ofl";
49 char *dbComment = getenv("USER");
50 char *dbName = "Calibrations_eemc";
51 int dataOnlyMode = false;
52 int debugMode = false;
53 
54 static EEmcDbIOBase *
55 getDbIO(const char *preNode, const char *node, const int ndata)
56 {
57  EEmcDbIOBase *dbIO;
58  // =================== CCIO ==========================
59  if (!strncmp(node,"eemcPMTconf" ,EEmcDbMaxDbPathLen))
60  dbIO = new EEmcDbCCIO<eemcDbPMTconf>(EEMCDbMaxPmt);
61  else if(!strncmp(node,"eemcADCconf" ,EEmcDbMaxDbPathLen))
62  dbIO = new EEmcDbCCIO<eemcDbADCconf>(EEMCDbMaxAdc);
63  else if(!strncmp(node,"eemcBoxTconf",EEmcDbMaxDbPathLen))
64  dbIO = new EEmcDbCCIO<eemcDbBoxconf>(EEMCDbMaxBox);
65  else if(!strncmp(node,"eemcPMTcal" ,EEmcDbMaxDbPathLen))
66  dbIO = new EEmcDbCCIO<eemcDbPMTcal> (EEMCDbMaxPmt);
67  else if(!strncmp(node,"eemcPMTname" ,EEmcDbMaxDbPathLen))
68  dbIO = new EEmcDbCCIO<eemcDbPMTname> (EEMCDbMaxPmt);
69  else if(!strncmp(node,"eemcPMTped" ,EEmcDbMaxDbPathLen)) //
70  dbIO = new EEmcDbCCIO<eemcDbPMTped> (EEMCDbMaxAdc);
71  else if(!strncmp(node,"eemcPMTstat" ,EEmcDbMaxDbPathLen))
72  dbIO = new EEmcDbCCIO<eemcDbPMTstat>(EEMCDbMaxAdc);
73  else if(!strncmp(node,"eemcPIXcal" ,EEmcDbMaxDbPathLen))
74  dbIO = new EEmcDbCCIO<eemcDbPIXcal> (EEMCDbMaxAdc);
75  else if(!strncmp(node,"eemcPIXname" ,EEmcDbMaxDbPathLen))
76  dbIO = new EEmcDbCCIO<eemcDbPIXname> (EEMCDbMaxAdc);
77 
78  else if(!strncmp(node,"eemcCrateConf" ,EEmcDbMaxDbPathLen))
79  dbIO = new KretDbBlobSIO(ndata);
80 
81  else if(!strncmp(node,"eemcVaria" ,EEmcDbMaxDbPathLen))
82  dbIO = new KretDbBlobSIO(ndata);
83 
84  // =================== QAIO ==========================
85  else if(!strncmp(node,"eemcPMTchar" ,EEmcDbMaxDbPathLen))
86  dbIO = new EEmcDbQAIO<eemcDbPMTchar>(ndata);
87  else if(!strncmp(node,"eemcCWchar" ,EEmcDbMaxDbPathLen))
88  dbIO = new EEmcDbQAIO<eemcDbCWchar> (ndata);
89  // =================== HVIO ==========================
90  else if(!strncmp(node,"eemcHVsys" ,EEmcDbMaxDbPathLen))
91  dbIO = new EEmcDbHVIO<eemcDbHVsys> (ndata);
92  else if(!strncmp(node,"eemcHVtemp" ,EEmcDbMaxDbPathLen))
93  dbIO = new EEmcDbHVIO<eemcDbHVtemp>(ndata);
94  // =================== RunConfig ======================
95  else if(!strncmp(node,"eemcRunConfig",EEmcDbMaxDbPathLen))
96  dbIO = new EEmcDbXML<eemcDbXMLdata>(ndata);
97  // =================== Kret ==========================
98  else if(!strncmp(node,"cdev" ,EEmcDbMaxDbPathLen) ||
99  (!strncmp(preNode,"online",EEmcDbMaxDbPathLen)) && (
100  (!strncmp(node,"ETOW" ,EEmcDbMaxDbPathLen)) ||
101  (!strncmp(node,"ESMD" ,EEmcDbMaxDbPathLen)) ||
102  (!strncmp(node,"HVsys" ,EEmcDbMaxDbPathLen)) ||
103  (!strncmp(node,"testBlobS" ,EEmcDbMaxDbPathLen)) ) )
104  dbIO = new KretDbBlobSIO(ndata);
105  // =================== OTHER ==========================
106  else {
107  fprintf(stderr,"table %s/%s unknown to %s\n",preNode,node,argv0);
108  return(NULL);
109  }
110 
111 
112  if(!dbIO) {
113  fprintf(stderr,"table %s unknown to %s\n",node,argv0);
114  return(NULL);
115  }
116  return(dbIO);
117 }
118 
119 
120 int
121 printTree(FILE *out, StDbConfigNode *node , int level=0)
122 {
123  static int items=0; // to count if we have found anything
124  if(node==NULL) return items;
125  for(int i=0;i<level;i++) fprintf(out,"\t");
126  // level 0 == database name, so skip it
127  if(level>0) fprintf(out,"%s/\n",node->printName());
128  if( node->hasData() ) {
129  StDbTableIter *ti = node->getStDbTableIter();
130  StDbTable *t = NULL;
131  while( ( t = ti->next() ) ) {
132  for(int i=0;i<=level;i++) fprintf(out,"\t");
133  fprintf(out,"%s",t->printName());
134  fprintf(out,":%s",t->getCstructName());
135  fprintf(out,"\n");
136  items++;
137  }
138  }
139  (void) printTree(out,node->getFirstChildNode(),level+1);
140  (void) printTree(out,node->getNextNode() ,level );
141  return items;
142 }
143 
144 
145 
146 void
147 printHistory(FILE *out, StDbManager *mgr, StDbTable *dbTab , EEmcDbIOBase *io)
148 {
149  FILE *null = fopen("/dev/null","w");
150  int nRec=0;
151  time_t tUnix=getTimeStamp(dbTimeFormat,dbTime);
152  time_t tOld =-1;
153  fprintf(out,"\nRec BeginDate (BNL) UnixTime ValidPeriod Comment\n");
154  while( tUnix>=0) {
155  mgr->setRequestTime(tUnix);
156  int ret = mgr->fetchDbTable(dbTab);
157  if(ret>0) {
158  nRec++;
159  //printf("%d %d (%d)\n",dbTab->getTableSize(),io->getBytes(),ret);
160  io->setData(dbTab->GetTable());
161  io->write(null);
162  // time_t tdiff=(tOld>0) ? dbTab->getBeginTime()-tOld : 0;
163  time_t tdiff= dbTab->getEndTime()- dbTab->getBeginTime();
164  int sec = tdiff % 60; tdiff /= 60;
165  int min = tdiff % 60; tdiff /= 60;
166  int hour = tdiff % 24; tdiff /= 24;
167  int day = tdiff ;
168  char *tstr = new char[32];
169  time_t bt = dbTab->getBeginTime();
170  if(bt==tOld) break;
171  strftime(tstr,32,dbTimeFormat[0],localtime(&bt));
172  fprintf(out,"%-3d %.20s %d %6dday(s) %02d:%02d:%02d %s\n",
173  nRec, tstr, dbTab->getBeginTime(),
174  day,hour,min,sec, io->getComment());
175  io->resetData();
176  tOld = dbTab->getBeginTime();
177  }
178  fflush(out);
179  tUnix= dbTab->getEndTime();
180  if(tUnix>EEmcDbMaxUnixTime) break;
181  }
182 
183 }
184 
185 
186 void
187 printConfig(FILE *out, StDbManager *mgr)
188 {
189  const char *eTime="entryTime";
190  const char *vKey ="versionKey";
191  char **var;
192  int len = 0;
193 
194  StDbSql* db = (StDbSql*)mgr->findDb(dbName);
195  MysqlDb& Db = db->Db;
196  StDbBuffer& buff = db->buff;
197 
198  Db<<"select "<< vKey << "," << eTime << " from Nodes where nodeType='Config'"<<endsql;
199 
200  while(Db.Output(&buff)){ // loop over rows
201  buff.ReadArray(var,len,vKey);
202  fprintf(out,"%s : ",*var);
203  buff.ReadArray(var,len,eTime);
204  fprintf(out,"%s ",fmtSqlTime(*var));
205  fprintf(out,"\n");
206  }
207  buff.Raz();
208  Db.Release();
209 }
210 
211 static char *
212 printVersion()
213 {
214  const int vLen = strlen(cvsRevision);
215  static char *vStr = new char[vLen];
216  strncpy(vStr,cvsRevision+1,vLen-1);
217  vStr[vLen-2]=0x00;
218  return(vStr);
219 
220 }
221 
222 
223 static void
224 usage(const char *message=NULL)
225 {
226  if (message) fprintf(stderr,"%s: %s\n",argv0,message);
227  fprintf(stderr,"usage: %s --path <path> [EXTRA_OPTIONS]\n",argv0);
228  fprintf(stderr," -D|--database <name> : data base to use (default %s)\n",dbName);
229  fprintf(stderr," -p|--path <path> : full path to the table\n");
230  fprintf(stderr," -t|--time <time> : sets query time (default: now)\n");
231  fprintf(stderr," -x|--expire <time> : sets query expiration time (default: forever)\n");
232  fprintf(stderr," -F|--flavor : set database flavor (default ofl)\n");
233  fprintf(stderr," -f|--file <file> : set file name for I/O (default: stdin/stdout)\n");
234  fprintf(stderr," -g|-r|--get|--read : get (read) data from database (default)\n");
235  fprintf(stderr," -s|-w|--set|--write : set (write) data to database\n");
236  fprintf(stderr," -c|--comment <txt> : set db comment (default user id)\n");
237  fprintf(stderr," -T|--tree : print config tree\n");
238  fprintf(stderr," -H|--history : print time line for node\n");
239  fprintf(stderr," -C|--config : print available config versions\n");
240  fprintf(stderr," -d|--dataonly : don't write #node/table line, just the data\n");
241  fprintf(stderr," -v|--verbose : set verbose mode on\n");
242  fprintf(stderr," -q|--quiet : set quiet mode on\n");
243  //fprintf(stderr," -w|--noWrite : don't write #node/table line to the output\n");
244  fprintf(stderr," -h|--help : this short help\n");
245  fprintf(stderr," supported time formats (cf. man date):\n");
246  for(int i=0; dbTimeFormat[i]!=NULL ; i++ ) {
247  const int MLEN=128;
248  char tmpstr[MLEN];
249  time_t t = time(0);
250  strftime(tmpstr,MLEN,dbTimeFormat[i],gmtime(&t));
251  fprintf(stderr," %-20s e.g.: %s\n",dbTimeFormat[i],tmpstr);
252  }
253  fprintf(stderr,"%s\n",printVersion());
254  if(message) exit(-1);
255  return;
256 }
257 
258 //---------------------------------------------------------------------
259 //---------------------------------------------------------------------
260 //---------------------------------------------------------------------
261 int
262 main(int argc, char *argv[])
263 {
264  extern char *optarg;
265  int optInd = 0;
266  char optChar = 0;
267 
268  static struct option optLong[] = {
269  { "database" , 1 , 0 , 'D' },
270  { "path" , 1 , 0 , 'p' },
271  { "time" , 1 , 0 , 't' },
272  { "expiration" , 1 , 0 , 'x' },
273  { "flavor" , 1 , 0 , 'F' },
274  { "file" , 1 , 0 , 'f' },
275  { "get" , 0 , (int *)&action , GetDB },
276  { "read" , 0 , (int *)&action , GetDB },
277  { "set" , 0 , (int *)&action , SetDB },
278  { "write" , 0 , (int *)&action , SetDB },
279  { "tree" , 0 , (int *)&action , PrintTree },
280  { "history" , 0 , (int *)&action , PrintHistory },
281  { "config" , 0 , (int *)&action , PrintConfig },
282  { "comment" , 1 , 0 , 'c' },
283  { "verbose" , 0 , &verboseMode , true},
284  { "quiet" , 0 , &verboseMode , false},
285  { "dataonly" , 0 , &dataOnlyMode , true},
286  { "debug" , 0 , &debugMode , true},
287  { "help" , 0 , 0 , 'h' },
288  { 0, 0, 0, 0}
289  };
290 
291 
292  // cout << indexFromString("05TB01" ) << endl;
293  // cout << indexFromString("P05TB01") << endl;
294  // cout << indexFromString("05P1" ,kEEmcMaxSect*kEEmcMaxBox) << endl;
295  // cout << indexFromString("E05TB",kEEmcMaxSect*kEEmcMaxBox) << endl;
296  // cout << indexFromString("12TB13" ) << endl;
297  // cout << indexFromString("V12TB13") << endl;
298  // cout << indexFromString("13TG" ,kEEmcMaxSect*kEEmcMaxBox) << endl;
299  // cout << indexFromString("A13TG" ,kEEmcMaxSect*kEEmcMaxBox) << endl;
300  // exit(0);
301 
302  // arguments and init
303  argv0 = strrchr(argv[0],'/');
304  argv0 = ( argv0 == NULL ) ? argv[0] : ++argv0 ;
305 
306  while((optChar = getopt_long(argc,argv,"D:p:t:x:F:f:c:grswTHCdvqh",optLong,&optInd)) != EOF) {
307  switch(optChar) {
308  case 0 : break;
309  case 'D' : dbName = optarg; break;
310  case 'p' : dbPath = optarg; break;
311  case 't' : dbTime = optarg; break;
312  case 'x' : dbExpTime = optarg; break;
313  case 'F' : dbFlavor = optarg; break;
314  case 'f' : dbFile = optarg; break;
315  case 'r' : // same as g
316  case 'g' : action = GetDB; break;
317  case 'w' : // same as s
318  case 's' : action = SetDB; break;
319  case 'T' : action = PrintTree; break;
320  case 'H' : action = PrintHistory; break;
321  case 'C' : action = PrintConfig; break;
322  case 'c' : dbComment = optarg; break;
323  case 'd' : dataOnlyMode= true; break;
324  case 'v' : verboseMode = true; break;
325  case 'q' : quietMode = true; break;
326  case 'h' : usage(); return(0); break;
327  default : usage("unknown option"); break;
328  };
329  }
330  if(!dbPath && action!=PrintConfig ) usage("database path missing");
331 
332 
333  //
335  StDbConfigNode *dbNode = NULL;
336  StDbTable *dbTab = NULL;
337  char *node = NULL;
338  FILE *file = NULL;
339 
340  mgr->setVerbose(verboseMode);
341  mgr->setQuiet(quietMode);
342 
343  // sanity check
344  if( ! mgr->findDefaultServer() ) {
345  fprintf(stderr,"cannot find the default DB server\n");
346  return(-1);
347  }
348 
349  if(dbFile) {
350  file = fopen(dbFile,(action==SetDB) ? "r" : "w");
351  if(!file) {
352  fprintf(stderr,"%s: fopen '%s' failed, %s\n",argv0,dbFile,strerror(errno));
353  return(-1);
354  }
355  } else {
356  file = (action==SetDB) ? stdin : stdout;
357  }
358 
359  switch(action) {
360  case PrintTree:
361  node = node=strsep(&dbPath,"/");
362  if(node) {
363  dbNode = mgr->initConfig(dbName,node);
364  if(dbNode) {
365  if(verboseMode || !quietMode)
366  fprintf (file,"DATABASE TREE:\n");
367  fprintf (file,"%s/\n",node);
368  if(printTree(file,dbNode)<=0) {
369  fprintf (stderr,"config %s is empty\n",node);
370  }
371  }
372  }
373  return 0;
374  break;
375  case PrintConfig:
376  if(verboseMode || !quietMode)
377  fprintf(file,"DATABASE VERSIONS:\n");
378  printConfig(file,mgr);
379  return 0;
380  default:
381  break;
382  }
383 
384 
385  // parse database path
386  char *preNode="";
387  while( (node=strsep(&dbPath,"/")) != NULL ) {
388  StDbConfigNode *tn = (dbNode==NULL) ?
389  mgr->initConfig(dbName,node) : dbNode->findConfigNode(node);
390  if(!tn) break; // assume the last token is a db table
391  dbNode = tn;
392  printf("found database node: %s\n",node);
393  preNode=node;
394  }
395 
396  if(!node) usage("invalid path");
397 
398  dbTab = dbNode->findTable(node);
399  if(!dbTab) { fprintf(stderr,"%s: table %s not found\n",argv0,node); return (-1); }
400 
401  dprintf("found table: %s\n",node);
402 
403  int nrows=dbTab->GetNRows();
404  int ndata=0;
405 
406  EEmcDbIOBase *dbIO = getDbIO(preNode,node,nrows);
407  if(dbIO==NULL) return(-1);
408 
409  char keyLine[EEmcDbMaxDbPathLen];
410  //char keyFile[EEmcDbMaxKeyLength];
411  char keyBase[EEmcDbMaxKeyLength];
412  time_t tUnix = getTimeStamp(dbTimeFormat,dbTime);
413  time_t tExpUnix = (dbExpTime!=NULL) ? getTimeStamp(dbTimeFormat,dbExpTime) : 0;
414 
415  dbTab->setFlavor(dbFlavor);
416  switch(action) {
417  case PrintHistory:
418  printHistory(file,mgr,dbTab,dbIO);
419  return 0;
420  break;
421  case SetDB:
422  fgets (keyLine,EEmcDbMaxDbPathLen-1,file);
423  sprintf(keyBase,EEmcDbKeyFormat,dbNode->printName(),node);
424  printf("AAA=%s=\n",keyBase);
425  if(strstr(keyLine,keyBase)==0 && strcmp(keyLine,keyToEverything) ) {
426  fprintf(stderr,"signature mismatch: data file key '%s', required '%s'\n",
427  keyLine,keyBase);
428  return (-1);
429  }
430 
431  dbIO->setComment(dbComment);
432 
433  ndata = dbIO->read(file);
434  if(ndata<=0) {
435  fprintf(stderr,"%s: reading file %s failed\n",argv0,dbFile);
436  return(-1);
437  }
438  if(nrows>1) {
439  dbTab->SetTable(dbIO->getData(),ndata, dbIO->getIndices());
440  } else {
441  dbTab->SetTable(dbIO->getData(),ndata);
442  }
443  if(tExpUnix>0) {
444  dbTab->setEndStoreTime(tExpUnix);
445  fprintf(stderr,"%s: setting end time %ld\n",argv0,tExpUnix);
446  }
447 
448  //mgr->setStoreTime(getTimeStamp(dbTimeFormat,dbTime));
449  mgr->setStoreTime(tUnix);
450  if(! mgr->storeDbTable(dbTab) ) {
451  fprintf(stderr,"%s: storing table %s failed\n",argv0,node);
452  return(-1);
453  }
454 
455  break;
456  case GetDB:
457  mgr ->setRequestTime(tUnix);
458  if( ! mgr->fetchDbTable(dbTab) ) {
459  fprintf(stderr,"%s: problem with fetch for time stamp %ld / %s",argv0,tUnix,ctime(&tUnix));
460  fprintf(stderr," There is no record for this table over the time period :\n");
461  fprintf(stderr," BeginDate = %s\t",dbTab->getBeginDateTime());
462  fprintf(stderr," EndDate = %s\n",dbTab->getEndDateTime());
463  fprintf(stderr," BeginTimeUnix = %d\t",dbTab->getBeginTime());
464  fprintf(stderr," EndTimeUnix = %d\n",dbTab->getEndTime());
465  return(-1);
466  }
467  if(! dbTab->GetTable() ) {
468  fprintf(stderr,"no data found in table %s\n",node);
469  return(-1);
470  }
471  dbIO->setData(dbTab->GetTable());
472 
473  if(verboseMode || !quietMode)
474  fprintf(stderr,"BNL Time Stamp Range from: %s to: %s \n",
475  fmtSqlTime(dbTab->getBeginDateTime()),fmtSqlTime(dbTab->getEndDateTime()));
476  if(!dataOnlyMode) {
477  fprintf(file,EEmcDbKeyFormat,dbNode->printName(),node);
478  fprintf(file,"\n");
479  }
480  ndata = dbIO->write(file);
481  dbComment = dbIO->getComment();
482  if(verboseMode || !quietMode)
483  fprintf(stderr,"COMMENT: %s\n",dbComment);
484  break;
485  default:
486  break;
487  }
488 
489  if(ndata>0) {
490  dprintf("database access successful %d\n",ndata);
491  } else {
492  fprintf(stderr,"%s: table %s access failed\n",argv0,node);
493  }
494 
495 
496  fclose(file);
497  return 0;
498 }
499 
500 
501 // $Log: eemcDb.C,v $
502 // Revision 1.1 2013/01/25 16:46:49 stevens4
503 // Scripts used to upload EEMC tables to the DB
504 //
505 // Revision 1.17 2004/03/23 15:01:47 balewski
506 // access to eemcVaria table
507 //
508 // Revision 1.16 2003/11/30 04:18:52 zolnie
509 // pix db names fixed
510 //
511 // Revision 1.15 2003/11/30 04:16:17 zolnie
512 // PIX dbases in eemcdb
513 //
514 // Revision 1.14 2003/10/28 21:18:49 zolnie
515 // updates for Run2004
516 //
517 // Revision 1.13 2003/09/12 16:44:35 zolnie
518 // further gcc3.2 updates
519 //
520 // Revision 1.12 2003/08/29 20:21:02 zolnie
521 // flavor additons to the Tcl/Tk code, work on history with flavors
522 //
523 // Revision 1.11 2003/08/29 17:08:17 zolnie
524 // small fix in tExpTime
525 //
526 // Revision 1.10 2003/08/29 17:07:22 zolnie
527 // added: flavor and expiration time flag
528 //
529 // Revision 1.9 2003/08/19 18:56:32 zolnie
530 // added PMTstat table
531 //
532 // Revision 1.8 2003/08/07 16:33:23 zolnie
533 // replaced confusing --noWrite/-w option with a clearer one: --dataonly/-d
534 //
535 // Revision 1.7 2003/06/03 06:29:15 zolnie
536 // fixed time zone problem
537 //
538 // Revision 1.6 2003/04/11 18:27:57 balewski
539 // add -w option to prohibit writing of the '#node/table' string to the output
540 //
541 // Revision 1.5 2003/04/11 18:04:47 balewski
542 // add I/O for PMTname
543 //
544 // Revision 1.4 2003/04/10 21:44:25 zolnie
545 // *** empty log message ***
546 //
547 // Revision 1.3 2003/02/14 19:52:29 zolnie
548 // fixed history bug (when update was +1s)
549 //
550 // Revision 1.2 2003/02/04 18:10:08 zolnie
551 // added eemcHVtemp online database
552 //
553 // Revision 1.1 2003/01/28 23:22:18 balewski
554 // start
555 //
556 // Revision 1.43 2003/01/28 22:35:00 zolnie
557 // make sure quiet is quiet (once more)
558 //
559 // Revision 1.42 2003/01/25 21:15:15 balewski
560 // allow the 'keyBase' to be embeded in any string in the firts input line,
561 // e.g. <xml target="#online/cdev/" >,
562 // to simplyfy remote execution of eemcDB with string Blob input
563 //
564 // Revision 1.41 2003/01/25 20:09:19 balewski
565 // add BlobS, remove old kret*
566 //
567 // Revision 1.40 2003/01/24 20:54:32 zolnie
568 // merger with Jan + updates for "HVindex" stuff
569 //
570 // Revision 1.39 2003/01/24 16:44:48 balewski
571 // added WCM+someRing online info
572 //
573 // Revision 1.38 2003/01/22 02:31:57 balewski
574 // small fix
575 //
576 // Revision 1.37 2003/01/21 23:47:40 balewski
577 // HVsys table added
578 //
579 // Revision 1.36 2003/01/13 18:20:49 zolnie
580 // modified history time to be local rather than GMT
581 //
582 // Revision 1.35 2003/01/10 20:51:02 zolnie
583 // small bug when creating a table from scratch
584 //
585 // Revision 1.34 2003/01/10 20:43:34 zolnie
586 // *** empty log message ***
587 //
588 // Revision 1.33 2003/01/10 18:48:34 zolnie
589 // submision version
590 //
591 // Revision 1.32 2003/01/10 05:57:07 zolnie
592 // little things at 1am
593 //
594 // Revision 1.31 2003/01/10 05:48:57 zolnie
595 // *** empty log message ***
596 //
597 // Revision 1.30 2003/01/10 05:21:56 zolnie
598 // version number introduced
599 //
600 // Revision 1.29 2003/01/10 05:15:36 zolnie
601 // make it really quiet when -q issued
602 //
603 // Revision 1.28 2003/01/10 04:52:04 zolnie
604 // updates to Tcl/Tk interface (czyli Zadana Pana Jana)
605 //
606 // Revision 1.27 2003/01/09 17:03:54 balewski
607 // reformating of the otput strings
608 //
609 // Revision 1.26 2003/01/09 15:26:46 zolnie
610 // *** empty log message ***
611 //
612 // Revision 1.25 2003/01/08 21:58:26 zolnie
613 // history clean-up
614 // tk interface updates
615 //
616 // Revision 1.24 2003/01/07 22:55:47 balewski
617 // -H flag added
618 //
619 // Revision 1.23 2003/01/03 23:46:40 zolnie
620 // *** empty log message ***
621 //
622 // Revision 1.22 2003/01/03 23:10:00 balewski
623 // switch to robinson
624 //
625 // Revision 1.21 2003/01/03 21:14:49 zolnie
626 // fixed string packing in EEmcDbCCIO<T>::read(FILE *f)
627 // added resetString
628 // first version of tkEEmcDb
629 //
630 // Revision 1.20 2003/01/03 16:40:13 zolnie
631 // added comment field
632 //
633 // Revision 1.19 2002/12/03 17:58:43 balewski
634 // added PMTped , VerC
635 //
636 // Revision 1.17 2002/11/14 19:22:26 zolnie
637 // working version of mkHVDB
638 //
639 // Revision 1.16 2002/11/13 20:12:34 zolnie
640 // towards (semi)(stable?) final solution
641 //
642 // Revision 1.15 2002/11/11 22:54:02 zolnie
643 // fixed a number of bugs in perl scripts (mainly in digestPmtConf.pl)
644 // patchy version of mkHVDB
645 // updated *.hh files
646 //
647 // Revision 1.14 2002/11/05 17:51:03 zolnie
648 // "characterization" updates
649 //
650 // Revision 1.13 2002/11/01 23:29:33 zolnie
651 // *** empty log message ***
652 //
653 // Revision 1.12 2002/11/01 20:47:39 zolnie
654 // added: file parameter added
655 // help updated
656 //
657 // Revision 1.11 2002/11/01 19:47:45 zolnie
658 // fixed bug: logical conditions in read/write_db were reversed
659 //
660 // Revision 1.10 2002/11/01 19:23:18 zolnie
661 // use templates in eemcDbOp
662 //
663 // Revision 1.9 2002/11/01 14:49:48 balewski
664 //
665 // ADCconf works
666 //
667 // Revision 1.8 2002/11/01 14:34:06 zolnie
668 // shorten EEMCDbMaxName from 32 to 16
669 //
670 // Revision 1.7 2002/11/01 14:18:12 balewski
671 // walka z ADC conf
672 //
673 // Revision 1.6 2002/10/31 22:13:24 zolnie
674 // bug fixed in eemcConstDB.hh (algebra problem)
675 //
676 // Revision 1.5 2002/10/31 20:44:30 zolnie
677 // for Jas
678 //
679 // Revision 1.4 2002/10/31 15:58:27 zolnie
680 // structure field naming bug fixed in eemcDbPMTcal
681 //
682 // Revision 1.3 2002/10/30 22:48:32 zolnie
683 // new dbase manipulation updates
684 //
685 // Revision 1.2 2002/10/30 15:56:29 zolnie
686 // updated help info
687 //
virtual void SetTable(char *data, int nrows, int *idList=0)
calloc&#39;d version of data for StRoot
Definition: StDbTable.cc:550
static StDbManager * Instance()
strdup(..) is not ANSI
Definition: StDbManager.cc:155