How to use the ganga.GangaLHCb.Lib.LHCbDataset.LHCbDataset.LHCbDataset function in ganga

To help you get started, we’ve selected a few ganga examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ganga-devs / ganga / ganga / GangaLHCb / Lib / LHCbDataset / LHCbDataset.py View on Github external
def _checkOtherFiles(self, other ):
        if isType(other, GangaList) or isType(other, []):
            other_files = LHCbDataset(other).getFullFileNames()
        elif isType(other, LHCbDataset):
            other_files = other.getFullFileNames()
        else:
            raise GangaException("Unknown type for difference")
        return other_files
github ganga-devs / ganga / ganga / GangaLHCb / Lib / LHCbDataset / LHCbDataset.py View on Github external
def __init__(self, files=None, persistency=None, depth=0, fromRef=False):
        super(LHCbDataset, self).__init__()
        if files is None:
            files = []
        self.files = GangaList()
        process_files = True
        if fromRef:
            self.files._list.extend(files)
            process_files = False
        elif isinstance(files, GangaList):
            def isFileTest(_file):
                return isinstance(_file, IGangaFile)
            areFiles = all([isFileTest(f) for f in files._list])
            if areFiles:
                self.files._list.extend(files._list)
                process_files = False
        elif isinstance(files, LHCbDataset):
            self.files._list.extend(files.files._list)
github ganga-devs / ganga / ganga / GangaLHCb / Lib / LHCbDataset / LHCbDataset.py View on Github external
def _checkOtherFiles(self, other ):
        if isType(other, GangaList) or isType(other, []):
            other_files = LHCbDataset(other).getFullFileNames()
        elif isType(other, LHCbDataset):
            other_files = other.getFullFileNames()
        else:
            raise GangaException("Unknown type for difference")
        return other_files
github ganga-devs / ganga / ganga / GangaLHCb / Lib / LHCbDataset / LHCbDataset.py View on Github external
def difference(self, other):
        '''Returns a new data set w/ files in this that are not in other.'''
        other_files = self._checkOtherFiles(other)
        files = set(self.getFullFileNames()).difference(other_files)
        data = LHCbDataset()
        data.extend(list(files))
        data.depth = self.depth
        return data
github ganga-devs / ganga / ganga / GangaLHCb / Lib / LHCbDataset / LHCbDataset.py View on Github external
def intersection(self, other):
        '''Returns a new data set w/ files common to this and other.'''
        other_files = other._checkOtherFiles(other)
        files = set(self.getFullFileNames()).intersection(other_files)
        data = LHCbDataset()
        data.extend(list(files))
        data.depth = self.depth
        return data
github ganga-devs / ganga / ganga / GangaLHCb / Lib / LHCbDataset / LHCbDataset.py View on Github external
def symmetricDifference(self, other):
        '''Returns a new data set w/ files in either this or other but not
        both.'''
        other_files = other._checkOtherFiles(other)
        files = set(self.getFullFileNames()).symmetric_difference(other_files)
        data = LHCbDataset()
        data.extend(list(files))
        data.depth = self.depth
        return data
github ganga-devs / ganga / ganga / GangaLHCb / Lib / LHCbDataset / LHCbDataset.py View on Github external
def union(self, other):
        '''Returns a new data set w/ files from this and other.'''
        other_files = self._checkOtherFiles(other)
        files = set(self.getFullFileNames()).union(other_files)
        data = LHCbDataset()
        data.extend(list(files))
        data.depth = self.depth
        return data