Public Member Functions | |
def | __init__ |
def | saveCurrentDir |
def | saveDir |
def | changeDir |
def | restoreDir |
def | forget |
def | __del__ |
def | __enter__ |
def | __exit__ |
def | __init__ |
def | saveCurrentDir |
def | saveDir |
def | changeDir |
def | restoreDir |
def | forget |
def | __del__ |
def | __enter__ |
def | __exit__ |
Public Attributes | |
newDir | |
oldDir | |
Object changing ROOT directory while on scope. The purpose is to make a ROOT directory current only as long as it is needed. The most typical uses of this objects include the automatic restoration of the previous directory as the object falls out of scope. Two methods are supported: 1. function scope: def writeEverythingInto(dir, everything): dirChanger = ROOTutils.DirectoryChanger(dir) for item in everything: item.Write() # writeEverythingInto() 2. local scope (equivalent to using `activateDirectory()`): with DirectoryChanger(dir): for item in everything: item.Write() # with
Definition at line 172 of file icarusalg/icarusalg/gallery/helpers/python/ROOTutils.py.
def ROOTutils.DirectoryChanger.__init__ | ( | self, | |
newDir = None , |
|||
saveDir = None |
|||
) |
Definition at line 195 of file icarusalg/icarusalg/gallery/helpers/python/ROOTutils.py.
def ROOTutils.DirectoryChanger.__del__ | ( | self | ) |
Definition at line 214 of file icarusalg/icarusalg/gallery/helpers/python/ROOTutils.py.
def ROOTutils.DirectoryChanger.__init__ | ( | self, | |
newDir = None , |
|||
saveDir = None |
|||
) |
Definition at line 195 of file sbndcode/sbndcode/gallery/python/ROOTutils.py.
def ROOTutils.DirectoryChanger.__del__ | ( | self | ) |
Definition at line 214 of file sbndcode/sbndcode/gallery/python/ROOTutils.py.
def ROOTutils.DirectoryChanger.__enter__ | ( | self | ) |
Definition at line 217 of file icarusalg/icarusalg/gallery/helpers/python/ROOTutils.py.
def ROOTutils.DirectoryChanger.__enter__ | ( | self | ) |
Definition at line 217 of file sbndcode/sbndcode/gallery/python/ROOTutils.py.
def ROOTutils.DirectoryChanger.__exit__ | ( | self, | |
exc_type, | |||
exc_value, | |||
traceback | |||
) |
Definition at line 220 of file icarusalg/icarusalg/gallery/helpers/python/ROOTutils.py.
def ROOTutils.DirectoryChanger.__exit__ | ( | self, | |
exc_type, | |||
exc_value, | |||
traceback | |||
) |
Definition at line 220 of file sbndcode/sbndcode/gallery/python/ROOTutils.py.
def ROOTutils.DirectoryChanger.changeDir | ( | self | ) |
Definition at line 206 of file sbndcode/sbndcode/gallery/python/ROOTutils.py.
def ROOTutils.DirectoryChanger.changeDir | ( | self | ) |
Definition at line 206 of file icarusalg/icarusalg/gallery/helpers/python/ROOTutils.py.
def ROOTutils.DirectoryChanger.forget | ( | self | ) |
Definition at line 212 of file icarusalg/icarusalg/gallery/helpers/python/ROOTutils.py.
def ROOTutils.DirectoryChanger.forget | ( | self | ) |
Definition at line 212 of file sbndcode/sbndcode/gallery/python/ROOTutils.py.
def ROOTutils.DirectoryChanger.restoreDir | ( | self | ) |
def ROOTutils.DirectoryChanger.restoreDir | ( | self | ) |
Definition at line 209 of file icarusalg/icarusalg/gallery/helpers/python/ROOTutils.py.
def ROOTutils.DirectoryChanger.saveCurrentDir | ( | self | ) |
Definition at line 202 of file sbndcode/sbndcode/gallery/python/ROOTutils.py.
def ROOTutils.DirectoryChanger.saveCurrentDir | ( | self | ) |
Definition at line 202 of file icarusalg/icarusalg/gallery/helpers/python/ROOTutils.py.
def ROOTutils.DirectoryChanger.saveDir | ( | self, | |
ROOTdir | |||
) |
Definition at line 204 of file icarusalg/icarusalg/gallery/helpers/python/ROOTutils.py.
def ROOTutils.DirectoryChanger.saveDir | ( | self, | |
ROOTdir | |||
) |
Definition at line 204 of file sbndcode/sbndcode/gallery/python/ROOTutils.py.
ROOTutils.DirectoryChanger.newDir |
Definition at line 198 of file icarusalg/icarusalg/gallery/helpers/python/ROOTutils.py.
ROOTutils.DirectoryChanger.oldDir |
Definition at line 204 of file icarusalg/icarusalg/gallery/helpers/python/ROOTutils.py.