Exemple #1
0
    def __init__(self, tfile, root='PWG2FEMTO'):
        if isinstance(tfile, (str, Path)):
            tfile = Path(tfile).expanduser()
            if not tfile.exists():
                raise FileNotFoundError(tfile.absolute())

            from ROOT import TFile
            tfile = TFile.Open(str(tfile))

        self.tfile = tfile
        self._rootcontainer = tfile.Get(root)

        self.container = self.find_first_subdir(self._rootcontainer)
        self.analysis = self.find_first_subdir(self.container)