Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:01:43

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_21X_RUN_INFO"
0011 logName = "oracle://cms_orcoff_prod/CMS_COND_21X_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 
0019 # for inspecting last run after run has started  
0020 tag = 'runstart_test'
0021 
0022 # for inspecting last run after run has stopped  
0023 #tag = 'runsummary_test'
0024 
0025 try :
0026     log = db.lastLogEntry(tag)
0027     #for printing all log info present into log db 
0028     #print log.getState()
0029 
0030     # for inspecting all payloads/runs
0031     #iov = inspect.Iov(db,tag)
0032 
0033     #for inspecting only last payload/run
0034     iov = inspect.Iov(db,tag,0,0,0,1)
0035     print(iov.list())
0036     for x in  iov.summaries():
0037         print(x[1], x[2] ,x[3])
0038     #        print iov.trend("",[0,2,12])
0039 except RuntimeError :
0040     print(" no iov? in", tag)
0041 
0042