Beispiel #1
0
    def __init__(self, **kwargs):
        # Handle whatever kwargs we want here
        self.input_files = kwargs.get("input_files", [])
        self.auxiliary_files = kwargs.get("auxiliary_files", [])
        self.dataset = kwargs.get("dataset", None)
        self.work_area = kwargs.get("work_area", "./")
        self.request_name = kwargs.get("request_name", None)
        self.plugin_name = kwargs.get("plugin_name", "Analysis")
        self.pset_location = kwargs.get("pset_location", None)
        self.job_splitting = kwargs.get("job_splitting", "FileBased")
        self.units_per_job = kwargs.get("units_per_job", 1)
        hadoop_user = os.environ.get("GRIDUSER",os.environ.get("USER"))  # NOTE, might be different for some weird folks
        # # foolproof way of finding username, but slow. above is probably equivalent (see setup.sh): getUsernameFromSiteDB()
        self.out_lfn_dir_base = kwargs.get("out_lfn_dir_base", "/store/user/{0}/ProjectMetis/".format(hadoop_user))
        self.output_primary_dataset = kwargs.get("output_primary_dataset", "ProjectMetisTest")
        self.input_DBS_instance = kwargs.get("input_DBS_instance", "global")
        self.storage_site = kwargs.get("storage_site", "T2_US_UCSD")
        self.whitelist = kwargs.get("whitelist", ["T2_*"])
        self.min_completion_fraction = kwargs.get("min_completion_fraction", 1.0)

        self.check_needed_params()

        self.crab_config = None
        self.unique_request_name = None
        self.task_dir = os.path.join(self.work_area, "{0}".format(self.request_name))
        self.status_output = {}

        self.logger = logging.getLogger(setup_logger())


        setConsoleLogLevel(LOGLEVEL_MUTE)
Beispiel #2
0
    def __init__(self, **kwargs):
        self.kwargs = kwargs

        self.requirements = kwargs.get("requirements", [])

        # Set all values on class instance
        for key, value in self.kwargs.items():
            setattr(self, key, value)

        self.hash = self.get_task_hash()
        self.logger = logging.getLogger(setup_logger())
        self.basedir = "./"
        if not hasattr(self, "unique_name"):
            self.unique_name = self.hash
        # if not hasattr(self, "to_backup"):
        #     self.to_backup = []

        if not self.kwargs.get("no_load_from_backup", False):
            self.load()
Beispiel #3
0
    def __init__(self, **kwargs):
        # Handle whatever kwargs we want here
        self.info = {
            "tier": kwargs.get("tier", "CMS3"),
            "dataset": kwargs.get("dataset", None),
            "gtag": kwargs.get("gtag", None),
            "kfact": kwargs.get("kfact", 1.),
            "xsec": kwargs.get("xsec", 1.),
            "efact": kwargs.get("efact", 1.),
            "filtname": kwargs.get("filtname", None),
            "analysis": kwargs.get("analysis", None),
            "tag": kwargs.get("tag", None),
            "version": kwargs.get("version", None),
            "nevents_in": kwargs.get("nevents_in", None),
            "nevents": kwargs.get("nevents", None),
            "location": kwargs.get("location", None),
            "status": kwargs.get("status", None),
            "twiki": kwargs.get("twiki", None),
            "comments": kwargs.get("comments", None),
            "files": kwargs.get("files", []),
        }

        self.logger = logging.getLogger(setup_logger())
Beispiel #4
0
    def __init__(self, tasks):
        self.tasks = tasks

        self.logger = logging.getLogger(setup_logger())