Ejemplo n.º 1
0
      job.options().setString (ROOT.EL.Job.optXaodAccessMode, ROOT.EL.Job.optXaodAccessMode_athena)
    else:
      xAH_logger.info("\tusing class access mode: ROOT.EL.Job.optXaodAccessMode_class")
      job.options().setString( ROOT.EL.Job.optXaodAccessMode, ROOT.EL.Job.optXaodAccessMode_class )

    # formatted string
    algorithmConfiguration_string = []

    from xAODAnaHelpers import Config
    configurator = None

    if ".json" in args.config:
      # parse_json is json.load + stripping comments
      from xAODAnaHelpers.utils import parse_json
      xAH_logger.debug("Loading json files")
      algConfigs = parse_json(args.config)
      xAH_logger.debug("loaded the json configurations")
      # add our algorithm to the job
      configurator = Config()
      map(lambda x: configurator.setalg(x['class'], x['configs']), algConfigs)

    else:
      #  Executing the python
      #   (configGlobals and configLocals are used to pass vars
      configGlobals, configLocals = {}, {'args': args}
      execfile(args.config, configGlobals, configLocals)
      # Find the created xAODAnaHelpers.config.Config object and add its _algorithms to the Job
      for k,v in configLocals.iteritems():
        if isinstance(v, Config):
          configurator = v
          break
Ejemplo n.º 2
0
      job.options().setString (ROOT.EL.Job.optXaodAccessMode, ROOT.EL.Job.optXaodAccessMode_athena)
    else:
      xAH_logger.info("\tusing class access mode: ROOT.EL.Job.optXaodAccessMode_class")
      job.options().setString( ROOT.EL.Job.optXaodAccessMode, ROOT.EL.Job.optXaodAccessMode_class )

    # formatted string
    algorithmConfiguration_string = []

    from xAODAnaHelpers import Config
    configurator = None

    if ".json" in args.config:
      # parse_json is json.load + stripping comments
      from xAODAnaHelpers.utils import parse_json
      xAH_logger.debug("Loading json files")
      algConfigs = parse_json(args.config)
      xAH_logger.debug("loaded the json configurations")
      # add our algorithm to the job
      configurator = Config()
      map(lambda x: configurator.setalg(x['class'], x['configs']), algConfigs)

    else:
      #  Executing the python
      #   (configGlobals and configLocals are used to pass vars
      configGlobals, configLocals = {}, {'args': args}
      execfile(args.config, configGlobals, configLocals)
      # Find the created xAODAnaHelpers.config.Config object and add its _algorithms to the Job
      for k,v in configLocals.iteritems():
        if isinstance(v, Config):
          configurator = v
          break
Ejemplo n.º 3
0
            xAH_logger.info(
                "\tusing class access mode: ROOT.EL.Job.optXaodAccessMode_class"
            )
            job.options().setString(ROOT.EL.Job.optXaodAccessMode,
                                    ROOT.EL.Job.optXaodAccessMode_class)

        # formatted string
        algorithmConfiguration_string = []

        from xAODAnaHelpers import Config
        configurator = None

        if ".json" in args.config:
            # parse_json is json.load + stripping comments
            xAH_logger.debug("Loading json files")
            algConfigs = xAH_utils.parse_json(args.config)
            xAH_logger.debug("loaded the json configurations")
            # add our algorithm to the job
            configurator = Config()
            map(lambda x: configurator.setalg(x['class'], x['configs']),
                algConfigs)

        else:
            #  Executing the python
            #   (configGlobals and configLocals are used to pass vars
            configGlobals, configLocals = {}, {'args': args}
            execfile(args.config, configGlobals, configLocals)
            # Find the created xAODAnaHelpers.config.Config object and add its _algorithms to the Job
            for k, v in configLocals.iteritems():
                if isinstance(v, Config):
                    configurator = v
Ejemplo n.º 4
0
      xAH_logger.info("\tusing branch access mode: ROOT.EL.Job.optXaodAccessMode_athena")
      job.options().setString (ROOT.EL.Job.optXaodAccessMode, ROOT.EL.Job.optXaodAccessMode_athena)
    else:
      xAH_logger.info("\tusing class access mode: ROOT.EL.Job.optXaodAccessMode_class")
      job.options().setString( ROOT.EL.Job.optXaodAccessMode, ROOT.EL.Job.optXaodAccessMode_class )

    # formatted string
    algorithmConfiguration_string = []

    from xAODAnaHelpers import Config
    configurator = None

    if ".json" in args.config:
      # parse_json is json.load + stripping comments
      xAH_logger.debug("Loading json files")
      algConfigs = xAH_utils.parse_json(args.config)
      xAH_logger.debug("loaded the json configurations")
      # add our algorithm to the job
      configurator = Config()
      map(lambda x: configurator.setalg(x['class'], x['configs']), algConfigs)

    else:
      #  Executing the python
      #   (configGlobals and configLocals are used to pass vars
      configGlobals, configLocals = {}, {'args': args}
      execfile(args.config, configGlobals, configLocals)
      # Find the created xAODAnaHelpers.config.Config object and add its _algorithms to the Job
      for k,v in configLocals.iteritems():
        if isinstance(v, Config):
          configurator = v
          break