Exemple #1
0
def getxrdMonitoringInTimeWindowForMultiplePlotsJSON(parList):
    # logger.info('in getxrdMonitoringInTimeWindowForMultiplePlotsJSON')
    
    allData = {'data' : [], "tstop": parList[0].TStop, "tstart": parList[0].TStart} 
    for pars in parList:
        pars.orderby = 'order by xTime'
        data = popDB.xrdStatInTimeWindow(pars)        
        points = [ (a['MILLISECONDSSINCEEPOCH'], float(a[pars.yval]) ) for a in data['DATA']  ]
        allData['data'].append({'name': pars.name , 'data':points})

    # logger.info(parList)
    # logger.info(allData)
    jdata = json.dumps(allData)
    return jdata
def getxrdMonitoringInTimeWindowForMultiplePlotsJSON(parList):
    # logger.info('in getxrdMonitoringInTimeWindowForMultiplePlotsJSON')

    allData = {
        'data': [],
        "tstop": parList[0].TStop,
        "tstart": parList[0].TStart
    }
    for pars in parList:
        pars.orderby = 'order by xTime'
        data = popDB.xrdStatInTimeWindow(pars)
        points = [(a['MILLISECONDSSINCEEPOCH'], float(a[pars.yval]))
                  for a in data['DATA']]
        allData['data'].append({'name': pars.name, 'data': points})

    # logger.info(parList)
    # logger.info(allData)
    jdata = json.dumps(allData)
    return jdata
Exemple #3
0
def getxrdMonitoringInTimeWindowJSON(pars):
    data = popDB.xrdStatInTimeWindow(pars)
    logger.info('got data')
    jdata = json.dumps(data)
    return jdata
def getxrdMonitoringInTimeWindowJSON(pars):
    data = popDB.xrdStatInTimeWindow(pars)
    logger.info('got data')
    jdata = json.dumps(data)
    return jdata