Fill run catalog with nfiles entries
Based on sqlfill.C by Sergey Linev
from ROOT import TSQLServer, TSQLResult, TStopwatch, gRandom
nfiles = 1000
ins = "INSERT INTO runcatalog VALUES ('%s', %d," \
" %d, %d, %d, %10.2f, '%s', '%s', '1997-01-15 20:16:28'," \
" '1999-01-15 20:16:28', '%s', '%s')"
tag = evt = 0
res =
db.Query(
"DELETE FROM runcatalog")
dataset = "testrun_%d" % i
rawfile = "/v1/data/lead/test/run_%d.root" % i
sql = ins % (dataset, i, evt, evt + 10000, tag, 25.5, "test", "lead",
rawfile, "test run dummy data")
evt += 10000
print("")
print("%d files in run catalog" % nfiles)
print("RealTime=%f seconds, CpuTime=%f seconds" % (rtime, ctime))
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
- Author
- Juan Fernando Jaramillo Botero
Definition in file sqlfilldb.py.