Event builder clients based on the framework consist of a skeleton application, user code and a Makefile that builds the executable program that you run. In the previous section we looked at what is in the user code. In this section we will look at the last bits of customization you need to do in the skeleton application as well as how to modify the Makefile so that it will build your event builder client program correctly.
The framework skeleton application should be copied from $DAQROOT/skeletons/evbclient. $DAQROOT is the top level installation directory of NSCLDAQ-10.2 or higher.
In the last section we saw how to write a CEVBClientApp
class that provides data source specific code to get fragments from
a data source and make them available to the event builder.
The framework skeleton application provides a file
Main.cpp that starts the framework code.
One thing we need to do is to create an instance of our data
source code. The data source code's base class constructor
makes itself known to the framework.
This is shown in the highlighted parts of the code from Main.cpp below. The highlighted parts must be added by you:
Example 57-6. Configuring the event builder client framework
... #include <EVBFramework.h> #include "CEVBMyClient.h" ... int main(char** argv, int argc) { CEVBMyClient myCode; CEVBClientFramework::main(argv, argc); }
Note that the call to CEVBClientFramework::main(argv, argc)
passes in the command line parameters.
The Makefile is organized so that you can easily add your code by simply defining a few Makefile variables. These variables are:
USER_OBJECTS
The names of the object files generated by compiling your source files. If you have several object files they should be separated by whitespace.
USER_CXXFLAGS
If you have any C++ Compilation switches you want added add them here.
USER_CCFLAGS
If you you haave any C compilation switches you want added, add them here.
USER_LDFLAGS
If you have any loader flags you want added, add them here.