| The Gaudi Framework v27r1

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

- Namespace List
- Namespace Members

Functions | Variables
AthenaScenario Namespace Reference

## Functions
def | load_athena_scenario (filename)

## Variables
int | NUMBEROFEVENTS = 1
int | NUMBEROFEVENTSINFLIGHT = 1
int | NUMBEROFALGOSINFLIGHT = 1000
int | NUMBEROFTHREADS = 1
| CLONEALGOS = False
| DUMPQUEUES = False
int | VERBOSITY = 3
| NumberOfEvents = NUMBEROFEVENTS
| NumberOfEventsInFlight = NUMBEROFEVENTSINFLIGHT
| NumberOfAlgosInFlight = NUMBEROFALGOSINFLIGHT
| NumberOfThreads = NUMBEROFTHREADS
| CloneAlgos = CLONEALGOS
| DumpQueues = DUMPQUEUES
| Verbosity = VERBOSITY
tuple | ms = MessageSvc()
tuple | whiteboard = HiveWhiteBoard("EventDataSvc", EventSlots = NumberOfEventsInFlight)
tuple | evtloop = HiveEventLoopMgr()
tuple | app = ApplicationMgr()

## Function Documentation

def AthenaScenario.load_athena_scenario | ( |  | filename | ) |

Definition at line 29 of file AthenaScenario.py.

29 def load_athena_scenario(filename):
30 data = open(filename).read()
31 workflow = eval(data)
32 cpu_cruncher_algos = []
33 cpu_cruncher_algos_inputs = []
34 all_outputs = set()
35 all_inputs = set()
36 for algo in workflow["algorithms"]:
37 # Correct in presence of list wi
38 for starputs in ("inputs","outputs"):
39 algo[starputs] = [item.replace("/","_") for item in algo[starputs]]
40 if algo[starputs] == ['']: algo[starputs] = []
41 if algo[starputs] == ['dummy']: algo[starputs] = []
42 cleaned_inputs = [input for input in algo["inputs"] if (input not in algo["outputs"] ) ]
43
44 # fix double declaration of outputs (nokey)
45 cleaned_outputs = [output for output in algo["outputs"] if (output not in all_outputs)]
46 new_algo = CPUCruncher(algo["name"],
47 avgRuntime=float(algo["runtimes"][0]/1000000.),
48 DataInputs = cleaned_inputs,
49 DataOutputs = cleaned_outputs
50 )
51 cpu_cruncher_algos.append(new_algo)
52 all_outputs.update(algo["outputs"])
53 all_inputs.update(algo["inputs"])
54 cpu_cruncher_algos_inputs.append(algo["inputs"])
55
56 #look for the objects that haven't been provided within the job. Assume this needs to come via input
57 new_algo = CPUCruncher("input",
58 avgRuntime=1,
59 DataInputs=[],
60 DataOutputs=[item for item in all_inputs.difference(all_outputs)]
61 )
62 cpu_cruncher_algos.append(new_algo)
63 cpu_cruncher_algos_inputs.append([])
64
65 print [item for item in all_inputs.difference(all_outputs)]
66
67 print len(all_outputs)
68 print len(cpu_cruncher_algos)
69 return cpu_cruncher_algos,cpu_cruncher_algos_inputs
70
71 # Set output level threshold 2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL )
AthenaScenario.load_athena_scenario
def load_athena_scenario(filename)
Definition: AthenaScenario.py:29
CPUCruncher
Definition: CPUCruncher.py:1

## Variable Documentation

tuple AthenaScenario.app = ApplicationMgr()

Definition at line 89 of file AthenaScenario.py.

AthenaScenario.CLONEALGOS = False

Definition at line 15 of file AthenaScenario.py.

AthenaScenario.CloneAlgos = CLONEALGOS

Definition at line 24 of file AthenaScenario.py.

AthenaScenario.DUMPQUEUES = False

Definition at line 16 of file AthenaScenario.py.

AthenaScenario.DumpQueues = DUMPQUEUES

Definition at line 25 of file AthenaScenario.py.

tuple AthenaScenario.evtloop = HiveEventLoopMgr()

Definition at line 80 of file AthenaScenario.py.

tuple AthenaScenario.ms = MessageSvc()

Definition at line 72 of file AthenaScenario.py.

int AthenaScenario.NUMBEROFALGOSINFLIGHT = 1000

Definition at line 13 of file AthenaScenario.py.

AthenaScenario.NumberOfAlgosInFlight = NUMBEROFALGOSINFLIGHT

Definition at line 22 of file AthenaScenario.py.

int AthenaScenario.NUMBEROFEVENTS = 1

Definition at line 11 of file AthenaScenario.py.

AthenaScenario.NumberOfEvents = NUMBEROFEVENTS

Definition at line 20 of file AthenaScenario.py.

int AthenaScenario.NUMBEROFEVENTSINFLIGHT = 1

Definition at line 12 of file AthenaScenario.py.

AthenaScenario.NumberOfEventsInFlight = NUMBEROFEVENTSINFLIGHT

Definition at line 21 of file AthenaScenario.py.

int AthenaScenario.NUMBEROFTHREADS = 1

Definition at line 14 of file AthenaScenario.py.

AthenaScenario.NumberOfThreads = NUMBEROFTHREADS

Definition at line 23 of file AthenaScenario.py.

int AthenaScenario.VERBOSITY = 3

Definition at line 17 of file AthenaScenario.py.

AthenaScenario.Verbosity = VERBOSITY

Definition at line 26 of file AthenaScenario.py.

tuple AthenaScenario.whiteboard = HiveWhiteBoard("EventDataSvc", EventSlots = NumberOfEventsInFlight)

Definition at line 77 of file AthenaScenario.py.