When stnana.C is loaded, an object of StnAnaGlobals_t type is created. This object is accessible under the name ‘g’ and is defined in Stntuple/scripts/global_vars.h . The most important one, g.x , points to the Stntuple event loop utility, TStnAna
root [2] g.x
(class TStnAna*)0x1ff0afb0
g structure is initialized during the first call to stnana(...) . After that, one can access g and its data members interactively. By accessing TStnAna object interactively one can:
root [2] g.x->Continue(1)
root [2] g.x->Continue(100)
root [2] g.x->ProcessEvent(Run,Event)
root [2] g.x->ProcessEntry(101)
root [2] g.x->SaveHist(Filename)
A very important part of STNTUPLE functionality is that one has full interactive access to the data members of the modules running in the stnana event loop. The example below introduces the idea:
root [0] .L stnana.C
root [1] stnana("file","nts.user.egun_stnmaker.xxx.000001.stn","","","val_stn(11,28)",1)
... snip ...
----- end job: ---- Validation
>>> TStnAna::EndJob: processed 1 events, passed 1 events
Real time 0:00:00, CP time 0.090
root [2] stntuple::m_val->fTrackBlock->NTracks()
(int) 1
root [3] stntuple::m_val->fTrackBlock->Print()
-----------------------------------------------------------------------------------------------------------------------------------------------------
i nh na nw nosd nssd na0 ncl alg_mask id_word q p momerr T0 T0Err D0 Z0 TanDip TBack chi2/dof fcon TrkQual
-----------------------------------------------------------------------------------------------------------------------------------------------------
0 41 41 0 5 9 11 0 0x00030001 0x00000000 -1 -97.884 0.160 527.325 0.525 7.708 -440.249 0.6986 536.507 0.91 6.24e-01 0.960
root [3] g.x->Continue(1);
root [4] stntuple::m_val->fTrackBlock->NTracks()
(int) 0