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