Eventbuilder and TRBnet plugin for DABC

Introduction

The future application for trbnet hardware for FAIR detector test beams (e.g. CBM, PANDA, R3B) requires to integrate such DAQ with other existing readout systems, such as MBS or certain CBMnet prototypes. This task has been solved in previous test beams with data acquisition framework DABC. Therefore a hadaq plugin has been developed for dabc with all features required:
  • to build trbnet events,
  • store them in hld format,
  • convert them to mbs event format for combining with other daq subsystems
  • provide online monitor server to connect Go4 analysis

Hadaq plugin for DABC

Availability:

The complete DABC framework is available at https://subversion.gsi.de/dabc/trunk/

This contains the actual hadaq plugin at https://subversion.gsi.de/dabc/trunk/plugins/hadaq

Components:

  • HldFile - input and output of hld file format
  • HldInput - read hadtu format from file
  • HldOutput- write hadtu format to file
  • UdpDataSocket - receive hadtu packets from trb frontend (single stream)
  • MbsTransmitterModule - wrap hadtu format into mbs event container output is mbs server or lmd file. this format is used in mbs subevent combiner and go4 monitoring unpacker
  • CombinerModule - do eventbuilding of hadtu format from several data streams. output is full event in hadtu format. Should provide functionality of old daq_evtbuild in the end.
  • Observer - Control system interface to hades shared memory. We use original hadaq code (worker and psxshm) and wrap it into dabc parameter scheme.

Applications:

  • HldConverter.xml - configuration to read hld file and write the hadtu events wrapped in mbs events to lmd file
  • HldServer.xml - configuration to read hld file and serve the hadtu events as mbs events at transport server dabc will wait 30 seconds before start processing, so go4 may connect to inspect data
  • NetmemServer.xml - configuration to receive hadtu buffers at udp socket and serve them as mbs events at transport/stream server
  • EventBuilder.xml -configuration to receive hadtu data at n udp sockets, and do a full eventbuilding. Output events can be served via mbs transmitter at transport/stream server. In parallel, output events can be written to hld file. May enable export of variables via shared mem to hades EPICS-based eventbuilder control system
  • EventBuilderDim.xml -as EventBuilder.xml, but shows how to activate additionally DIM control system export.

How to use

DABC is steered via xlm configuration files. To start a special application, just type dabc_run Myconfig.xml

Single trbnet input served to online monitor

dabc_run NetmemServer.xml

This will read from specified port and transfer data to mbs stream server. This can be evaluated by Go4 online monitor with matching unpacker (see below)

description will follow

Eventbuilder on single node

dabc_run EventBuilder.xml

Can do almost complete eventbuilding (emulates the "daq_netmem" "daq_evtbuild" production system). This includes the EPICS run control via shared memory!

Sample configuration file is as follows:

 

<?xml version="1.0"?>
<dabc version="1">
  <Context host="localhost" name="EventBuilder">
    <Run>
      <lib value="libDabcMbs.so"/>
      <lib value="libDabcHadaq.so"/>  
      <func value="InitHadaqEvtbuilder"/>
      <logfile value="hadaqevtbuild.log"/>
      <loglimit value="1000000"/>
    </Run>
    
  
     <MemoryPool name="Pool">
       <BufferSize value="65536"/>
       <NumBuffers value="10000"/>
    </MemoryPool>
    
     <!-- shmem control config -->
   <Observer name="shm">
     <DoShmControl value="true"/>
   </Observer>
    
    <Module name="Combiner">    
       <PoolName value="Pool"/>
       <DoShmControl value="true"/>  
       <DoFile value="true"/>
       <DoServer value="true"/>
       <BufferSize value="65536"/>
       <NumInputs value="5"/>
       <Port name="Input0">
          <HadaqUdpPort value="10101"/>
       </Port>
       <Port name="Input1">
          <HadaqUdpPort value="10102"/>
       </Port>
       <Port name="Input2">
          <HadaqUdpPort value="10103"/>
       </Port>
       <Port name="Input3">
          <HadaqUdpPort value="10104"/>
       </Port>
       <Port name="Input4">
          <HadaqUdpPort value="10105"/>
       </Port>       
       <Port name="Input*">
          <HadaqUdpBuffer value="200000"/>
          <DoShmControl value="true"/>  
          <!--HadaqUdpMTU value="64512"/-->   
          <BufferSize value="65536"/>
          <InputQueueSize value="1000"/>
       </Port>
        <Port name="ServerOutput">
          <OutputQueueSize value="1000"/>       
        </Port>  
       <Port name="FileOutput">
          <HadaqFileName value="/data.local1/adamczew/hld/dabc.hld"/>
          <HadaqEPICSControl value="true"/>
          <HadaqFileSizeLimit value="1600"/>       
        </Port> 

              
     </Module>
     
     <Module name="OnlineServer">
       <Port name="Output">
          <MbsServerKind value="Stream"/>
          <!--MbsServerPort value="6543"/-->
        </Port>
     </Module>

     
     
  </Context>
</dabc>




Eventbuilders on multiple nodes

To do

Combining trbnet frontends and other DAQ

To do

idea: data streams of different frontendes are synchronized by counter message. All inputs are wrapped in mbs subevent containers. Combination is done with existing mbs combiner module in dabc, regarding the position of the sync word in the data payload.

Go4 online monitoring for hadaq/DABC

proper description will follow

The complete Go4 framework is available at https://subversion.gsi.de/go4/trunk/

The hadaq skeleton (actually used for PANDA-DIRK TOF) is at https://subversion.gsi.de/go4/trunk/applications/hadaq-go4

Documentation

This presentation for the GSI Experiment-Electronics Department meeting gives an overview of the software status in July 2012: DABC-TRB-EEmeeting.pdf


-- JoernAdamczewski - 17 Jul 2012

I Attachment Action Size Date Who Comment
DABC-TRB-EEmeeting.pdfpdf DABC-TRB-EEmeeting.pdf manage 521 K 2012-07-17 - 17:10 JoernAdamczewski Report on new hadaq data format plugins for Go4 and DABC
Topic revision: r2 - 2012-07-17, JoernAdamczewski
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki Send feedback | Imprint | Privacy Policy (in German)