diff --git a/km3io/offline.py b/km3io/offline.py index 70f6887b2c0ba987ba6475ef6bdfe59116142cbd..854878450adea3914e8f58f8fa02c1512f7f5639 100644 --- a/km3io/offline.py +++ b/km3io/offline.py @@ -226,6 +226,15 @@ class OfflineReader: @classmethod def from_index(cls, source, index): + """Create an instance with a subtree of a given index + + Parameters + ---------- + source: ROOTDirectory + The source file. + index: index or slice + The index or slice to create the subtree. + """ instance = cls(fobj=source._fobj, data=source._data[index]) return instance