diff --git a/python/hpsmc/tools.py b/python/hpsmc/tools.py index 550825763..38d11428a 100644 --- a/python/hpsmc/tools.py +++ b/python/hpsmc/tools.py @@ -235,22 +235,15 @@ def config(self, parser): if os.getenv("CONDITIONS_URL", None) is not None: self.conditions_url = os.getenv("CONDITIONS_URL", None) logger.debug('Set CONDITIONS_URL from environment: {}'.format(self.hps_java_bin_jar)) - if self.hps_fieldmaps_dir is None: - self.hps_fieldmaps_dir = "{}/share/fieldmap".format(self.hpsmc_dir) - if not os.path.isdir(self.hps_fieldmaps_dir): - raise Exception("The fieldmaps dir does not exist: {}".format(self.hps_fieldmaps_dir)) - logger.debug("Using fieldmap dir from install: {}".format(self.hps_fieldmaps_dir)) - else: - logger.debug("Using fieldmap dir from config: {}".format(self.hps_fieldmaps_dir)) def required_config(self): """! Return list of required configurations. - - Required configurations are: **hps_java_bin_jar**, **hps_fieldmaps_dir** + + Required configurations are: hps_java_bin_jar @retun list of required configurations. """ - return ['hps_java_bin_jar', 'hps_fieldmaps_dir'] + return ['hps_java_bin_jar'] def setup(self): """! Setup JobManager component.""" @@ -261,12 +254,6 @@ def setup(self): raise Exception("Steering '%s' not found in: %s" % (self.steering, self.steering_files)) self.steering_file = self.steering_files[self.steering] - logger.debug('Creating sym link to fieldmap dir: {}'.format(self.hps_fieldmaps_dir)) - if not os.path.islink(os.getcwd() + os.path.sep + "fieldmap"): - os.symlink(self.hps_fieldmaps_dir, "fieldmap") - else: - logger.warning('Link to fieldmap dir already exists!') - def cmd_args(self): """! Setup command arguments. @@ -926,11 +913,11 @@ def __init__(self, name, java_class, **kwargs): def required_config(self): """! Return list of required config. - - Required config are: **hps_java_bin_jar**, **hps_fieldmaps_dir** + + Required config are: **hps_java_bin_jar** @return list of required config """ - return ['hps_java_bin_jar', 'hps_fieldmaps_dir'] + return ['hps_java_bin_jar'] def cmd_args(self): """! @@ -949,24 +936,6 @@ def cmd_args(self): args.append(self.java_class) return args - def config(self, parser): - super().config(parser) - if self.hps_fieldmaps_dir is None: - self.hps_fieldmaps_dir = "{}/share/fieldmap".format(self.hpsmc_dir) - if not os.path.isdir(self.hps_fieldmaps_dir): - raise Exception("The fieldmaps dir does not exist: {}".format(self.hps_fieldmaps_dir)) - logger.debug("Using fieldmap dir from install: {}".format(self.hps_fieldmaps_dir)) - else: - logger.debug("Using fieldmap dir from config: {}".format(self.hps_fieldmaps_dir)) - - def setup(self): - logger.debug('Creating sym link to fieldmap dir: {}'.format(self.hps_fieldmaps_dir)) - if not os.path.islink(os.getcwd() + os.path.sep + "fieldmap"): - os.symlink(self.hps_fieldmaps_dir, "fieldmap") - else: - logger.warning('Link to fieldmap dir already exists!') - - class EvioToLcio(JavaTool): """! Convert EVIO events to LCIO using the hps-java EvioToLcio command line tool. @@ -1016,7 +985,6 @@ def optional_parameters(self): def setup(self): """! Setup EvioToLcio component.""" - super().setup() if self.steering not in self.steering_files: raise Exception("Steering '%s' not found in: %s" % (self.steering, self.steering_files)) self.steering_file = self.steering_files[self.steering]