WTI/Experiment Electronics/Data Processing: Go4

Previous tutorial 8  |    Go4   Example 9   |  Next tutorial 10

Tutorial 9

What do we have now

The setup of the steps now follows nicely our analysis. We split the events into sub system or detector branches. But we encountered problems with the step chain and IO. These can be easily solved by some additional provider steps. Fortunately we do not need new classes for them.

Set up parallel steps

For that we first create a directory and change to it. We enable Go4 by
> . go4login
Now 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.tar
> . ./rename.sh XXX St8
> make all
As before this should create a libGo4UserAnalysis.so library which is used by the standard Go4 analysis main program.
The most important components are as in tutorial 8:

setup.C
TSt8AnalysisTSt8Param
TSt8MakeUnp1TSt8EventUnp1
TSt8MakeCal1TSt8EventCal1
TSt8MakeUnp2TSt8EventUnp2
TSt8MakeCal2TSt8EventCal2
TSt8MakePhysTSt8EventPhys

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.

StepInputProcessorOutput
GetRawMBSdefaultnone
Unpack1Input of GetRawMakeUnp1EventUnp1
Cal1EventUnp1MakeCal1EventCal1
RestCal1EventCal1defaultnone
Unpack2Input of GetRawMakeUnp2EventUnp2
Cal2EventUnp2MakeCal2EventCal2
RestCal2EventCal2defaultnone
PhysicsInput of RestCal1 and RestCal2MakePhysEventPhys

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

The TSt8Analysis

This user analysis class provides the possibility to implement three functions:
UserPreLoop
UserEventFunc
UserPostLoop
In 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.

Running the analysis from shell

The built in random event generator is used as data source:
>go4analysis -events 100000
The 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.

Next tutorial


WTI Experiment Electronic Data Processing Group
Hans Essel , GSI Helmholtzzentrum für Schwerionenforschung mbH, GSI
Total 156, last 2024 Apr 26 09:32
Last update: 2009 Nov 24 16:11