Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 09:37:35

0001 from __future__ import print_function
0002 import DLFCN, sys, os
0003 sys.setdlopenflags(DLFCN.RTLD_GLOBAL+DLFCN.RTLD_LAZY)
0004 import pluginCondDBPyInterface as condDB
0005 a = condDB.FWIncantation()
0006 rdbms = condDB.RDBMS()
0007 conn = "frontier://FrontierPrep/CMS_COND_STRIP" # for develoment DB
0008 conn = "frontier://FrontierInt/CMS_COND_STRIP" # for integration DB (as agreed to do tests)
0009 conn = "frontier://PromptProd/CMS_COND_31X_STRIP"
0010 db = rdbms.getReadOnlyDB(conn)
0011 tag = "SiStripLatency_GR10_v2_hlt"
0012 db.startReadOnlyTransaction()
0013 iov = db.iov(tag)
0014 # print list(db.payloadModules(tag))
0015 Plug = __import__(str(db.payloadModules(tag)[0]))
0016 payload = Plug.Object(db)
0017 listOfIovElem= [iovElem for iovElem in iov.elements]
0018 
0019 runNumber = 0
0020 
0021 if len(sys.argv) >= 2:
0022     runNumber = int(sys.argv[1])
0023 
0024 for elem in iov.elements:
0025     if runNumber==0 or (runNumber >= elem.since() and runNumber <= elem.till()):
0026         theIOV = payload.load(elem)
0027         if theIOV:
0028             payload.dumpXML("dump_"+str(elem.since())+".xml")
0029             if payload.summary().find("PEAK") != -1:
0030                 print("since =", elem.since(), ", till =", elem.till(), "--> peak mode")
0031             elif payload.summary().find("DECO") != -1:
0032                 print("since =", elem.since(), ", till =", elem.till(), "--> deco mode")
0033             else:
0034                 print("since =", elem.since(), ", till =", elem.till(), "--> mixed mode")
0035         else:
0036             print("error in retriving payload")
0037             
0038 db.commitTransaction()