예제 #1
0
    def __init__(self, j=None):
        """
        Constructor for results class.

        @param j: L{job} object of the corresponding job
        """
        import copy

        from Files import adf_filemanager
        self.files = adf_filemanager()

        if j is None:
            self.job = None
        else:
            self.job = copy.deepcopy(j)
        self._checksum = None
        self.fileid = None
예제 #2
0
    def import_tape_files(self, fn_list, tape_list):
        """
        Initialize adfresults by importing tape files.

        @param fn_list: a list of the files to import
        @type  fn_list: list of str
        @param tape_list: the tape numbers (i.e., 21 for TAPE21 etc.) corresponding to these files
        @type  tape_list: list of int
        """

        from Files import adf_filemanager
        self.files = adf_filemanager()

        name = ''
        for fn, tape in zip(fn_list, tape_list):
            os.symlink(fn, 'TAPE' + str(tape))
            name += fn + 'TAPE' + str(tape) + '\n'

        # use the name of the imported file as checksum
        self._checksum = os.path.abspath(name)

        self.files.add_results(self)
예제 #3
0
    def __init__(self):
        JobRunner.__init__(self)

        from Files import adf_filemanager
        self._files = adf_filemanager()