LSSTApplications  10.0-2-g4f67435,11.0.rc2+1,11.0.rc2+12,11.0.rc2+3,11.0.rc2+4,11.0.rc2+5,11.0.rc2+6,11.0.rc2+7,11.0.rc2+8
LSSTDataManagementBasePackage
Functions
lsst.pex.config.convert Namespace Reference

Functions

def makePropertySet
 
def makePolicy
 

Function Documentation

def lsst.pex.config.convert.makePolicy (   config)

Definition at line 41 of file convert.py.

41 
42 def makePolicy(config):
43  def _helper(dict_):
45  for k,v in dict_.iteritems():
46  if isinstance(v, dict):
47  p.set(k, _helper(v))
48  elif isinstance(v, list):
49  for vi in v:
50  p.add(k, vi)
51  elif v is not None:
52  p.set(k, v)
53  return p
54  if config:
55  return _helper(config.toDict())
56  else:
57  return None
a container for holding hierarchical configuration data in memory.
Definition: Policy.h:169
def lsst.pex.config.convert.makePropertySet (   config)

Definition at line 25 of file convert.py.

25 
26 def makePropertySet(config):
27  def _helper(ps, prefix, dict_):
28  for k,v in dict_.iteritems():
29  name = prefix + "." + k if prefix is not None else k
30  if isinstance(v, dict):
31  _helper(ps, name, v)
32  elif v is not None:
33  ps.set(name, v)
34 
35  if config is not None:
37  _helper(ps, None, config.toDict())
38  return ps
39  else:
40  return None
Class for storing generic metadata.
Definition: PropertySet.h:82