Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:50:39

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