ATLAS Offline Software
Public Member Functions | Public Attributes | Static Private Attributes | List of all members
python.JetDefinition.JetModifier Class Reference
Inheritance diagram for python.JetDefinition.JetModifier:
Collaboration diagram for python.JetDefinition.JetModifier:

Public Member Functions

def __init__ (self, tooltype, toolname, createfn=None, filterfn=_condAlwaysPass, prereqs=[], modspec=None, **properties)
 
def tooltype (self)
 
def toolname (self)
 
def createfn (self)
 
def modspec (self)
 
def prereqs (self)
 
def filterfn (self)
 
def properties (self)
 
def __hash__ (self)
 
def __eq__ (self, rhs)
 
def __ne__ (self, rhs)
 
def __str__ (self)
 
def getGenericModifier (self, jetdef, modspec)
 

Public Attributes

 tooltype
 
 toolname
 
 createfn
 
 modspec
 
 prereqs
 
 filterfn
 
 properties
 

Static Private Attributes

def __repr__ = __str__
 

Detailed Description

Helper to define the config of a IJetModifier tool.
Tools that typically have more complex properties set should have
their own dedicated helper 'createfn' functions defined

Definition at line 248 of file JetDefinition.py.

Constructor & Destructor Documentation

◆ __init__()

def python.JetDefinition.JetModifier.__init__ (   self,
  tooltype,
  toolname,
  createfn = None,
  filterfn = _condAlwaysPass,
  prereqs = [],
  modspec = None,
**  properties 
)

Definition at line 253 of file JetDefinition.py.

253  def __init__(self,tooltype,toolname,
254  createfn=None,
255  filterfn=_condAlwaysPass,
256  prereqs=[],modspec=None,
257  **properties
258  ):
259  # For the easy cases where no helper function is needed.
260  # They will be ignored in the case of a helper,
261  # but are still required such that it's obvious what
262  # the tool name and type are when defining the config.
263  self.tooltype = tooltype
264  self.toolname = toolname
265 
266  # The helper function may take 2 parameters:
267  # a "modifier specification" string and the jet
268  # definition
269 
270  # The helper function always returns the desired
271  # modifier, and a ComponentAccumulator instance,
272  # in case additional supporting tools/services
273  # need to be set up.
274  if createfn is None:
275  self.createfn = self.getGenericModifier
276  else:
277  self.createfn = createfn
278  self.modspec = modspec
279 
280  # Prereqs is normally a list.
281  # However, in special cases, the prereqs may
282  # depend on either or both of modspec and jetdef,
283  # in which case a helper function can be defined.
284  self.prereqs = prereqs
285 
286  # a function taking a CondFlags as argument and deciding if this JetModifier is compatible
287  # with the conditions.
288  # The function must return a tuple : (bool, "reason of failure")
289  self.filterfn = filterfn
290 
291  # These will be set as the Gaudi properties of the C++ tool
292  self.properties = properties
293 
294 
295 
296 

Member Function Documentation

◆ __eq__()

def python.JetDefinition.JetModifier.__eq__ (   self,
  rhs 
)

Definition at line 317 of file JetDefinition.py.

317  def __eq__(self,rhs):
318  return self.__hash__() == rhs.__hash__()
319 

◆ __hash__()

def python.JetDefinition.JetModifier.__hash__ (   self)

Definition at line 314 of file JetDefinition.py.

314  def __hash__(self):
315  return hash((self.toolname,self.tooltype,self.createfn.__name__,self.modspec,str(self.prereqs)))
316 

◆ __ne__()

def python.JetDefinition.JetModifier.__ne__ (   self,
  rhs 
)

Definition at line 320 of file JetDefinition.py.

320  def __ne__(self,rhs):
321  return (not self.__eq__(rhs))
322 

◆ __str__()

def python.JetDefinition.JetModifier.__str__ (   self)

Definition at line 324 of file JetDefinition.py.

