CMS 3D CMS Logo

List of all members | Public Member Functions | Static Private Member Functions | Private Attributes
Config._ParameterModifier Class Reference
Inheritance diagram for Config._ParameterModifier:

Public Member Functions

def __call__ (self, obj)
 
def __init__ (self, args)
 

Static Private Member Functions

def _raiseUnknownKey (key)
 

Private Attributes

 __args
 

Detailed Description

Helper class for Modifier that takes key/value pairs and uses them to reset parameters of the object

Definition at line 1709 of file Config.py.

Constructor & Destructor Documentation

◆ __init__()

def Config._ParameterModifier.__init__ (   self,
  args 
)

Definition at line 1711 of file Config.py.

1711  def __init__(self,args):
1712  self.__args = args
def __init__(self, dataset, job_number, job_id, job_name, isDA, isMC, applyBOWS, applyEXTRACOND, extraconditions, runboundary, lumilist, intlumi, maxevents, gt, allFromGT, alignmentDB, alignmentTAG, apeDB, apeTAG, bowDB, bowTAG, vertextype, tracktype, refittertype, ttrhtype, applyruncontrol, ptcut, CMSSW_dir, the_dir)

Member Function Documentation

◆ __call__()

def Config._ParameterModifier.__call__ (   self,
  obj 
)

Definition at line 1713 of file Config.py.

References Config._ParameterModifier.__args, Mixins._modifyParametersFromDict(), Config._ParameterModifier._raiseUnknownKey(), and relativeConstraints.keys.

1713  def __call__(self,obj):
1714  params = {}
1715  for k in self.__args.keys():
1716  if hasattr(obj,k):
1717  params[k] = getattr(obj,k)
1718  _modifyParametersFromDict(params, self.__args, self._raiseUnknownKey)
1719  for k in self.__args.keys():
1720  if k in params:
1721  setattr(obj,k,params[k])
1722  else:
1723  #the parameter must have been removed
1724  delattr(obj,k)
def _modifyParametersFromDict(params, newParams, errorRaiser, keyDepth="")
Definition: Mixins.py:707

◆ _raiseUnknownKey()

def Config._ParameterModifier._raiseUnknownKey (   key)
staticprivate

Definition at line 1726 of file Config.py.

Referenced by Config._ParameterModifier.__call__().

1726  def _raiseUnknownKey(key):
1727  raise KeyError("Unknown parameter name "+key+" specified while calling Modifier")
1728 

Member Data Documentation

◆ __args

Config._ParameterModifier.__args
private

Definition at line 1712 of file Config.py.

Referenced by Config._ParameterModifier.__call__().