WTI/Experiment Electronics/Data Processing: Go4 |
Previous tutorial 8 | | Go4 | Example 9 | | Next tutorial 10 |
> . go4loginNow the variable GO4SYS should point to the top Go4 directory. Copy the tarball tut09.tar from Example above into your directory and unpack it to your new directory:
> tar xvf tut09.tarAs before this should create a libGo4UserAnalysis.so library which is used by the standard Go4 analysis main program.
> . ./rename.sh XXX St8
> make all
setup.C | |
TSt8Analysis | TSt8Param |
TSt8MakeUnp1 | TSt8EventUnp1 |
TSt8MakeCal1 | TSt8EventCal1 |
TSt8MakeUnp2 | TSt8EventUnp2 |
TSt8MakeCal2 | TSt8EventCal2 |
TSt8MakePhys | TSt8EventPhys |
Note that we have a new TSt8Analysis. The role of it is described below. The table below shows the setup as it is done in the setup file.
Step | Input | Processor | Output |
GetRaw | MBS | default | none |
Unpack1 | Input of GetRaw | MakeUnp1 | EventUnp1 |
Cal1 | EventUnp1 | MakeCal1 | EventCal1 |
RestCal1 | EventCal1 | default | none |
Unpack2 | Input of GetRaw | MakeUnp2 | EventUnp2 |
Cal2 | EventUnp2 | MakeCal2 | EventCal2 |
RestCal2 | EventCal2 | default | none |
Physics | Input of RestCal1 and RestCal2 | MakePhys | EventPhys |
The figure shows the data flow:
We have as before five "execution" steps: 2 unpack, 2 calibrate and physics. Each of these steps has a processor (Make) producing an output event (Event). In addition we have 3 data server steps without processor and output: GetRaw, RestCal1 and RestCal2. E.g RestCal1 gets its input event either from Cal1 or from file (by configuration). Step Physics gets by call in TSt8MakePhys::BuildEvent this event as input independend if it was produced by Cal1 or restored by framework from file.
The new steps are implemented in setup.C. New event inputs are in TSt8MakeUnp1.cxx, TSt8MakeUnp2.cxx and TSt8MakePhys.cxx
UserPreLoopIn UserPreLoop called after setting up all steps and objects we can check if all steps are set up properly, e.g. that RestCal1 and RestCal2 are enabled when Physics is enabled. Because the step chain is broken we had to switch off step checking by framework and should do it ourselves. In addition one may do some other initializations, e.g. needed in function UserEventFunc (called after the steps) and UserPostLoop. The example output shows when these functions are called.
UserEventFunc
UserPostLoop
>go4analysis -events 100000The output shows in detail what happens like in the previous examples. After having processed the 100000 events, the program terminates and has produced a root file which we now inspect using the Go4 browser.
When running the analysis from GUI you will see now eight tabs, one for each step. The source/store radio buttons refer to file IO: Enable source means get event from file, otherwise from previous step, Enable store means store events to file. The first step logically must have an enabled source. These three step control settings can be seen in the tab headers by x or o.
You can try in the configuration window to enable (file) source of the Physics step or enable (file) store of the RestCal steps. You will see that it tells you: there is no source for Physics and no store for RestCal. If you enable store for Physics, the file name from the setup.C appears. In the next tutorial we will operate this sophisticated setup.