Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:51:42

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 = "SiStripShiftAndCrosstalk_GR10_v1_express"
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         print("since =", elem.since(), ", till =", elem.till())
0028         if theIOV:
0029             print(payload.summary())
0030             print(payload.dump())
0031         else:
0032             print("error in retriving payload")
0033             
0034 db.commitTransaction()