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

Public Member Functions

 __init__ (self, name=None, metaData=None)
 __str__ (self, prefix='')
 metaData (self)
 __len__ (self)
 __iter__ (self)
 properties (self)

Static Public Attributes

 auxfiles = ListOfStrings("List of needed auxiliary files (to be found in DATAPATH)")
 minevents = Integer("minimum number of events in output file",0, AllowedExpression("value >= 0"))
 maxeventsfactor
 maxeventsstrategy
 efficiency = Float("Event filtering efficiency (acceptance factor)", 1.0, AllowedExpression("0.0 < value <= 1.0") )

Protected Member Functions

 _attributeDictionary (self)

Private Attributes

list __metadata = []
 __name = name
dict __attributes = {}

Static Private Attributes

tuple __slots__ = ( '__metadata', )

Detailed Description

Configuration class for JobTransforms.
It has a number of properties shared among all jobtransforms. Those properties are
processed by class JobTransform.

Definition at line 394 of file TransformConfig.py.

Constructor & Destructor Documentation

◆ __init__()

python.TransformConfig.TransformConfig.__init__ ( self,
name = None,
metaData = None )
name is used in printout. The default name is derived from the filename of the python file
where constructor is called

Definition at line 410 of file TransformConfig.py.

410 def __init__(self,name=None,metaData=None):
411 """name is used in printout. The default name is derived from the filename of the python file
412 where constructor is called"""
413 JobConfig.__init__(self,name)
414 self.__metadata = []
415 if metaData is not None:
416 propertyNames = [ d.name() for d in self.properties() ]
417 for m in metaData:
418 if m not in propertyNames:
419 raise TransformConfigError('Requested metadata %s is not an attribute of %s' % (m,self.name()) )
420 self.__metadata.append(m)
421
422

Member Function Documentation

◆ __iter__()

python.TransformConfig.JobConfig.__iter__ ( self)
inherited
Provide iteration over the full list of properties (the Descriptors, not the values)

Definition at line 346 of file TransformConfig.py.

346 def __iter__(self):
347 """Provide iteration over the full list of properties (the Descriptors, not the values)"""
348 return iter(self.properties())
349
350

◆ __len__()

python.TransformConfig.JobConfig.__len__ ( self)
inherited
Return the total number of properties (this class plus all base classes)

Definition at line 341 of file TransformConfig.py.

341 def __len__(self):
342 """Return the total number of properties (this class plus all base classes)"""
343 return len(self.properties())
344
345

◆ __str__()

python.TransformConfig.TransformConfig.__str__ ( self,
prefix = '' )

Definition at line 423 of file TransformConfig.py.

423 def __str__(self,prefix=''):
424 me = JobConfig.__str__(self,prefix)
425 #
426 # add list of metadata
427 #
428 prefix += ' '*len(self.name())
429 me += os.linesep + prefix + 'MetaData attributes: '
430 if self.__metadata:
431 me += ','.join(self.__metadata)
432 else:
433 me += '(None)'
434 return me
435
436

◆ _attributeDictionary()

python.TransformConfig.JobConfig._attributeDictionary ( self)
protectedinherited
Dictionary to store the values. Used in the class Descriptor.

Definition at line 351 of file TransformConfig.py.

351 def _attributeDictionary(self):
352 """Dictionary to store the values. Used in the class Descriptor."""
353 return self.__attributes
354
355

◆ metaData()

python.TransformConfig.TransformConfig.metaData ( self)
A dictionary of metadata to be added to the metadata of the output files.
Values set to None will not be added to the list. Values will be converted to strings.
Python lists will be transformed to a string with comma separated entries.

Definition at line 437 of file TransformConfig.py.

437 def metaData(self):
438 """A dictionary of metadata to be added to the metadata of the output files.
439 Values set to None will not be added to the list. Values will be converted to strings.
440 Python lists will be transformed to a string with comma separated entries."""
441 meta = {}
442 for name in self.__metadata:
443 value = getattr(self,name)
444 if value is not None:
445 # turn a python list into a string with comma separated entries
446 if type(value).__name__ == 'list': value = ','.join([str(v) for v in value])
447 meta[name] = str(value)
448 return meta
449

◆ properties()

python.TransformConfig.JobConfig.properties ( self)
inherited
Return the full list of properties (the descriptors, not the values)

Definition at line 356 of file TransformConfig.py.

356 def properties(self):
357 """Return the full list of properties (the descriptors, not the values)"""

Member Data Documentation

◆ __attributes

dict python.TransformConfig.JobConfig.__attributes = {}
privateinherited

Definition at line 327 of file TransformConfig.py.

◆ __metadata

list python.TransformConfig.TransformConfig.__metadata = []
private

Definition at line 414 of file TransformConfig.py.

◆ __name

python.TransformConfig.JobConfig.__name = name
privateinherited

Definition at line 326 of file TransformConfig.py.

◆ __slots__

tuple python.TransformConfig.TransformConfig.__slots__ = ( '__metadata', )
staticprivate

Definition at line 398 of file TransformConfig.py.

◆ auxfiles

python.TransformConfig.TransformConfig.auxfiles = ListOfStrings("List of needed auxiliary files (to be found in DATAPATH)")
static

Definition at line 401 of file TransformConfig.py.

◆ efficiency

python.TransformConfig.TransformConfig.efficiency = Float("Event filtering efficiency (acceptance factor)", 1.0, AllowedExpression("0.0 < value <= 1.0") )
static

Definition at line 407 of file TransformConfig.py.

◆ maxeventsfactor

python.TransformConfig.TransformConfig.maxeventsfactor
static
Initial value:
= Float("maximum number of output events = minevents * maxeventsfactor",2.0,
AllowedExpression("value >= 1.0"))

Definition at line 403 of file TransformConfig.py.

◆ maxeventsstrategy

python.TransformConfig.TransformConfig.maxeventsstrategy
static
Initial value:
= String("what to do if number of input events is less than maxEvents",'INPUTEVENTS',
['IGNORE','INPUTEVENTS','ABORT'])

Definition at line 405 of file TransformConfig.py.

◆ minevents

python.TransformConfig.TransformConfig.minevents = Integer("minimum number of events in output file",0, AllowedExpression("value >= 0"))
static

Definition at line 402 of file TransformConfig.py.


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