Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:02:41

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 = "SiStripBadChannel_FromOfflineCalibration_GR10_v1_prompt"
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 if len(sys.argv) < 2:
0020     print("Please specify the IOV (run number)")
0021     sys.exit()
0022 
0023 runNumber = int(sys.argv[1])
0024 
0025 for elem in iov.elements:
0026     # print elem.since()
0027     # print elem.till()
0028     if runNumber >= elem.since() and runNumber <= elem.till():
0029         theIOV = payload.load(elem)
0030         print("since =", elem.since(), ", till =", elem.till())
0031         if theIOV:
0032             # print payload.summary()
0033             print(payload.summary())
0034             print(payload.dump())
0035 db.commitTransaction()