ATLAS Offline Software
Loading...
Searching...
No Matches
python.JetDefinition.JetModifier Class Reference
Inheritance diagram for python.JetDefinition.JetModifier:
Collaboration diagram for python.JetDefinition.JetModifier:

Public Types

typedef HLT::TypeInformation::for_each_type_c< typenameEDMLIST::map, my_functor, my_result<>, my_arg< HLT::TypeInformation::get_cont, CONTAINER > >::type result

Public Member Functions

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

Public Attributes

 tooltype = tooltype
 toolname = toolname
 createfn = self.getGenericModifier
 modspec = modspec
 prereqs = prereqs
 filterfn = filterfn
 properties = properties

Static Private Attributes

 __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.

Member Typedef Documentation

◆ result

Definition at line 90 of file EDM_MasterSearch.h.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 253 of file JetDefinition.py.

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__()

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__()

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__()

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__()

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()

python.JetDefinition.JetModifier.createfn ( self)

Definition at line 302 of file JetDefinition.py.

302 def createfn(self):pass

◆ filterfn()

python.JetDefinition.JetModifier.filterfn ( self)

Definition at line 308 of file JetDefinition.py.

308 def filterfn(self):pass

◆ getGenericModifier()

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()

python.JetDefinition.JetModifier.modspec ( self)

Definition at line 304 of file JetDefinition.py.

304 def modspec(self):pass

◆ prereqs()

python.JetDefinition.JetModifier.prereqs ( self)

Definition at line 306 of file JetDefinition.py.

306 def prereqs(self):pass

◆ properties()

python.JetDefinition.JetModifier.properties ( self)

Definition at line 310 of file JetDefinition.py.

310 def properties(self):pass
311
312
313

◆ toolname()

python.JetDefinition.JetModifier.toolname ( self)

Definition at line 300 of file JetDefinition.py.

300 def toolname(self):pass

◆ tooltype()

python.JetDefinition.JetModifier.tooltype ( self)

Definition at line 298 of file JetDefinition.py.

298 def tooltype(self):pass

Member Data Documentation

◆ __repr__

python.JetDefinition.JetModifier.__repr__ = __str__
staticprivate

Definition at line 327 of file JetDefinition.py.

◆ createfn

python.JetDefinition.JetModifier.createfn = self.getGenericModifier

Definition at line 275 of file JetDefinition.py.

◆ filterfn

python.JetDefinition.JetModifier.filterfn = filterfn

Definition at line 289 of file JetDefinition.py.

◆ modspec

python.JetDefinition.JetModifier.modspec = modspec

Definition at line 278 of file JetDefinition.py.

◆ prereqs

python.JetDefinition.JetModifier.prereqs = prereqs

Definition at line 284 of file JetDefinition.py.

◆ properties

python.JetDefinition.JetModifier.properties = properties

Definition at line 292 of file JetDefinition.py.

◆ toolname

python.JetDefinition.JetModifier.toolname = toolname

Definition at line 264 of file JetDefinition.py.

◆ tooltype

python.JetDefinition.JetModifier.tooltype = tooltype

Definition at line 263 of file JetDefinition.py.


The documentation for this class was generated from the following file: