aliceHLTwrapper
Directory actions
More options
Directory actions
More options
aliceHLTwrapper
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
The ALICE HLT wrapper device allows to bind ALICE HLT components from AliRoot into a
FairDevice using the HLt external interface.
1) External software packages
=============================
All necessary packages need to be installed as a prerequesite to compiling
AliceO2. See the instractions in the top directory. The ALICE HLT wrapper
device requires Root, FairRoot, Aliroot
2) Environment
==============
AliRoot, FairRoot and external packages need to be set up, in particular
library directories need to be added to LD LIBRARY PATH, bin folder to
PATH, e.g.
# you have to set up the environment according to the AliceO2 package
# install dir and the external package install dir
export ALICEO2_INSTALL_DIR=<path to AliceO2 install dir>
export ALICEO2_EXTERNALS=<path to external package install folder>
export ROOTSYS=$ALICEO2_EXTERNALS
export ALICE_ROOT=$ALICEO2_EXTERNALS/AliRoot # see comment below
export LD_LIBRARY_PATH=$ALICEO2_INSTALL_DIR/lib:$ALICEO2_EXTERNALS/lib:$ROOTSYS/lib/root:$LD_LIBRARY_PATH
export PATH=$ALICEO2_INSTALL_DIR/bin:$ALICEO2_EXTERNALS/bin:$ALICEO2_EXTERNALS/FairRoot/bin:$ALICEO2_EXTERNALS/AliRoot/bin:$ROOTSYS/bin:$PATH
A word on the ALICE_ROOT variable
# the plan for the future is to be independent of ALICE_ROOT, for
# the moment some code still uses the variable to open data files
# shipped with the source code
export ALICE_ROOT=<path of AliRoot source code>
Path to the OCDB copy used for running the HLT components, here is
an example, you have to use the correct OCDB for the data set.
export ALIHLT_HCDBDIR=local://./OCDB
3) Test Data
============
Generate binary files of HLT TPC clusters to be used by FilePublishers of a simple processing topology,
e.g. 6 publishers (one full slice/sector of the TPC) to one tracker instance
Using:
macro example/alice/hlt/macros/hltConfigurations.C to define a custom chain
macro $ALICE_ROOT/HLT/exa/recraw-local.C to run the HLT chain embedded to AliRoot reconstruction
ln -s $ALICE_ROOT/HLT/exa/recraw-local.C
ln -s $ALICE_ROOT/HLT/exa/EnableHLTInGRP.C
aliroot -b -q -l hltConfigurations.C recraw-local.C’("raw.root", "raw://", 0, 0, "HLT TPC", "loglevel=0x79 chains=cluster-collection", "local://./OCDB")’
aliroot -b -q -l EnableHLTInGRP.C’(167808, "local://./OCDB", "local://./OCDB")’
rm galice.root QA.root
aliroot -b -q -l hltConfigurations.C recraw-local.C’("raw.root", "local://OCDB", -1, -1, "HLT", "loglevel=0x79 chains=cluster-collection")’ 2>&1 | tee cluster-collection.log
Runs HLT TPC cluster emulation, binary files stored in emulated-tpc-clusters
configuration files emulated-tpc-clusters *.txt for FilePublisher components
Be aware that there might be crashes of the AliRoot framework after the last event has been
processed. That does not effect the generation of the test data.
4) Running the Wrapper
======================
The wrapper can run any ALIROOT HLT component. Components are implemented in
component libraries which are loaded at runtime into the system. Each component
is uniquely identified by the component identifier and the library. Additional
component parameters might be necessary to configure the component and control.
The processing.
The ALICE HLT wrapper implements a FairDevice, the parameters can be categorized
in three groups:
a) device specific arguments: id and number of i/o threads
b) flexible input and output slot configuration, multiple arguments possible
--output|--input type=<value>,size=<size>,method=<value>,address=<value>
c) HLT component arguments: library, component id, parameters, run number
--library <library name> --component <component id> --run <no>
NOTE: the three groups have to be in that fixed sequence!!!
Example:
aliceHLTWrapper ClusterPublisher_00_0 1 \
--output type=push,size=1000,method=bind,address=tcp://*:45000 \
--library libAliHLTUtil.so --component FilePublisher --run 167808 \
--parameter ’-datafilelist emulated-tpc-clusters_0x00000000.txt’
Some explanation:
This starts a device instance with a name/id 'ClusterPublisher_00_0 and 1 I/O
thread. The name of the device instance should be unique within the configuration
describing the processing hierarchy.
The actual component has the identifier 'FilePublisher' and is implemented in
'libAliHLTUtil.so'. In order to run it it needs some configuration, namely the
files to be published in the individual events. That is defined in the
configuration file 'emulated-tpc-clusters_0x00000000.txt'.
Simple topology:
Helper script to create the commands to launch multiple processes on a single
machine.
launchSimpleChain.sh
4) Source code
==============
SystemInterface.cxx/.h counterpart of the ALICE HLT external interface
Component.cxx/.h all HLT component related code
WrapperDevice.cxx/.h specific implementation of FairMQ device
aliceHLTWrapper.cxx: executable of the FairMQ device
runComponent.cxx: AliRoot HLT interface test program for the Component
HOMERFactory.cxx/.h: Originally AliHLTHOMERLibManager from AliRoot
The following headers have been copied from AliRoot, in the future they might be
taken directly from AliRoot
AliHLTDataTypes.h Common data type and function definition for the HLT code
AliHLTHOMERData.h Data structure definition for the HOMER interface
AliHLTHOMERReader.h Abstract interface for the HOMER reader
AliHLTHOMERWriter.h Abstract interface for the HOMER writer