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

Public Member Functions

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

Protected Member Functions

 _attributeDictionary (self)

Private Attributes

 __name = name
dict __attributes = {}

Static Private Attributes

tuple __slots__ = ( '__name', '__attributes' )

Detailed Description

Definition at line 316 of file TransformConfig.py.

Constructor & Destructor Documentation

◆ __init__()

python.TransformConfig.JobConfig.__init__ ( self,
name = 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 319 of file TransformConfig.py.

319 def __init__(self,name=None):
320 """name is used in printout. The default name is derived from the filename of the python file
321 where constructor is called"""
322
323 if name is None:
324 filename = os.path.basename(sys._getframe(1).f_code.co_filename)
325 name = os.path.splitext(filename)[0]
326 self.__name = name
327 self.__attributes = {} # dictionary to store values of attributes (managed by Descriptors)
328
329

Member Function Documentation

◆ __iter__()

python.TransformConfig.JobConfig.__iter__ ( self)
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)
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.JobConfig.__str__ ( self,
prefix = '' )

Definition at line 330 of file TransformConfig.py.

330 def __str__(self,prefix=''):
331 prefix += self.__name
332 me = []
333 for descr in self.properties():
334 name = descr.name()
335 value = getattr(self,name)
336 me.append( "%s.%s = %r \t# %s" % (prefix,name,value,descr.help()) )
337 prefix = ' '*len(prefix)
338 return os.linesep.join(me)
339
340

◆ _attributeDictionary()

python.TransformConfig.JobConfig._attributeDictionary ( self)
protected
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

◆ properties()

python.TransformConfig.JobConfig.properties ( self)
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 = {}
private

Definition at line 327 of file TransformConfig.py.

◆ __name

python.TransformConfig.JobConfig.__name = name
private

Definition at line 326 of file TransformConfig.py.

◆ __slots__

tuple python.TransformConfig.JobConfig.__slots__ = ( '__name', '__attributes' )
staticprivate

Definition at line 317 of file TransformConfig.py.


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