Inserting CallgrindProfile to the control flow
One possible solution is like this
from PyConf.Algorithms import CallgrindProfile
def callgrind_profile(start=5, stop=115):
p = CallgrindProfile(StartFromEventN = start,
StopAtEventN = stop,
DumpAtEventN = stop,
DumpName = 'CALLGRIND-OUT')
return p
def standalone_hlt2_full_track_reco(profiling=True):
hlt2_tracks = hlt2_tracking.make_hlt2_tracks()
best_tracks = hlt2_tracks["Best"]
pvs = hlt1_tracking.make_pvs()
nodes = [hlt1_tracking.require_gec()] + [best_tracks["v1"], pvs]
if profiling:
nodes += [callgrind_profile()]
return CompositeNode(
'lazy_and',
children=nodes, combineLogic=NodeLogic.LAZY_AND,
forceOrder=True)
It would be nice to have
- this as an option in the app
- updated documentation on this here