![]() |
mesytec_data 1.1.1
Toolkit for parsing Mesytec VME module data
|
Website and class reference documentation: https://mesytec-ganil.pages.in2p3.fr/mesytec_data/
This package provides the shared library
for analysing Mesytec data.
It can also provide the executable application
which encapsulates data received from the Mesytec acquisition application mvme
into GANIL MFM metaframe format data (with frame type 0x4ADF
) which are published on a ZeroMQ port: see below for more details.
The shared library
defines a Narval actor which can receive data from a ZeroMQ port and inject it into the Narval dataflow (this can be used with any type of data, not only Mesytec. The actor simply copies the incoming buffer to its output buffer).
It can also provide the
library if ROOT is found on the system, which can be used to automatically convert Mesytec data to the TTree format.
CMake version 3.12 or later. C++ compiler with at least C++11 compatibility.
Configure the build with CMake option -DENABLE_RECEIVER_TRANSMITTER=ON
Required to build mesytec_receiver_mfm_transmitter
and libzmq_narval_receiver.so
.
If installed from Ubuntu/Debian packages, make sure to install the dev
package.
If you have more than one version on your system in different places, you can specify the path to use when configuring the build by setting either ZeroMQ_DIR
or ZeroMQ_ROOT
CMake variable with the path to use (see below).
replacing [source_dir], [install_dir] and [ncpu] with appropriate values
The CMAKE_BUILD_TYPE
determines the amount of optimisation of code: for production versions, use Release or RelWithDebInfo for the fastest execution.
To build mesytec_receiver_mfm_transmitter
add option -DENABLE_RECEIVER_TRANSMITTER=ON
.
If required, add -DZeroMQ_DIR=[path]
or -DZeroMQ_ROOT=[path]
to use a specific installation of ZeroMQ.
Parsing data requires a file containing the definitions of modules in the VME crate, and optionally a file with a correspondence between each bus/channel and detector.
Each line has the format: name, crate-address, number_channels, firmware
crate-address
is the HW address of the module: remember that Mesytec data only uses the top two nibbles of these addresses, therefore make sure all modules have addresses such as 0xXY
, not 0x0XY
or 0x00XY
.
number_channels
is the number of channels (16 or 32) for MDPP modules, number of buses for VMMR (each bus is assumed to have 128 subaddresses).
firmware
can be: (note that only MDPP modules can have different firmwares; for other modules the 'firmware' is used to define the type of the module - KLUDGE!)
Each line has the format: crate-address, channel_number, name
(MDPP modules) or crate-address, bus_number, channel_number, name
(VMMR modules)
Buffers of data can be parsed with class mesytec::buffer_reader
. See example_analysis.cpp.
In order to correlate data with other DAQ systems at GANIL, we add timestamps to each Mesytec data frame which can be retrieved from one of 2 modules placed in the same VME crate:
The appropriate module should be added to the crate_map.dat
file:
Only the 'firmware' (TGV
or AGAVA
) and the crate address are important here. Note that the crate address need not be the physical address of the module, rather it must correspond to the one used in the mvme
interface when data from the module is read out.
Run the mesytec_receiver_mfm_transmitter
executable with suitable arguments in order to encapsulate data received by ZMQ from the mesytec mvme
software into MFMMesytecFrame frames, which are in turn bufferized and transmitted on a ZMQ PUB socket. A timeout mechanism allows to flush any incomplete buffer if the DAQ stops transmitting data. Usage:
The MVLC VME configuration can be exported from the mvme
GUI menus:
It is possible to use a configuration file (default name: transceiver.cfg
) to give values to options:
If a transceiver.cfg
file, MVME export file & crate map are present in the same directory, the transceiver can be launched by just giving the path to the directory:
libzmq_narval_receiver.so
is a Narval actor which can receive the MFM frames produced by mesytec_receiver_mfm_transmitter
in order to inject them into a Narval dataflow. Give the specification of the ZMQ port (tcp://hostname:port
) in the algo_path
option of the actor.
For other projects to use us we provide two targets in the mesytec_data::
namespace:
mesytec_data::mesytec_data
: compile and link with libmesytec_data.so
;mesytec_data::mesytec_data_root_interface
: compile and link with the ROOT/TTree interfaceYou can build and link your own projects which use either libmesytec_data.so
or libmesytec_data_root_interface.so
by adding to your CMakeLists.txt the following: