Пример #1
0
 def __init__(self, connectionString, authPath):
     """
     Parameters:
     connectionString: connection string for connecting to the account hosting Global Tags;
     authPath: path to authentication key.
     """
     self._globalTagName = None
     checkConnectionString(connectionString)
     self._connectionString = connectionString
     self._authPath = authPath
     self._dbStarted = False
     self.fwLoad = condDB.FWIncantation()
Пример #2
0
 def __init__(self, connectionString, authPath):
     """Parameters:
     connectionString: connection string for connecting to the account hosting Global Tags;
     authPath: path to authentication key.
     """
     checkConnectionString(connectionString)
     self._connectionString = str(
         connectionString
     )  # ensure we pass on a string even if we get a unicode object
     self._authPath = authPath
     self._dbStarted = False
     self._fwLoad = condDB.FWIncantation()
Пример #3
0
 def __init__(
         self,
         authPath=None,
         dbName=config.stripCondDB
     #, dbName = "oracle://cms_orcoff_prod/CMS_COND_30X_ECAL"
     ,
         tablePath=None):
     if not tablePath:
         tablePath = config.folders.table_dir
     if not authPath:
         authPath = config.db_data.auth_path
     self.authPath = authPath
     self.dbName = dbName
     self.a = CondDB.FWIncantation()
     self.initDB()
     self.tablePath = tablePath
     self.dateformat = config.general.date_format
Пример #4
0
    def _initGT(self, authpath=None, global_tag_schema=None, log_schema=None):
        '''Iniciate connection to DB containing information about GT'''

        #if auth path not given - take from constructor variable
        if (authpath == None):
            authpath = self.authpath
        else:
            self.authpath = authpath

        if (global_tag_schema == None):
            global_tag_schema = self.global_tag_schema
        else:
            self.global_tag_schema = global_tag_schema

        if (log_schema == None):
            log_schema = self.log_schema
        else:
            self.log_schema = log_schema

        self.framework_incantation = condDB.FWIncantation()
        self.rdbms = condDB.RDBMS(self.authpath)
        self.rdbms.setLogger(self.log_schema)
Пример #5
0
from __future__ import print_function
import DLFCN, sys, os
sys.setdlopenflags(DLFCN.RTLD_GLOBAL + DLFCN.RTLD_LAZY)
import pluginCondDBPyInterface as condDB
a = condDB.FWIncantation()
rdbms = condDB.RDBMS()
conn = "frontier://FrontierPrep/CMS_COND_STRIP"  # for develoment DB
conn = "frontier://FrontierInt/CMS_COND_STRIP"  # for integration DB (as agreed to do tests)
conn = "frontier://PromptProd/CMS_COND_31X_STRIP"
db = rdbms.getReadOnlyDB(conn)
tag = "SiStripLatency_GR10_v2_hlt"
db.startReadOnlyTransaction()
iov = db.iov(tag)
# print list(db.payloadModules(tag))
Plug = __import__(str(db.payloadModules(tag)[0]))
payload = Plug.Object(db)
listOfIovElem = [iovElem for iovElem in iov.elements]

runNumber = 0

if len(sys.argv) >= 2:
    runNumber = int(sys.argv[1])

for elem in iov.elements:
    if runNumber == 0 or (runNumber >= elem.since()
                          and runNumber <= elem.till()):
        theIOV = payload.load(elem)
        if theIOV:
            payload.dumpXML("dump_" + str(elem.since()) + ".xml")
            if payload.summary().find("PEAK") != -1:
                print("since =", elem.since(), ", till =", elem.till(),
Пример #6
0
 def __init__(self, dbName, authPath="."):
     self.dbName = dbName
     self.authPath = authPath
     self.a = condDB.FWIncantation()
     self.initDB()