11 const char *ins =
"INSERT INTO runcatalog VALUES ('%s', %d,"
12 " %d, %d, %d, %10.2f, '%s', '%s', '1997-01-15 20:16:28',"
13 " '1999-01-15 20:16:28', '%s', '%s')";
25 res = db->
Query(
"DELETE FROM runcatalog");
33 for (
int i = 0; i < nfiles; i++) {
34 sprintf(dataset,
"testrun_%d", i);
35 sprintf(rawfile,
"/v1/data/lead/test/run_%d.root", i);
37 sprintf(sql, ins, dataset, i, evt, evt+10000, tag, 25.5,
"test",
"lead",
38 rawfile,
"test run dummy data");
52 printf(
"\n%d files in run catalog\n", nfiles);
53 printf(
"RealTime=%f seconds, CpuTime=%f seconds\n", rtime, ctime);
R__EXTERN TRandom * gRandom
virtual Double_t Rndm()
Machine independent random number generator.
virtual TSQLResult * Query(const char *sql)=0
static TSQLServer * Connect(const char *db, const char *uid, const char *pw)
The db should be of the form: <dbms>://<host>[:<port>][/<database>], e.g.: mysql://pcroot....
Double_t RealTime()
Stop the stopwatch (if it is running) and return the realtime (in seconds) passed between the start a...
void Start(Bool_t reset=kTRUE)
Start the stopwatch.
Double_t CpuTime()
Stop the stopwatch (if it is running) and return the cputime (in seconds) passed between the start an...
void Stop()
Stop the stopwatch.