Changeset 17803
- Timestamp:
- 05/08/14 07:43:55 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fact/tools/pyscripts/pyfact/pyfact.py
r17794 r17803 4 4 # ETH Zurich, TU Dortmund 5 5 # 6 import sys 6 7 from ctypes import * 7 8 import numpy as np … … 15 16 # having it in PYTHONPATH is *not* sufficient 16 17 hostname = ROOT.gSystem.HostName() 17 if 'isdc' in hostname: 18 ROOT.gSystem.Load("/usr/lib64/libz.so") 19 elif ('neiseLenovo' in hostname or 'factcontrol' in hostname): 20 ROOT.gSystem.Load("/usr/lib/libz.so") 21 elif ("max-K50AB" in hostname or "watz" in hostname or "TPK-Ubuntu" in hostname): 22 ROOT.gSystem.Load("/usr/lib/x86_64-linux-gnu/libz.so") 23 elif ("grolsch" in hostname): 24 ROOT.gSystem.Load("/usr/lib/i386-linux-gnu/libz.so") 25 else: 26 print "Error,Warning,Whatever libz stuff makes me crazy." 18 libz_path_dict = { 19 # hostname : /path/to/libz.so 20 'isdc' : "/usr/lib64/libz.so", 21 'neiseLenovo' : "/usr/lib/libz.so", 22 'factcontrol' : "/usr/lib/libz.so", 23 "max-K50AB" : "/usr/lib/x86_64-linux-gnu/libz.so", 24 "watz" : "/usr/lib/x86_64-linux-gnu/libz.so", 25 "grolsch" : "/usr/lib/i386-linux-gnu/libz.so", 26 } 27 libz_loaded = False 28 for my_hostname in libz_path_dict: 29 if my_hostname in hostname: 30 ROOT.gSystem.Load(libz_path_dict[my_hostname]) 31 libz_loaded = True 32 if not libz_loaded: 33 print """Warning - Warning - Warning - Warning - Warning - Warning - Warning 34 I most probably need to load libz.so but I don't know where it is. 35 36 Please edit pyfact.py around line 16-24 and insert your hostname and your 37 path to your libz.so 38 Sorry for the inconvenience. 39 """ 40 sys.exit(-1) 41 27 42 28 43 root_make_string = ROOT.gSystem.GetMakeSharedLib() … … 1015 1030 if __name__ == '__main__': 1016 1031 """ tests """ 1017 import sys1018 1032 1019 1033 f = fits(sys.argv[1])
Note:
See TracChangeset
for help on using the changeset viewer.