| The Gaudi Framework v28r2-patches (bc4ad17a)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Public Attributes | List of all members
GaudiHive.precedence.RealTimeValue Class Reference
Inheritance diagram for GaudiHive.precedence.RealTimeValue:
[legend]
Collaboration diagram for GaudiHive.precedence.RealTimeValue:
[legend]

## Public Member Functions
def | __init__ (self, path, defaultTime, factor=1)
def | get (self, algoName='')

## Public Attributes
| path
| factor
| defaultTime
| varRuntime
| file
| timings

## Detailed Description

    A class to manage real algorithm timing

Definition at line 33 of file precedence.py.

## Constructor & Destructor Documentation

def GaudiHive.precedence.RealTimeValue.__init__ | ( |  | self,
|  |  | path,
|  |  | defaultTime,
|  |  | factor = `1`
| ) |  |

    defaultTime -- run time, assigned to an algorithm if no time is found in provided timing library
           (and it will also be scaled by the 'factor' argument)

Definition at line 36 of file precedence.py.

36 def __init__(self, path, defaultTime, factor = 1):
37 """
38 defaultTime -- run time, assigned to an algorithm if no time is found in provided timing library
39 (and it will also be scaled by the 'factor' argument)
40 """
41
42 self.path = os.path.realpath(_buildFilePath(path))
43 self.factor = factor
44 self.defaultTime = defaultTime # typically 0.05s
45 self.varRuntime = 0
46
47 self.file=open(self.path)
48 self.timings=json.load(self.file)
49
50
GaudiHive.precedence.RealTimeValue.__init__
def __init__(self, path, defaultTime, factor=1)
Definition: precedence.py:36
GaudiHive.precedence.RealTimeValue.timings
timings
Definition: precedence.py:48
GaudiHive.precedence.RealTimeValue.file
file
Definition: precedence.py:47
GaudiHive.precedence.RealTimeValue.varRuntime
varRuntime
Definition: precedence.py:45
GaudiHive.precedence.RealTimeValue.factor
factor
Definition: precedence.py:43
GaudiHive.precedence.RealTimeValue.defaultTime
defaultTime
Definition: precedence.py:44
GaudiHive.precedence._buildFilePath
def _buildFilePath(filePath)
Definition: precedence.py:8
GaudiHive.precedence.RealTimeValue.path
path
Definition: precedence.py:42

## Member Function Documentation

def GaudiHive.precedence.RealTimeValue.get | ( |  | self,
|  |  | algoName = `''`
| ) |  |

    Get time for a given algorithm name

Definition at line 51 of file precedence.py.

51 def get(self, algoName = ''):
52 """Get time for a given algorithm name"""
53
54 if algoName in self.timings:
55 time = float(self.timings[algoName])
56 else:
57 capAlgoName = algoName[0].upper() + algoName[1:len(algoName)]
58
59 if capAlgoName in self.timings:
60 time = float(self.timings[capAlgoName])
61 else:
62 time = self.defaultTime
63 print "WARNING: TimiNg for %s (or %s) not found in the provided library, using default one: %s" %(algoName,capAlgoName,time)
64
65 time = time * self.factor
66
67 return time, self.varRuntime
68
GaudiHive.precedence.RealTimeValue.get
def get(self, algoName='')
Definition: precedence.py:51
GaudiHive.precedence.RealTimeValue.timings
timings
Definition: precedence.py:48
GaudiHive.precedence.RealTimeValue.varRuntime
varRuntime
Definition: precedence.py:45
GaudiHive.precedence.RealTimeValue.factor
factor
Definition: precedence.py:43
GaudiHive.precedence.RealTimeValue.defaultTime
defaultTime
Definition: precedence.py:44

## Member Data Documentation

GaudiHive.precedence.RealTimeValue.defaultTime

Definition at line 44 of file precedence.py.

GaudiHive.precedence.RealTimeValue.factor

Definition at line 43 of file precedence.py.

GaudiHive.precedence.RealTimeValue.file

Definition at line 47 of file precedence.py.

GaudiHive.precedence.RealTimeValue.path

Definition at line 42 of file precedence.py.

GaudiHive.precedence.RealTimeValue.timings

Definition at line 48 of file precedence.py.

GaudiHive.precedence.RealTimeValue.varRuntime

Definition at line 45 of file precedence.py.

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

- GaudiHive/python/GaudiHive/precedence.py