Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-11-25 02:29:19

0001 import os,sys, DLFCN
0002 sys.setdlopenflags(DLFCN.RTLD_GLOBAL+DLFCN.RTLD_LAZY)
0003 
0004 from pluginCondDBPyInterface import *
0005 a = FWIncantation()
0006 #os.putenv("CORAL_AUTH_PATH","/afs/cern.ch/cms/DB/conddb")
0007 rdbms = RDBMS("/afs/cern.ch/cms/DB/conddb")
0008 
0009 dbName =  "oracle://cms_orcoff_prod/CMS_COND_31X_RUN_INFO"
0010 logName = "oracle://cms_orcoff_prod/CMS_COND_31X_POPCONLOG"
0011 
0012 #rdbms.setLogger(logName)
0013 from CondCore.Utilities import iovInspector as inspect
0014 
0015 db = rdbms.getDB(dbName)
0016 tags = db.allTags()
0017 print("########overview of all tags########")
0018 print(tags)
0019 # for inspecting last run after run has started  
0020 tag = 'runinfo_31X_hlt'
0021 
0022 # for inspecting last run after run has stopped  
0023 #tag = 'runinfo_test'
0024 
0025 try :
0026     #log = db.lastLogEntry(tag)
0027 
0028     #for printing all log info present into log db 
0029     #print log.getState()
0030 
0031     iov = inspect.Iov(db,tag)
0032     print("########overview of tag "+tag+"########")
0033     print(iov.list())
0034     #for x in  iov.summaries():
0035     #    print x[1], x[2] ,x[3]
0036     what={}
0037     print("###(start_current,stop_current,avg_current,max_current,min_current,run_interval_micros) vs runnumber###")
0038     print(iov.trend(what))
0039     print("########(start_current,stop_current,avg_current,max_current,min_current,run_interval_micros) vs runnumber in a given range########")
0040     print(iov.trendinrange(what,109441,109503))
0041 except Exception as er :
0042     print(er)
0043 
0044