Back to home page

EIC code displayed by LXR

 
 

    


Warning, /jana2/src/examples/StreamingExample/README.md is written in an unsupported language. File is not indexed.

0001 
0002 ## JANA ZeroMQ Plugin
0003 
0004 zmq2jana enables JANA users to stream data from a ZeroMQ queue. It currently uses pub/sub and a message format which is 
0005 based around the needs of INDRA.
0006 
0007 It can be used in two different ways:
0008 * Receive hits from different detectors and process each hit independently as its own "event"
0009 * Receive hits from different detectors and automatically build events containing all hits within a configurable time 
0010 interval
0011 
0012 Support for building events using only 'fast' detector hits, applying custom filters, and then merging with 'slow'
0013 detector hits is planned.
0014 
0015 
0016 ###Usage
0017 
0018 zmq2jana is a plain old plugin. While it aims to be relatively generic, it is _not_ an official part of the JANA
0019 API and is subject to breaking changes. It is recommended to copy the `zmq2jana` directory into your own project's 
0020 repository and modify as needed. To compile, you will need to have installed `libzmq` and `zmq.hpp`. The simplest 
0021 way to test your setup is as follows:
0022 
0023 ```bash
0024 $ cd JANA2
0025 $ scons -j4
0026 $ $JANA_HOME/bin/jana -Pplugins=ZmqMain
0027 ```
0028 
0029 The entry point is `ZmqMain.cc`, which registers different components with the JANA framework.
0030 
0031 ### Components
0032 
0033 The different components available are:
0034 
0035 
0036 ##### JZmqEventSource
0037 A `JEventSource` which polls a ZeroMQ socket and emits `JEvent`s which fuse hits across all detectors over a 
0038 configurable time interval. This uses `JEventBuilder` under the hood.
0039 
0040 ##### ZmqHitSource
0041 A `JEventSource` which polls a ZeroMQ socket and emits degenerate `JEvent`s, each containing a single detector hit.
0042 
0043 ##### DummyZmqPublisher
0044 A ZeroMQ producer which randomly generates hits in the `ZmqMessage` format and publishes them to a configurable
0045 ZeroMQ socket. This can be run either in a separate thread, or in a separate program entirely.
0046 
0047 ##### DummyHitExtractor
0048 A `JFactory` which reads `ZmqMessage`s and produces `DummyHit`s tagged as `'raw_hits'`. This is a simulacrum of 
0049 real parsing work.
0050 
0051 ##### DummyHitCalibrator
0052 A `JFactory` which reads `DummyHit`s and produces modified `DummyHits` tagged as `'calibrated_hits'`. This is a 
0053 simulacrum of real calibration work.
0054 
0055 
0056