-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathviva
More file actions
executable file
·80 lines (57 loc) · 1.64 KB
/
viva
File metadata and controls
executable file
·80 lines (57 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/usr/bin/python3.6 -u
#Main script for the Very Independent VEGAS Analysis (VIVA)
import sys
from plutils import *
def section():
print('-'*25)
section()
print('VIVA starting-up!')
print('It\'s a great day for SCIENCE!')
print('Believe me, we will have the best SCIENCE!')
section()
print('Attempting to read in the instructions file...')
inst_filename = sys.argv[1]
try:
f = open(inst_filename)
except OSError:
print("Instructions file ", inst_filename, " could not be opened.")
raise
else:
f.close()
print('Reading instructions from {0}'.format(inst_filename))
section()
print('Building configuration dictionary...')
read_inst = instreader.InstFileReader(inst_filename)
configdict = read_inst.get_config_dict()
print ('Configuration Dictionary:\n', configdict)
section()
print('Establishing DB connection...')
dbcnx=database.DBConnection(configdict=configdict)
print('host = ', dbcnx.host)
print('online_db = ', dbcnx.online_db)
print('offline_db = ', dbcnx.offline_db)
print('user = ', dbcnx.user)
section()
print('Initializing the run manager...')
rgm = runmanager.RunGroupManager(configdict,dbcnx)
section()
print('Initalizing the analysis core...')
ac = analysis.AnalysisCore(configdict=configdict, runmanager=rgm)
print('Status = {0}'.format(ac.get_status()))
section()
print('Executing the analaysis...')
try:
ac.execute()
except:
raise
finally:
section()
print('+++++ Final Status +++++')
ac.print_status()
section()
print('Cleaning up...')
ac.clean_up()
section()
print('All done here!')
print('Even if I reported no errors, it is still reccomended to inspect the')
print('.error, .out, and .log files in the output directories.')