CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes | Private Attributes | Static Private Attributes
ConfigToolBase.ConfigToolBase Class Reference
Inheritance diagram for ConfigToolBase.ConfigToolBase:

Public Member Functions

def __call__
 
def __copy__
 copy(self) returns a copy of the tool More...
 
def __init__
 
def addParameter
 use addParameter method in the redefinition of tool constructor in order to add parameters to the tools each tool is defined by its label, default value, description, type and allowedValues (the last two attribute can be ignored if the user gives a valid default values and if there is not a list of allowed values) More...
 
def apply
 
def comment
 
def description
 
def dumpPython
 
def errorMessage
 
def getAllowedValues
 
def getParameters
 
def getvalue
 
def isAllowed
 method isAllowed is called by setParameter to check input values for a specific parameter More...
 
def reset
 
def setComment
 
def setParameter
 
def setParameters
 
def toolCode
 
def typeError
 check about input value type More...
 

Public Attributes

 parAccepted
 

Private Attributes

 _comment
 
 _description
 
 _parameters
 
 _path
 

Static Private Attributes

string _defaultValue = "No default value. Set parameter value."
 
string _label = "ConfigToolBase"
 
string _path = ""
 

Detailed Description

Base class for PAT tools

Definition at line 33 of file ConfigToolBase.py.

Constructor & Destructor Documentation

def ConfigToolBase.ConfigToolBase.__init__ (   self)

Definition at line 40 of file ConfigToolBase.py.

40 
41  def __init__(self):
42  self._parameters=dicttypes.SortedKeysDict()
43  self._description=self.__doc__
44  self._comment = ''
45  self.parAccepted=True
46  saveOrigin(self,1)
47  self._path = path.realpath(self._filename)
48  self._path = self._path.split("/src/")
49  self._path = self._path[1].replace("/python","")
50  #self._path = "".join(self._path)
51  self._path = self._path.replace("/",".")
52  self._path = self._path.replace(".py","")
53 
def saveOrigin
Definition: Mixins.py:571

Member Function Documentation

def ConfigToolBase.ConfigToolBase.__call__ (   self,
  process 
)
Call the instance 

Definition at line 54 of file ConfigToolBase.py.

54 
55  def __call__(self,process):
56  """ Call the instance
57  """
58  raise NotImplementedError
def ConfigToolBase.ConfigToolBase.__copy__ (   self)

copy(self) returns a copy of the tool

Definition at line 83 of file ConfigToolBase.py.

References ConfigToolBase.ConfigToolBase._comment, and ConfigToolBase.ConfigToolBase._parameters.

Referenced by ConfigToolBase.ConfigToolBase.apply().

83 
84  def __copy__(self):
85  c=type(self)()
86  c.setParameters(copy.deepcopy(self._parameters))
87  c.setComment(self._comment)
return c
def __copy__
copy(self) returns a copy of the tool
def ConfigToolBase.ConfigToolBase.addParameter (   self,
  dict,
  parname,
  parvalue,
  description,
  Type = None,
  allowedValues = None,
  acceptNoneValue = False 
)

use addParameter method in the redefinition of tool constructor in order to add parameters to the tools each tool is defined by its label, default value, description, type and allowedValues (the last two attribute can be ignored if the user gives a valid default values and if there is not a list of allowed values)

Add a parameter with its label, value, description and type to self._parameters

Definition at line 102 of file ConfigToolBase.py.

