WTI/Experiment Electronics/Data Processing: Go4 |
Previous tutorial 5 | | Go4 | set_Par1.C | set_cHis1.C | | Next tutorial 7 |
gROOT->ProcessLine("setup.C()");But we can also execute macros interactively from the GUI:
Unix.*.Root.MacroPath: .:$(ROOTSYS)/macrosand add the Go4 macro directory:
Unix.*.Root.MacroPath: .:$(GO4SYS)/macros:$(ROOTSYS)/macros
.x savecond.C("*","set")It will produce one macro for each condition matching the name wildcard, e.g.: set_cHis1.C(flags,counters,reset) (we have only one condition cHis1). You can copy this output macro from above. This macro could be executed in the TSimProc.cxx constructor after we created the condition.
gROOT->ProcessLine(".x set_cHis1.C(1,0,1)");The flags argument restores the flags, the counters the counters, and reset cleares the counters if 1.
.x saveparam.C("*","set")It will produce one macro for each parameter matching the name wildcard, e.g.: set_Par1.C (we have only one parameter Par1). You can copy this output macro from above. This macro could be executed in the TSimProc.cxx constructor after we created the parameter.
gROOT->ProcessLine(".x set_Par1.C()");Using this method one can change parameters and conditions interactively, but store the settings independently of autosave files which are optional. The generated macros can be used as templates and might be modified directly. The settings in the analysis are always predictable.
Both macros can be used also in ROOT CINT to generate the macros from conditions and parameters in a file, i.e. autosave file. In this case add the file name as first argument.
> root
> root [0] .x saveparam.C("result.root","Par*","treeset")