test
CMS 3D CMS Logo

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

Classes

class  _ConfigureComponent
 
class  _Labelable
 
class  _Parameterizable
 
class  _ParameterTypeBase
 
class  _SimpleParameterTypeBase
 
class  _TypedParameterizable
 
class  _Unlabelable
 
class  _ValidatingListBase
 
class  _ValidatingParameterListBase
 
class  PrintOptions
 
class  TestList
 
class  testMixins
 
class  UsingBlock
 

Functions

def _modifyParametersFromDict
 
def saveOrigin
 

Function Documentation

def Mixins._modifyParametersFromDict (   params,
  newParams,
  errorRaiser,
  keyDepth = "" 
)
private

Definition at line 613 of file Mixins.py.

References reco::JetExtendedAssociation.setValue().

Referenced by Config._ParameterModifier.__call__(), and Mixins._TypedParameterizable.clone().

614 def _modifyParametersFromDict(params, newParams, errorRaiser, keyDepth=""):
615  if len(newParams):
616  #need to treat items both in params and myparams specially
617  for key,value in newParams.iteritems():
618  if key in params:
619  if value is None:
620  del params[key]
621  elif isinstance(value, dict):
622  if isinstance(params[key],_Parameterizable):
623  pset = params[key]
624  p =pset.parameters_()
626  value,errorRaiser,
627  keyDepth+"."+key)
628  for k,v in p.iteritems():
629  setattr(pset,k,v)
630  else:
631  raise ValueError("Attempted to change non PSet value "+keyDepth+" using a dictionary")
632  elif isinstance(value,_ParameterTypeBase):
633  params[key] =value
634  else:
635  params[key].setValue(value)
636  else:
637  if isinstance(value,_ParameterTypeBase):
638  params[key]=value
639  else:
640  errorRaiser(key)
641 
bool setValue(Container &, const reco::JetBaseRef &, const JetExtendedData &)
associate jet with value. Returns false and associate nothing if jet is already associated ...
def _modifyParametersFromDict
Definition: Mixins.py:613
def Mixins.saveOrigin (   obj,
  level 
)

Definition at line 604 of file Mixins.py.

Referenced by Modules.ESSource.__init__(), Modules._Module.__init__(), Mixins._TypedParameterizable.__init__(), and Mixins._TypedParameterizable.clone().

605 def saveOrigin(obj, level):
606  #frame = inspect.stack()[level+1]
607  frame = inspect.getframeinfo(inspect.currentframe(level+1))
608  # not safe under old python versions
609  #obj._filename = frame.filename
610  #obj._lineNumber = frame.lineno
611  obj._filename = frame[0]
612  obj._lineNumber = frame[1]
def saveOrigin
Definition: Mixins.py:604