ATLAS Offline Software
Loading...
Searching...
No Matches
python.trfArgClasses.argIntList Class Reference

List of int arguments. More...

Inheritance diagram for python.trfArgClasses.argIntList:
Collaboration diagram for python.trfArgClasses.argIntList:

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

 value (self)
 Argument value getter.
 value (self, value)
 Argument value setter.
 __str__ (self)
 prodsysDescription (self)
 append (self, addme)
 Append a value to the list.
 __repr__ (self)
 Repr conversion.
 isRunarg (self)
 Return runarg status.
 name (self)
 Name getter.
 name (self, value)
 Name setter.
 __eq__ (self, other)
 Comparison is based on value attribute.
 __nq__ (self, other)
 __lt__ (self, other)
 __gt__ (self, other)

Protected Attributes

 _splitter = splitter
 _supressEmptyStrings = supressEmptyStrings
 _runarg = runarg
 _name = name
 _value = value

Detailed Description

List of int arguments.

Definition at line 414 of file trfArgClasses.py.

Member Typedef Documentation

◆ result

Definition at line 90 of file EDM_MasterSearch.h.

Member Function Documentation

◆ __eq__()

python.trfArgClasses.argument.__eq__ ( self,
other )
inherited

Comparison is based on value attribute.

Definition at line 161 of file trfArgClasses.py.

161 def __eq__(self,other):
162 return self.value == other.value
163

◆ __gt__()

python.trfArgClasses.argument.__gt__ ( self,
other )
inherited

Definition at line 170 of file trfArgClasses.py.

170 def __gt__(self, other):
171 return self.value > other.value
172

◆ __lt__()

python.trfArgClasses.argument.__lt__ ( self,
other )
inherited

Definition at line 167 of file trfArgClasses.py.

167 def __lt__(self, other):
168 return self.value < other.value
169

◆ __nq__()

python.trfArgClasses.argument.__nq__ ( self,
other )
inherited

Definition at line 164 of file trfArgClasses.py.

164 def __nq__(self, other):
165 return self.value != other.value
166

◆ __repr__()

python.trfArgClasses.argList.__repr__ ( self)
inherited

Repr conversion.

Return a python parsable string

Definition at line 409 of file trfArgClasses.py.

409 def __repr__(self):
410 return '[' + ','.join([ repr(s) for s in self._value ]) + ']'
411
412

◆ __str__()

python.trfArgClasses.argIntList.__str__ ( self)

Definition at line 448 of file trfArgClasses.py.

448 def __str__(self):
449 return " ".join([ str(el) for el in self._value ])
450

◆ append()

python.trfArgClasses.argList.append ( self,
addme )
inherited

Append a value to the list.

Parameters
addmeItem to add

Definition at line 398 of file trfArgClasses.py.

398 def append(self, addme):
399 self._value.append(addme)
400

◆ isRunarg()

python.trfArgClasses.argument.isRunarg ( self)
inherited

Return runarg status.

Definition at line 134 of file trfArgClasses.py.

134 def isRunarg(self):
135 return self._runarg
136

◆ name() [1/2]

python.trfArgClasses.argument.name ( self)
inherited

Name getter.

Reimplemented in python.trfArgClasses.argFile, and python.trfArgClasses.argFile.

Definition at line 139 of file trfArgClasses.py.

139 def name(self):
140 return self._name
141

◆ name() [2/2]

python.trfArgClasses.argument.name ( self,
value )
inherited

Name setter.

Reimplemented in python.trfArgClasses.argFile, and python.trfArgClasses.argFile.

Definition at line 144 of file trfArgClasses.py.

144 def name(self, value):
145 self._name = value
146

◆ prodsysDescription()

python.trfArgClasses.argIntList.prodsysDescription ( self)

Reimplemented from python.trfArgClasses.argList.

Definition at line 452 of file trfArgClasses.py.

452 def prodsysDescription(self):
453 desc = {'type' : 'list', 'listtype' : 'int'}
454 return desc
455
456
457# Special list which stores k:v pairs, where the value is an float (used for AthenaMP merge target size)

◆ value() [1/2]

python.trfArgClasses.argIntList.value ( self)

Argument value getter.

Returns
Current value

Reimplemented from python.trfArgClasses.argList.

Definition at line 418 of file trfArgClasses.py.

418 def value(self):
419 return self._value
420
421

◆ value() [2/2]

python.trfArgClasses.argIntList.value ( self,
value )

Argument value setter.

If we get a list then set that, otherwise we split a string on the splitter character

Exceptions
trfExceptions.TransformArgExceptionException thrown if any list member is not an int
trfExceptions.TransformArgExceptionException thrown is any int() conversion fails

Reimplemented from python.trfArgClasses.argList.

Definition at line 427 of file trfArgClasses.py.

427 def value(self, value):
428 if isinstance(value, list):
429 for v in value:
430 if not isinstance(v, int):
431 raise trfExceptions.TransformArgException(trfExit.nameToCode('TRF_ARG_ERROR'),
432 'Illegal value {0} in list of ints'.format(v))
433 self._value = value
434 elif value is None:
435 self._value = []
436 return
437 else:
438 try:
439 if self._supressEmptyStrings:
440 self._value = [ v for v in value.split(self._splitter) if v != '' ]
441 else:
442 self._value = value.split(self._splitter)
443 self._value = [ int(el) for el in self._value ]
444 except (AttributeError, ValueError):
445 raise trfExceptions.TransformArgException(trfExit.nameToCode('TRF_ARG_CONV_FAIL'),
446 'Failed to convert %s to a list of ints' % str(value))
447

Member Data Documentation

◆ _name

python.trfArgClasses.argument._name = name
protectedinherited

Definition at line 111 of file trfArgClasses.py.

◆ _runarg

python.trfArgClasses.argument._runarg = runarg
protectedinherited

Definition at line 110 of file trfArgClasses.py.

◆ _splitter

python.trfArgClasses.argList._splitter = splitter
protectedinherited

Definition at line 357 of file trfArgClasses.py.

◆ _supressEmptyStrings

python.trfArgClasses.argList._supressEmptyStrings = supressEmptyStrings
protectedinherited

Definition at line 358 of file trfArgClasses.py.

◆ _value

python.trfArgClasses.argument._value = value
protectedinherited

Definition at line 130 of file trfArgClasses.py.


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