324  def __str__(self):
325  return "JetModifier({0}/{1})".format(self.tooltype,self.toolname)

◆ createfn()

def python.JetDefinition.JetModifier.createfn (   self)

Definition at line 302 of file JetDefinition.py.

302  def createfn(self):pass

◆ filterfn()

def python.JetDefinition.JetModifier.filterfn (   self)

Definition at line 308 of file JetDefinition.py.

308  def filterfn(self):pass

◆ getGenericModifier()

def python.JetDefinition.JetModifier.getGenericModifier (   self,
  jetdef,
  modspec 
)
returns a real tool instance accoding to this definition : simply instantiating from
class self.tooltype and with name self.toolname ( actually : self.toolname.format(modspec) )
Since this function will be called as a callback from JetRecConfig as 'func(jetdef, modspec)', it must accept
the jetdef argument, even if unused in this case.

Definition at line 329 of file JetDefinition.py.

329  def getGenericModifier(self,jetdef, modspec):
330  """returns a real tool instance accoding to this definition : simply instantiating from
331  class self.tooltype and with name self.toolname ( actually : self.toolname.format(modspec) )
332  Since this function will be called as a callback from JetRecConfig as 'func(jetdef, modspec)', it must accept
333  the jetdef argument, even if unused in this case.
334  """
335  from AthenaConfiguration.ComponentFactory import CompFactory
336  name = self.toolname.format(modspec=modspec)
337  tool = CompFactory.getComp(self.tooltype)(name)
338  return tool
339 
340 
341 
342 

◆ modspec()

def python.JetDefinition.JetModifier.modspec (   self)

Definition at line 304 of file JetDefinition.py.

304  def modspec(self):pass

◆ prereqs()

def python.JetDefinition.JetModifier.prereqs (   self)

Definition at line 306 of file JetDefinition.py.

306  def prereqs(self):pass

◆ properties()

def python.JetDefinition.JetModifier.properties (   self)

Definition at line 310 of file JetDefinition.py.

310  def properties(self):pass
311 
312 
313 

◆ toolname()

def python.JetDefinition.JetModifier.toolname (   self)

Definition at line 300 of file JetDefinition.py.

300  def toolname(self):pass

◆ tooltype()

def python.JetDefinition.JetModifier.tooltype (   self)

Definition at line 298 of file JetDefinition.py.

298  def tooltype(self):pass

Member Data Documentation

◆ __repr__

def python.JetDefinition.JetModifier.__repr__ = __str__
staticprivate

Definition at line 327 of file JetDefinition.py.

◆ createfn

python.JetDefinition.JetModifier.createfn

Definition at line 270 of file JetDefinition.py.

◆ filterfn

python.JetDefinition.JetModifier.filterfn

Definition at line 284 of file JetDefinition.py.

◆ modspec

python.JetDefinition.JetModifier.modspec

Definition at line 273 of file JetDefinition.py.

◆ prereqs

python.JetDefinition.JetModifier.prereqs

Definition at line 279 of file JetDefinition.py.

◆ properties

python.JetDefinition.JetModifier.properties

Definition at line 287 of file JetDefinition.py.

◆ toolname

python.JetDefinition.JetModifier.toolname

Definition at line 259 of file JetDefinition.py.

◆ tooltype

python.JetDefinition.JetModifier.tooltype

Definition at line 258 of file JetDefinition.py.


The documentation for this class was generated from the following file:
vtune_athena.format
format
Definition: vtune_athena.py:14
python.TestDriveDummies.properties
dictionary properties
Definition: TestDriveDummies.py:14
python.HLT.Jet.TriggerJetMods.prereqs
prereqs
Definition: TriggerJetMods.py:32
python.hypoToolDisplay.toolname
def toolname(tool)
Definition: hypoToolDisplay.py:13
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18
CaloCondBlobAlgs_fillNoiseFromASCII.hash
dictionary hash
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:109
str
Definition: BTagTrackIpAccessor.cxx:11