4 from PyCool
import cool
5 from time
import asctime,localtime
6 dbSvc = cool.DatabaseSvcFactory.databaseService()
7 db=dbSvc.openDatabase(
"COOLONL_TRIGGER/"+dbInstance)
8 folder=db.getFolder(
"/TRIGGER/LUMI/LBTIME")
9 range=guard*24*60*60*1e9
12 itr=folder.browseObjects(t1,t2,cool.ChannelSelection.all())
16 if obj.until()>tmstmp:
20 print (
"Found Run/Lumi [%i/%i] lasting from %s to %s" %\
21 (run,lb,asctime(localtime(obj.since()/1e9)),asctime(localtime(obj.until()/1e9))))
25 print (
"WARNING: No run/lumi block found for time",asctime(localtime(tmstmp/1e9)),
"in folder /TRIGGER/LUMI/LBTIME of DB COOLONL_TRIGGER/CONDBR2")