k4MarlinWrapper runs Marlin processors as Gaudi algorithms. It provides the necessary converters and interfaces between the file types and formats used between both frameworks:
- Python interface to configure Marlin processors
- In-memory Event Data Model (EDM) converters between LCIO and EDM4hep
- Steering file input conversion from Marlin (XML) to Gaudi (Python)
- Input and output file support for LCIO and EDM4hep
Please refer to the EDM Converters documentation
Use the CVMFS HSF Key4hep view to compile and install k4MarlinWrapper.
source /cvmfs/sw.hsf.org/key4hep/setup.sh
# Alternatively use the nightly build to get the latest development branches of key4hep packages
# source /cvmfs/sw-nightlies.hsf.org/key4hep/setup.sh
git clone https://github.com/key4hep/k4MarlinWrapper.git
cd k4MarlinWrapper
mkdir build install; cd build
cmake ..
cmake -DCMAKE_INSTALL_PREFIX=../install ..
make -j 4
make install
k4MarlinWrapper processors run with LCIO and EDM4hep input.
- As an example for LCIO, copy the
muons.slcio
from the DD4hep file located in theDDTest/inputFiles/
directory totest/inputFiles/
directory in k4MarlinWrapper
To copy the file and run:
mkdir ../test/inputFiles
cp /path/to/muons.slcio ../test/inputFiles/muons.slcio
k4run ../k4MarlinWrapper/examples/runit.py
To keep source code style consistent a .clang-format
configuration is included.
A CI test will check for compliance with this format on Pull Requests.
To apply Clang format to all source and header files, please use your editor's or IDE's built-in integration, or directly from the command line. For example:
find . -regex '.*\.\(cpp\|h\)' -exec clang-format -style=file -i {} \;
Several tests are provided. These serve as examples on how to use different features of k4MarlinWrapper.
Refer to the test/gaudi_opts
directory to find steering files covering different use cases.
# Display available tests
ctest -N
# Run all tests
ctest
# Run specific test with verbose output
ctest --verbose -R test_clicReconstruction
Please refer to this doc on how to convert between EDMs in k4MarlinWrapper
Please refer to this doc on how to run with multi-thread support, and which options are supported.