main daq online monitor - E1039-Collaboration/e1039-wiki GitHub Wiki
Online Monitor (OnlMon) for Main DAQ Data
This page explains the procedure for modifying/adding an OnlMonClient class. Each subsytem group is expected to develop and maintain its OnlMonClient class(es).
Prerequisite
The OnlMon system is based on the Fun4All framework for the event processing.
If you have never used the Fun4All macro and the SubsysReco
module, please first try e1039-analysis/AnaRealDst
for example.
You should be able to modify one of the modules (like AnaHodoHit
), rebuild the source code and execute Fun4All.C
.
The code structure of the whole OnlMon system is explained in e1039-core/online/onlmonserver/README.md. Please read it through first.
Preparation
You first fork or synchronize the latest version of the E1039-Collaboration/e1039-core
GitHub repository.
You will modify or add a class under e1039-core/online/onlmonserver/
, test it and create a pull request.
You then login to spinquestana1
and clone your forked repository at ~/e1039/git/yours/e1039-core
for example.
It should be better that you create a branch for development (devel_onlmon
) as follows;
ssh spinquestana1.fnal.gov
cd e1039/git/yours
git clone [email protected]:yours/e1039-core.git
cd e1039-core
git checkout -b devel_onlmon
Modification or Addition of OnlMonClient
You do cd online/onlmonserver/
and modify or add a OnlMonClient
class for your subsystem.
- If you modify an existing class (like
OnlMonV1495.(h|cc)
), you can just do that. - If you add a new class, you are recommended to start with copying an existing class that has a similar function. Note that you have to add the new class to
LinkDef.h
.
After (or while) you make the new OnlMonClient
class, you build e1039-core
in your local directory.
Below are the typical commands to do that, where the word auto
sets the install directory to ~/e1039/git/yours/core-inst/
.
cd ~/e1039/git/yours/e1039-core
./script/setup-install.sh auto
source ../core-inst/this-e1039.sh
./build.sh
When you rebuild online/onlmonserver/
(when the build failed or you make new changes), you can use the -s
option;
./build.sh -s online/onlmonserver
Test of Modified or New OnlMonClient
The test should use one of the ended runs (not the run being taken) due to several limitations at present. Run 3620 is assumed to be used here.
You can use the text terminal that you are using for build.sh
.
You have to do source ../core-inst/this-e1039.sh
at least once after a successful build.
online/macros/TestOnlMonClient.C
is the macro to run OnlMon clients in a test environment.
You edit the macro to register your client.
You then execute the following command, which processes 10,000 events of run 3620;
root -b 'online/macros/TestOnlMonClient.C(3620, 10000)'
The OnlMon output files will appear under /dev/shm/$USER/onlmon/plots
.
You confirm that they are all reasonable.
If you are adding a new client,
you edit Fun4MainDaq.C
and OnlMon4MainDaq.C
under online/macros/
, in order to activate the new client in the real-time online monitoring.
Adoption of Updated Version
You push the new version to your GitHub repository and make a pull request. Then the online software manager (Kenichi) will test it, merge it and update the online core library. The manager will post an elog entry to explain when (in which run) the updated version took effect. You should confirm that the updated version is running fine.