- SimPEG.utils.call_hooks(match, mainFirst=False)#
Wrap a function to an instance of a class.
Use the following syntax:
@callHooks('doEndIteration') def doEndIteration(self): pass
This will call everything named _doEndIteration at the beginning of the function call. By default the main method (doEndIteration) is run after all of the sub methods (_doEndIteration*). This can be reversed by adding the mainFirst=True kwarg.