l4arch  -  data logger from L4 farm to archive

Authors:
        Ruben   Baghshetsyan  YerPhI - Yerevan, Armenia
        Sergey  Esenov        ITEP   - Moscow,  Russia
        Andreas Gellrich      DESY   - Zeuthen, Germany
        Serguei Moukhine      JINR   - Dubna,   Russia


Introduction
   The Data Logger contains software and hardware to collect event data from L4 nodes and to store them on mass storage.

   A multi-process environment was designed and implemented, using C/C++. The Arte process,  running on a L4 node, writes events to a shared memory segment (Figure-1). The Sender processes  on the same node reads events from the shared memory and sends them through the network, using tcp/ip, to a Receiver process which runs on the Logger Node. The Receiver process writes events to a shared memory segment. The Writer process, running on the Logger Node, reads events from the shared memory segment and writes them to disks to three streams: Full DST events, MINI DST events, Event Directory.  The Archiver process runs on a dedicated node which has access to disks and to osm, saves full DST files  and the Event Directory files to DESY Mass Storage System. The Stage process can be used for copiing files from Mass Storage System back to disk.

It is forseen to use a file stack on DLT tapes in case when osm-Robot does not work (processes DiskToDlt
and DltToDisk).

   All processes in this chain send monitoring messages (using rpm) to the Monitor process working  on a dedicated computer.

   The concept foresees a scalable system both for the sender side (up to a few hundred L4 Nodes) and  the receiver side (more than one Logger Node). This allows to optimize performance by structuring  the L4 farm in mini-farms, consisting of a few 10 nodes.

   A GUI written in Tcl/Tk allows to monitor the logging procedure (Figure-2). One can also make a printout of Monitor's  data via Print process.

   To support needs of the Data Logger and of online and offline Arte, the package gpack was implemented which allows to read/write events from/to three types of streams: "shared memory", "disk",  and "Event Directory" files. Fast event pre-selection in the offline job is possible via user provided SQL-like  control statements.

   There were made some mesurements of speed for different network protocols/packages used in HERA-B.

DAQ-stream
It was decided, that the DAQ-formatted event data (after the event building and before online Arte) should be logged. This has been implemented as an additional stream, so called DAQ stream.

A user's process calls the function (l4aLogEvt), which sends events to DaqReceiver process using RMP-flood protocol.The DaqReceiver, which works on a Logger Node, puts received events into the Shared Memory. Another process, DaqWriter, gets these events from the Shared Memory and writes them to files on a disk. After that these files are moved to the OSM-Robot by the Archiver process.

This function (l4aLogEvt) has the following three arguments: a pointer to the event, size of the event and the pointer to the event header structure. The last argument has the following fields. These fields, except the classmask, are used for creation of a file name.

Files are written in the following tree on the disk. Environment variable HB_ROOT_PATH shall point to the root of this tree. One can see that the structure of the DAQ subtree is similar to the structure of DST and MINI subtrees. The same tree is created on the OSM-Robot.
 

Processes
One can find Data Logger executables in $HBROOT/DATAMGR/pro/$HBBINTYPE/bin directory.
Possible parameters of a process are shown when process is started with -h parameter.
 
l4aSender
Usage: l4aReceiver [parameters]
-------------------------------
parameter            Default
-------------------------------
-L4Ahelp             OFF
-L4Adebug            OFF
-L4Agrr              OFF
-L4AmaxChildren:n    200

 

 
 
 

l4aReceiver
Usage: l4aReceiver [parameters]
-------------------------------
parameter            Default
-------------------------------
-L4Ahelp             OFF
-L4Adebug            OFF
-L4Agrr              OFF
-L4AmaxChildren:n    200

 

 
 
 
 
 

l4aWriter
Usage: l4aWriter [parameters]
-------------------------------
parameter            Default
-------------------------------
-L4Ahelp             OFF
-L4Adebug            OFF
-L4Agrr              OFF
-L4Ashm:shmSize      8000000

 

 
 
 
 
 

l4aRobot
Usage: l4aRobot [parameters]
-------------------------------
[-help] [-h] [-H]
 
[-L4Adetector:<DetectorName>]
[-L4Atest]              (DEFAULT  =on )
[-L4Adebug]             (DEFAULT  =off)
[-L4Areal]              (DEFAULT  =off)
[-L4AnoRunLog]          (DEFAULT  =use RunLog)
[-L4Agrr]               (DEFAULT  =off)
[-L4AdiskOccup:<n>]     (DEFAULT n=50%)
[-L4Aprint]             (DEFAULT  =off)
[-L4Aout:<output file>]
         (DEFAULT=/hb/www/doc/subgroup/shiftinfo/herab/runlog)
[-L4Amax:<event count>] (DEFAULT  =0)
[-L4Alen:<buffer size>] (DEFAULT  =100000)

 
l4aStage
usage: l4aStage [-help] [-h] [-H]
                <-L4ArunFrom:run>
                [-L4ArunTo:<run>]
                [-L4Adetector:<DetectorName>]
                [-L4AfileType:<daq/dst>] (DEFAULT=daq)
                [-L4Adisk:<diskPath>]    (DEFAULT=/hb/stage/)
                [-L4Aacs:<acsPath>]      (DEFAULT=/acs/data/)
                [-L4Atest]               (DEFAULT=on )
                [-L4Adebug]              (DEFAULT=off)
                [-L4Areal]               (DEFAULT=off)
                [-L4Afiles:<1,2,...,n>]  (DEFAULT=1,2,3,4,5)
                [-L4Afiles:0] for all files

 

 
 
 

l4aMonitor
Usage: l4aMonitor [parameters]
-------------------------------
parameter            Default
-------------------------------
-L4Ahelp             OFF
-L4Adebug            OFF
-L4Adetector:name    OFF

 

 
 
 

l4aDaqReceiver
usage: l4aDaqReceiver [-help] [-h] [-H]
                      [-L4Adetector:<DetectorName>]
                      [-L4Ashm:<shm size>]  (DEFAULT=8Mb)
                      [-L4Atest]            (DEFAULT=on )
                      [-L4Areal]            (DEFAULT=off)
                      [-L4Adebug]           (DEFAULT=off)
                      [-L4Agrr]             (DEFAULT=off)
                      [-L4Admon]            (DEFAULT=off)
               [-p:<partition name>] (DEFAULT=l4aDaqEmgPartition)
               [-n:<segments>      ] (DEFAULT=4)
               [-l:<segment size>  ] (DEFAULT=250000)

 

 
 
 
 
 

l4aDaqWriter
usage: l4aDaqWriter [-help] [-h] [-H]
                    [-L4Adetector:<DetectorName>]
                    [-L4Asize:<FileSizeLimit>] (DEFAULT=200Mb)
                    [-L4Ashm:<shm size>]       (DEFAULT=8Mb)
                    [-L4Atest]                 (DEFAULT=on )
                    [-L4Areal]                 (DEFAULT=off)
                    [-L4Adebug]                (DEFAULT=off)
                    [-L4Agrr]                  (DEFAULT=off)

 
DiskToDlt
usage: l4aDiskToDlt [--help] [--debug]
DltToDisk
usage: l4aDltToDisk [--help] [--debug]
l4aPrint
Usage: l4aPrint [parameters]
-------------------------------
parameter            Default
-------------------------------
-L4Ahelp             OFF
-L4Adetector:name    OFF

 

 
 
 
 
 

l4aLsRunCatalog
Usage: l4aLsRunCatalog

 

 
 
 

This process produces a listing of Run Catalogue.