Referenced by editorTools.UserCodeTool.__init__(), metTools.AddMETCollection.__init__(), trackTools.MakeAODTrackCandidates.__init__(), coreTools.RunOnData.__init__(), HiCoreTools.RestrictInputToAOD.__init__(), runJetUncertainties.RunJetUncertainties.__init__(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.__init__(), Vispa.Plugins.ConfigEditor.ToolDataAccessor.ImportTool.__init__(), jetTools.AddJetCollection.__init__(), editorTools.ChangeSource.__init__(), HiCoreTools.RemoveMCMatching.__init__(), cmsswVersionTools.PickRelValInputFiles.__init__(), coreTools.RemoveMCMatching.__init__(), trackTools.MakePATTrackCandidates.__init__(), trigTools.SwitchOnTrigger.__init__(), HiCoreTools.RemoveAllPATObjectsBut.__init__(), HiCoreTools.RemoveSpecificPATObjects.__init__(), trigTools.SwitchOnTriggerStandAlone.__init__(), trackTools.MakeTrackCandidates.__init__(), tauTools.AddTauCollection.__init__(), trigTools.SwitchOnTriggerMatching.__init__(), HiCoreTools.RemoveCleaning.__init__(), HiCoreTools.AddCleaning.__init__(), trigTools.SwitchOnTriggerMatchingStandAlone.__init__(), trigTools.SwitchOnTriggerMatchEmbedding.__init__(), jetTools.SwitchJetCollection.__init__(), jetTools.AddJetID.__init__(), and jetTools.SetTagInfos.__init__().

103  def addParameter(self,dict,parname, parvalue, description,Type=None, allowedValues=None, acceptNoneValue=False):
104  """ Add a parameter with its label, value, description and type to self._parameters
105  """
106  par=parameter()
107  par.name=parname
108  par.value=parvalue
109  par.description=description
110  if Type==None:
111  par.type=type(parvalue)
112  else: par.type=Type
113  par.allowedValues=allowedValues
114  par.acceptNoneValue=acceptNoneValue
dict[par.name]=par
def addParameter
use addParameter method in the redefinition of tool constructor in order to add parameters to the too...
def ConfigToolBase.ConfigToolBase.apply (   self,
  process 
)

Definition at line 59 of file ConfigToolBase.py.

References ConfigToolBase.ConfigToolBase.__copy__(), pos::PixelConfigBase.setComment(), ConfigToolBase.ConfigToolBase.setComment(), Json::Value.setComment(), Json::Value::CommentInfo.setComment(), and ConfigToolBase.ConfigToolBase.toolCode().

Referenced by heavyIonTools.ConfigureHeavyIons.__call__(), editorTools.UserCodeTool.__call__(), HiCoreTools.RestrictInputToAOD.__call__(), coreTools.RunOnData.__call__(), trackTools.MakeAODTrackCandidates.__call__(), runJetUncertainties.RunJetUncertainties.__call__(), metTools.AddMETCollection.__call__(), heavyIonTools.ProductionDefaults.__call__(), editorTools.ChangeSource.__call__(), HiCoreTools.RemoveMCMatching.__call__(), cmsswVersionTools.PickRelValInputFiles.__call__(), coreTools.RemoveMCMatching.__call__(), trackTools.MakePATTrackCandidates.__call__(), trigTools.SwitchOnTrigger.__call__(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.__call__(), jetTools.AddJetCollection.__call__(), heavyIonTools.SelectionDefaults.__call__(), HiCoreTools.RemoveAllPATObjectsBut.__call__(), heavyIonTools.DisbaleMonteCarloDeps.__call__(), HiCoreTools.RemoveSpecificPATObjects.__call__(), trigTools.SwitchOnTriggerStandAlone.__call__(), trackTools.MakeTrackCandidates.__call__(), tauTools.AddTauCollection.__call__(), trigTools.SwitchOnTriggerMatching.__call__(), HiCoreTools.RemoveCleaning.__call__(), HiCoreTools.AddCleaning.__call__(), trigTools.SwitchOnTriggerMatchingStandAlone.__call__(), trigTools.SwitchOnTriggerMatchEmbedding.__call__(), jetTools.SwitchJetCollection.__call__(), jetTools.AddJetID.__call__(), and jetTools.SetTagInfos.__call__().

59 
60  def apply(self,process):
61 
62  if hasattr(process, "addAction"):
63  process.disableRecording()
64 
65  try:
66  comment=inspect.stack(2)[2][4][0].rstrip("\n")
67  if comment.startswith("#"):
68  self.setComment(comment.lstrip("#"))
69  except:
70  pass
71 
72  self.toolCode(process)
73 
74  if hasattr(process, "addAction"):
75  process.enableRecording()
76  action=self.__copy__()
77  process.addAction(action)
def __copy__
copy(self) returns a copy of the tool
def ConfigToolBase.ConfigToolBase.comment (   self)
Return the comment set for this tool

Definition at line 157 of file ConfigToolBase.py.

References ConfigToolBase.ConfigToolBase._comment.

158  def comment(self):
159  """ Return the comment set for this tool
160  """
return self._comment
def ConfigToolBase.ConfigToolBase.description (   self)
Return a string with a detailed description of the action.

Definition at line 94 of file ConfigToolBase.py.

References ConfigToolBase.ConfigToolBase._description.

94 
95  def description(self):
96  """ Return a string with a detailed description of the action.
97  """
98  return self._description
def ConfigToolBase.ConfigToolBase.dumpPython (   self)
Return the python code to perform the action

Definition at line 134 of file ConfigToolBase.py.

References ConfigToolBase.ConfigToolBase._comment, metTools.AddMETCollection._defaultParameters, editorTools.UserCodeTool._defaultParameters, trackTools.MakeAODTrackCandidates._defaultParameters, heavyIonTools.ConfigureHeavyIons._defaultParameters, HiCoreTools.RestrictInputToAOD._defaultParameters, coreTools.RunOnData._defaultParameters, runJetUncertainties.RunJetUncertainties._defaultParameters, runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties._defaultParameters, Vispa.Plugins.ConfigEditor.ToolDataAccessor.ImportTool._defaultParameters, jetTools.AddJetCollection._defaultParameters, heavyIonTools.ProductionDefaults._defaultParameters, editorTools.ChangeSource._defaultParameters, cmsswVersionTools.PickRelValInputFiles._defaultParameters, HiCoreTools.RemoveMCMatching._defaultParameters, coreTools.RemoveMCMatching._defaultParameters, trackTools.MakePATTrackCandidates._defaultParameters, trigTools.SwitchOnTrigger._defaultParameters, heavyIonTools.SelectionDefaults._defaultParameters, HiCoreTools.RemoveAllPATObjectsBut._defaultParameters, heavyIonTools.DisbaleMonteCarloDeps._defaultParameters, HiCoreTools.RemoveSpecificPATObjects._defaultParameters, trigTools.SwitchOnTriggerStandAlone._defaultParameters, trackTools.MakeTrackCandidates._defaultParameters, tauTools.AddTauCollection._defaultParameters, trigTools.SwitchOnTriggerMatching._defaultParameters, HiCoreTools.RemoveCleaning._defaultParameters, HiCoreTools.AddCleaning._defaultParameters, trigTools.SwitchOnTriggerMatchingStandAlone._defaultParameters, trigTools.SwitchOnTriggerMatchEmbedding._defaultParameters, jetTools.SwitchJetCollection._defaultParameters, jetTools.AddJetID._defaultParameters, jetTools.SetTagInfos._defaultParameters, MagneticFieldMapESProducer._label, TrackerInteractionGeometryESProducer._label, ConfigToolBase.ConfigToolBase._label, ConfigToolBase.ConfigToolBase._parameters, ConfigToolBase.ConfigToolBase._path, CommonAnalyzer._path, and ConfigToolBase.ConfigToolBase.getvalue().

Referenced by Mixins._Parameterizable.__addParameter(), Mixins._ParameterTypeBase.__repr__(), Mixins._Parameterizable.__repr__(), Mixins._ValidatingParameterListBase.__repr__(), Types.VPSet.__repr__(), and Mixins._Parameterizable.__setattr__().

135  def dumpPython(self):
136  """ Return the python code to perform the action
137  """
138  dumpPythonImport = "\nfrom "+self._path+" import *\n"
139  dumpPython=''
140  if self._comment!="":
141  dumpPython = '#'+self._comment
142  dumpPython += "\n"+self._label+"(process "
143  for key in self._parameters.keys():
144  if repr(self._parameters[key].value)!=repr(self._defaultParameters[key].value):
145  dumpPython+= ", "+str(key)+" = "
146  if self._parameters[key].type is str:
147  string = "'"+str(self.getvalue(key))+"'"
148  else:
149  string = str(self.getvalue(key))
150  dumpPython+= string
151  dumpPython+=")"+'\n'
152  return (dumpPythonImport,dumpPython)
def ConfigToolBase.ConfigToolBase.errorMessage (   self,
  value,
  type 
)

Definition at line 161 of file ConfigToolBase.py.

Referenced by Vispa.Main.Application.Application._loadPlugins(), Vispa.Main.Application.Application.openFile(), and ConfigToolBase.ConfigToolBase.typeError().

162  def errorMessage(self,value,type):
return "The type for parameter "+'"'+str(value)+'"'+" is not "+'"'+str(type)+'"'
def ConfigToolBase.ConfigToolBase.getAllowedValues (   self,
  name 
)

Definition at line 192 of file ConfigToolBase.py.

References metTools.AddMETCollection._defaultParameters, trackTools.MakeAODTrackCandidates._defaultParameters, editorTools.UserCodeTool._defaultParameters, heavyIonTools.ConfigureHeavyIons._defaultParameters, coreTools.RunOnData._defaultParameters, HiCoreTools.RestrictInputToAOD._defaultParameters, runJetUncertainties.RunJetUncertainties._defaultParameters, runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties._defaultParameters, Vispa.Plugins.ConfigEditor.ToolDataAccessor.ImportTool._defaultParameters, jetTools.AddJetCollection._defaultParameters, heavyIonTools.ProductionDefaults._defaultParameters, editorTools.ChangeSource._defaultParameters, cmsswVersionTools.PickRelValInputFiles._defaultParameters, HiCoreTools.RemoveMCMatching._defaultParameters, coreTools.RemoveMCMatching._defaultParameters, trackTools.MakePATTrackCandidates._defaultParameters, trigTools.SwitchOnTrigger._defaultParameters, heavyIonTools.SelectionDefaults._defaultParameters, HiCoreTools.RemoveAllPATObjectsBut._defaultParameters, heavyIonTools.DisbaleMonteCarloDeps._defaultParameters, HiCoreTools.RemoveSpecificPATObjects._defaultParameters, trigTools.SwitchOnTriggerStandAlone._defaultParameters, trackTools.MakeTrackCandidates._defaultParameters, tauTools.AddTauCollection._defaultParameters, trigTools.SwitchOnTriggerMatching._defaultParameters, HiCoreTools.RemoveCleaning._defaultParameters, HiCoreTools.AddCleaning._defaultParameters, trigTools.SwitchOnTriggerMatchingStandAlone._defaultParameters, trigTools.SwitchOnTriggerMatchEmbedding._defaultParameters, jetTools.SwitchJetCollection._defaultParameters, jetTools.AddJetID._defaultParameters, and jetTools.SetTagInfos._defaultParameters.

193  def getAllowedValues(self,name):
194  return self._defaultParameters[name].allowedValues
def ConfigToolBase.ConfigToolBase.getParameters (   self)
Return a copy of the dict of the parameters.

Definition at line 115 of file ConfigToolBase.py.

References ConfigToolBase.ConfigToolBase._parameters.

116  def getParameters(self):
117  """ Return a copy of the dict of the parameters.
118  """
return copy.deepcopy(self._parameters)
def ConfigToolBase.ConfigToolBase.getvalue (   self,
  name 
)
Return the value of parameter 'name'

Definition at line 90 of file ConfigToolBase.py.

References ConfigToolBase.ConfigToolBase._parameters.

Referenced by ConfigToolBase.ConfigToolBase.dumpPython().

90 
91  def getvalue(self,name):
92  """ Return the value of parameter 'name'
93  """
return self._parameters[name].value
def ConfigToolBase.ConfigToolBase.isAllowed (   self,
  name,
  value 
)

method isAllowed is called by setParameter to check input values for a specific parameter

Definition at line 164 of file ConfigToolBase.py.

References ConfigToolBase.ConfigToolBase._parameters, and ConfigToolBase.ConfigToolBase.parAccepted.

Referenced by ConfigToolBase.ConfigToolBase.setParameter().

165  def isAllowed(self,name,value):
166  self.parAccepted=True
167  if value==[]:
168  self.parAccepted=False
169  elif (isinstance(value,dict)) and (isinstance(self._parameters[name].allowedValues,list)):
170  for key in value.keys():
171  if (key not in self._parameters[name].allowedValues):
172  raise ValueError("The input key value "+'"'+str(key)+'"'+" for parameter "+'"'+name+'"'+" is not supported. Supported ones are: "+str(self._parameters[name].allowedValues)[1:-1])
173  elif (isinstance(value,list)) and (isinstance(self._parameters[name].allowedValues,list )):
174  for val in value:
175  if (val not in self._parameters[name].allowedValues) :
176  raise ValueError("The input value "+'"'+str(val)+'"'+" for parameter "+'"'+name+'"'+" is not supported. Supported ones are: "+str(self._parameters[name].allowedValues)[1:-1])
177  elif (not isinstance(value,list))and (isinstance(self._parameters[name].allowedValues,list)) :
178  if (value not in self._parameters[name].allowedValues and value == None) and (not self._parameters[name].acceptNoneValue) :
179  self.parAccepted=False
180  elif not isinstance(self._parameters[name].allowedValues,list):
181  if (value!=self._parameters[name].allowedValues and value == None) and (not self._parameters[name].acceptNoneValue) :
182  self.parAccepted=False
183  if self.parAccepted==False:
raise ValueError("The input value "+'"'+str(value)+'"'+" for parameter "+'"'+name+'"'+" is not supported. Supported ones are: "+str(self._parameters[name].allowedValues)[1:-1])
def isAllowed
method isAllowed is called by setParameter to check input values for a specific parameter ...
def ConfigToolBase.ConfigToolBase.reset (   self)

Definition at line 88 of file ConfigToolBase.py.

References metTools.AddMETCollection._defaultParameters, editorTools.UserCodeTool._defaultParameters, trackTools.MakeAODTrackCandidates._defaultParameters, heavyIonTools.ConfigureHeavyIons._defaultParameters, coreTools.RunOnData._defaultParameters, HiCoreTools.RestrictInputToAOD._defaultParameters, runJetUncertainties.RunJetUncertainties._defaultParameters, runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties._defaultParameters, Vispa.Plugins.ConfigEditor.ToolDataAccessor.ImportTool._defaultParameters, jetTools.AddJetCollection._defaultParameters, heavyIonTools.ProductionDefaults._defaultParameters, editorTools.ChangeSource._defaultParameters, cmsswVersionTools.PickRelValInputFiles._defaultParameters, HiCoreTools.RemoveMCMatching._defaultParameters, coreTools.RemoveMCMatching._defaultParameters, trackTools.MakePATTrackCandidates._defaultParameters, trigTools.SwitchOnTrigger._defaultParameters, heavyIonTools.SelectionDefaults._defaultParameters, HiCoreTools.RemoveAllPATObjectsBut._defaultParameters, heavyIonTools.DisbaleMonteCarloDeps._defaultParameters, HiCoreTools.RemoveSpecificPATObjects._defaultParameters, trigTools.SwitchOnTriggerStandAlone._defaultParameters, trackTools.MakeTrackCandidates._defaultParameters, tauTools.AddTauCollection._defaultParameters, trigTools.SwitchOnTriggerMatching._defaultParameters, HiCoreTools.RemoveCleaning._defaultParameters, HiCoreTools.AddCleaning._defaultParameters, trigTools.SwitchOnTriggerMatchingStandAlone._defaultParameters, trigTools.SwitchOnTriggerMatchEmbedding._defaultParameters, jetTools.SwitchJetCollection._defaultParameters, jetTools.AddJetID._defaultParameters, jetTools.SetTagInfos._defaultParameters, and ConfigToolBase.ConfigToolBase._parameters.

88 
89  def reset(self):
self._parameters=copy.deepcopy(self._defaultParameters)
def ConfigToolBase.ConfigToolBase.setComment (   self,
  comment 
)
Write a comment in the configuration file

Definition at line 153 of file ConfigToolBase.py.

References ConfigToolBase.ConfigToolBase._comment.

Referenced by ConfigToolBase.ConfigToolBase.apply().

154  def setComment(self, comment):
155  """ Write a comment in the configuration file
156  """
self._comment = str(comment)
def ConfigToolBase.ConfigToolBase.setParameter (   self,
  name,
  value,
  typeNone = False 
)
Change parameter 'name' to a new value

Definition at line 119 of file ConfigToolBase.py.

References metTools.AddMETCollection._defaultParameters, editorTools.UserCodeTool._defaultParameters, trackTools.MakeAODTrackCandidates._defaultParameters, heavyIonTools.ConfigureHeavyIons._defaultParameters, coreTools.RunOnData._defaultParameters, HiCoreTools.RestrictInputToAOD._defaultParameters, runJetUncertainties.RunJetUncertainties._defaultParameters, runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties._defaultParameters, Vispa.Plugins.ConfigEditor.ToolDataAccessor.ImportTool._defaultParameters, jetTools.AddJetCollection._defaultParameters, heavyIonTools.ProductionDefaults._defaultParameters, editorTools.ChangeSource._defaultParameters, cmsswVersionTools.PickRelValInputFiles._defaultParameters, HiCoreTools.RemoveMCMatching._defaultParameters, coreTools.RemoveMCMatching._defaultParameters, trackTools.MakePATTrackCandidates._defaultParameters, trigTools.SwitchOnTrigger._defaultParameters, heavyIonTools.SelectionDefaults._defaultParameters, HiCoreTools.RemoveAllPATObjectsBut._defaultParameters, heavyIonTools.DisbaleMonteCarloDeps._defaultParameters, HiCoreTools.RemoveSpecificPATObjects._defaultParameters, trigTools.SwitchOnTriggerStandAlone._defaultParameters, trackTools.MakeTrackCandidates._defaultParameters, tauTools.AddTauCollection._defaultParameters, trigTools.SwitchOnTriggerMatching._defaultParameters, HiCoreTools.RemoveCleaning._defaultParameters, HiCoreTools.AddCleaning._defaultParameters, trigTools.SwitchOnTriggerMatchingStandAlone._defaultParameters, trigTools.SwitchOnTriggerMatchEmbedding._defaultParameters, jetTools.SwitchJetCollection._defaultParameters, jetTools.AddJetID._defaultParameters, jetTools.SetTagInfos._defaultParameters, ConfigToolBase.ConfigToolBase._parameters, ConfigToolBase.ConfigToolBase.isAllowed(), and ConfigToolBase.ConfigToolBase.typeError().

Referenced by editorTools.UserCodeTool.__call__(), HiCoreTools.RestrictInputToAOD.__call__(), coreTools.RunOnData.__call__(), trackTools.MakeAODTrackCandidates.__call__(), runJetUncertainties.RunJetUncertainties.__call__(), metTools.AddMETCollection.__call__(), editorTools.ChangeSource.__call__(), HiCoreTools.RemoveMCMatching.__call__(), cmsswVersionTools.PickRelValInputFiles.__call__(), coreTools.RemoveMCMatching.__call__(), trackTools.MakePATTrackCandidates.__call__(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.__call__(), trigTools.SwitchOnTrigger.__call__(), jetTools.AddJetCollection.__call__(), HiCoreTools.RemoveAllPATObjectsBut.__call__(), HiCoreTools.RemoveSpecificPATObjects.__call__(), trigTools.SwitchOnTriggerStandAlone.__call__(), trackTools.MakeTrackCandidates.__call__(), tauTools.AddTauCollection.__call__(), trigTools.SwitchOnTriggerMatching.__call__(), HiCoreTools.RemoveCleaning.__call__(), HiCoreTools.AddCleaning.__call__(), trigTools.SwitchOnTriggerMatchingStandAlone.__call__(), trigTools.SwitchOnTriggerMatchEmbedding.__call__(), jetTools.SwitchJetCollection.__call__(), jetTools.AddJetID.__call__(), jetTools.SetTagInfos.__call__(), and runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.jetConfiguration().

120  def setParameter(self, name, value, typeNone=False):
121  """ Change parameter 'name' to a new value
122  """
123  self._parameters[name].value=value
124  ### check about input value type
125  self.typeError(name)
126  ### check about input value (it works if allowedValues for the specific parameter is set)
if self._defaultParameters[name].allowedValues is not None: self.isAllowed(name,value )
def isAllowed
method isAllowed is called by setParameter to check input values for a specific parameter ...
def typeError
check about input value type
def ConfigToolBase.ConfigToolBase.setParameters (   self,
  parameters 
)

Definition at line 127 of file ConfigToolBase.py.

References ConfigToolBase.ConfigToolBase._parameters.

128  def setParameters(self, parameters):
self._parameters=copy.deepcopy(parameters)
def ConfigToolBase.ConfigToolBase.toolCode (   self,
  process 
)

Definition at line 78 of file ConfigToolBase.py.

Referenced by ConfigToolBase.ConfigToolBase.apply().

78 
79  def toolCode(self, process):
80  raise NotImplementedError
81 
def ConfigToolBase.ConfigToolBase.typeError (   self,
  name 
)

check about input value type

Definition at line 185 of file ConfigToolBase.py.

References ConfigToolBase.ConfigToolBase._parameters, FWEventItem.errorMessage(), and ConfigToolBase.ConfigToolBase.errorMessage().

Referenced by ConfigToolBase.ConfigToolBase.setParameter().

186  def typeError(self,name):
187  if self._parameters[name].acceptNoneValue is False:
188  if not isinstance(self._parameters[name].value,self._parameters[name].type):
189  raise TypeError(self.errorMessage(self._parameters[name].value,self._parameters[name].type))
190  else:
191  if not (isinstance(self._parameters[name].value,self._parameters[name].type) or self._parameters[name].value is None):
raise TypeError(self.errorMessage(self._parameters[name].value,self._parameters[name].type))
def typeError
check about input value type

Member Data Documentation

ConfigToolBase.ConfigToolBase._comment
private

Definition at line 43 of file ConfigToolBase.py.

Referenced by ConfigToolBase.ConfigToolBase.__copy__(), runJetUncertainties.RunJetUncertainties.__init__(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.__init__(), ConfigToolBase.ConfigToolBase.comment(), editorTools.UserCodeTool.dumpPython(), ConfigToolBase.ConfigToolBase.dumpPython(), and ConfigToolBase.ConfigToolBase.setComment().

string ConfigToolBase.ConfigToolBase._defaultValue = "No default value. Set parameter value."
staticprivate

Definition at line 38 of file ConfigToolBase.py.

Referenced by metTools.AddMETCollection.__init__(), HiCoreTools.RemoveAllPATObjectsBut.__init__(), HiCoreTools.RemoveSpecificPATObjects.__init__(), and tauTools.AddTauCollection.__init__().

ConfigToolBase.ConfigToolBase._description
private

Definition at line 42 of file ConfigToolBase.py.

Referenced by Vispa.Main.Filetype.Filetype.description(), ConfigToolBase.ConfigToolBase.description(), and Vispa.Main.Filetype.Filetype.fileDialogFilter().

string ConfigToolBase.ConfigToolBase._label = "ConfigToolBase"
staticprivate

Definition at line 37 of file ConfigToolBase.py.

Referenced by cmsswVersionTools.PickRelValInputFiles.apply(), Vispa.Views.LineDecayView.DecayLine.boundingRect(), Vispa.Views.LineDecayView.DecayLine.containsPoint(), ElectronCalibrator.EmbeddedElectronCalibrator.correct(), Vispa.Views.LineDecayView.DecayLine.drawText(), ConfigToolBase.ConfigToolBase.dumpPython(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigFolder.label_(), Vispa.Views.LineDecayView.DecayLine.labelBoundingRect(), cmsswVersionTools.PickRelValInputFiles.messageEmptyList(), Vispa.Views.LineDecayView.DecayLine.setLabel(), trigTools.SwitchOnTrigger.toolCode(), trigTools.SwitchOnTriggerStandAlone.toolCode(), trigTools.SwitchOnTriggerMatching.toolCode(), trigTools.SwitchOnTriggerMatchingStandAlone.toolCode(), and trigTools.SwitchOnTriggerMatchEmbedding.toolCode().

ConfigToolBase.ConfigToolBase._parameters
private

Definition at line 41 of file ConfigToolBase.py.

Referenced by ConfigToolBase.ConfigToolBase.__copy__(), runJetUncertainties.RunJetUncertainties.__init__(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.__init__(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.ak4JetReclustering(), cmsswVersionTools.PickRelValInputFiles.apply(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.createMVAMETModule(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.createSmearedJetModule(), editorTools.UserCodeTool.dumpPython(), Vispa.Plugins.ConfigEditor.ToolDataAccessor.ImportTool.dumpPython(), ConfigToolBase.ConfigToolBase.dumpPython(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.getCorrectedMET(), ConfigToolBase.ConfigToolBase.getParameters(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.getUnclusteredVariationsForMVAMET(), ConfigToolBase.ConfigToolBase.getvalue(), ConfigToolBase.ConfigToolBase.isAllowed(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.jetCleaning(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.jetConfiguration(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.miniAODConfiguration(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigFolder.parameters_(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.produceMET(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.recomputeRawMetFromPfcs(), ConfigToolBase.ConfigToolBase.reset(), ConfigToolBase.ConfigToolBase.setParameter(), ConfigToolBase.ConfigToolBase.setParameters(), editorTools.UserCodeTool.toolCode(), HiCoreTools.RestrictInputToAOD.toolCode(), coreTools.RunOnData.toolCode(), trackTools.MakeAODTrackCandidates.toolCode(), metTools.AddMETCollection.toolCode(), editorTools.ChangeSource.toolCode(), runJetUncertainties.RunJetUncertainties.toolCode(), HiCoreTools.RemoveMCMatching.toolCode(), coreTools.RemoveMCMatching.toolCode(), trackTools.MakePATTrackCandidates.toolCode(), trigTools.SwitchOnTrigger.toolCode(), jetTools.AddJetCollection.toolCode(), HiCoreTools.RemoveAllPATObjectsBut.toolCode(), HiCoreTools.RemoveSpecificPATObjects.toolCode(), trigTools.SwitchOnTriggerStandAlone.toolCode(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.toolCode(), trackTools.MakeTrackCandidates.toolCode(), tauTools.AddTauCollection.toolCode(), HiCoreTools.RemoveCleaning.toolCode(), trigTools.SwitchOnTriggerMatching.toolCode(), HiCoreTools.AddCleaning.toolCode(), trigTools.SwitchOnTriggerMatchingStandAlone.toolCode(), trigTools.SwitchOnTriggerMatchEmbedding.toolCode(), jetTools.SwitchJetCollection.toolCode(), jetTools.AddJetID.toolCode(), jetTools.SetTagInfos.toolCode(), and ConfigToolBase.ConfigToolBase.typeError().

string ConfigToolBase.ConfigToolBase._path = ""
staticprivate

Definition at line 39 of file ConfigToolBase.py.

Referenced by ConfigToolBase.ConfigToolBase.dumpPython(), parserPerfsuiteMetadata.parserPerfsuiteMetadata.getMachineInfo(), parserPerfsuiteMetadata.parserPerfsuiteMetadata.readCmsScimark(), and parserPerfsuiteMetadata.parserPerfsuiteMetadata.readCmsScimarkTest().

ConfigToolBase.ConfigToolBase._path
private

Definition at line 46 of file ConfigToolBase.py.

Referenced by parserPerfsuiteMetadata.parserPerfsuiteMetadata.getMachineInfo(), parserPerfsuiteMetadata.parserPerfsuiteMetadata.readCmsScimark(), and parserPerfsuiteMetadata.parserPerfsuiteMetadata.readCmsScimarkTest().

ConfigToolBase.ConfigToolBase.parAccepted

Definition at line 44 of file ConfigToolBase.py.

Referenced by ConfigToolBase.ConfigToolBase.isAllowed().