From b43b83beead92ff7cf28a5fe5a2710537268aae1 Mon Sep 17 00:00:00 2001 From: Jonathan Herman Date: Mon, 26 Nov 2012 17:06:27 -0500 Subject: Read locations of binary files from path instead of config.py. --- experiment/executable/ftcat.py | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 experiment/executable/ftcat.py (limited to 'experiment/executable/ftcat.py') diff --git a/experiment/executable/ftcat.py b/experiment/executable/ftcat.py deleted file mode 100644 index 5da8fa7..0000000 --- a/experiment/executable/ftcat.py +++ /dev/null @@ -1,33 +0,0 @@ -import os -import stat - -from executable import Executable - -class FTcat(Executable): - '''Used to wrap the ftcat binary in the Experiment object.''' - - def __init__(self, ft_cat_bin, stdout_file, stderr_file, dev, events, cpu=None): - '''Extends the Executable initializer method with ftcat attributes.''' - - # hack to run FTCat at higher priority - chrt_bin = '/usr/bin/chrt' - - super(FTcat, self).__init__(chrt_bin) - self.stdout_file = stdout_file - self.stderr_file = stderr_file - - mode = os.stat(dev)[stat.ST_MODE] - if not mode & stat.S_IFCHR: - raise Exception("%s is not a character device" % dev) - - if events is None: - raise Exception('No events!') - - # hack to run FTCat at higher priority - self.extra_args = ['-f', '40'] - if cpu is not None: - # and bind it to a CPU - self.extra_args.extend(['/usr/bin/taskset', '-c', str(cpu)]) - events_str_arr = map(str, events) - self.extra_args.extend([ft_cat_bin, dev] + events_str_arr) - -- cgit v1.2.2