Making that mechanism into a framework
Given that basic principle, we have made a framework.
- It loads libraries and sets up root for threads
- it provides you with a handful of commands to steer the analysis
- at well-defined points, it calls your routines (which you provide)
- at your command, it will start the analysis background thread until it terminates or you stop it.
- From the command prompt, you get access to all histos, etc.
In its simplest form, you provide 2 functions (copy from template)
- int pinit() -- initialize, get histo factory, book histos, open files, etc.
- int process_event (Event * evt) -- process an event, which is delivered by the framework.
This is the top-level entry to your analysis -- you are free to call or make whatever function or whatever object is needed for the analysis. You can use nodes, the histo factory, the toolbox, all the goodies.
We called this framework “pmonitor”.