CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
cmssw_das_client Namespace Reference

Functions

def get_data
 
def get_value
 

Function Documentation

def cmssw_das_client.get_data (   query,
  limit = None,
  threshold = None,
  idx = None,
  host = None 
)

Definition at line 8 of file cmssw_das_client.py.

8 
9 def get_data(query, limit=None, threshold=None, idx=None, host=None):
10  cmd_opts = "--format=json"
11  if threshold is not None: cmd_opts += " --threshold=%s" % threshold
12  if limit is not None: cmd_opts += " --limit=%s" % limit
13  if idx is not None: cmd_opts += " --idx=%s" % idx
14  if host is not None: cmd_opts += " --host=%s" % host
15  err, out = getstatusoutput("das_client %s --query '%s'" % (cmd_opts, query))
16  if not err: return loads(out)
17  return {'status' : 'error', 'reason' : out}
def cmssw_das_client.get_value (   data,
  filters,
  base = 10 
)

Definition at line 5 of file cmssw_das_client.py.

5 
6 def get_value(data, filters, base=10):
7  return das_get_value(data, filters, base)