vdmtools.plotting.HookType
- class vdmtools.plotting.HookType(value)
Hook type enumerations.
This enumeration is used to specify when the hooks should be called. The two possible values are:
CALL_ON_ENTRY
: This value specifies that the hooks should be called when the loop is entered.CALL_ON_EXIT
: This value specifies that the hooks should be called when the loop is exited.
To better ilustrate the difference between the two values, consider the following example:
for fit in fits: # [1] for correction in corrections: # [2] for detector in detectors: # [3] # [4] # [5] # [6]
The numbers in the comments are the entry and exit points of the loops. The following table shows when the hooks will be called for each value of the enumeration:
Hook table HookType
Iterator
Call Point
CALL_ON_ENTRY
fits
[1]
CALL_ON_EXIT
fits
[6]
CALL_ON_ENTRY
corrections
[2]
CALL_ON_EXIT
corrections
[5]
CALL_ON_ENTRY
detectors
[3]
CALL_ON_EXIT
detectors
[4]
Note
The hooks are called in the order specified in the
IStrategyPlugin.__METHOD_CALL_ORDER__
attribute.- CALL_ON_ENTRY = 1
- CALL_ON_EXIT = 2