Skip to content

proio-org/cpp-proio

Repository files navigation

proio for C++

Build Status codecov Codacy Badge

Proio is an event-oriented streaming data format based on Google's protocol buffers (protobuf). Proio aims to add event structure and additional compression to protobuf in a way that supports event data model serialization in medium- and high-energy physics. Additionally, proio

  • supports self-descriptive data,
  • is stream compatible,
  • is language agnostic,
  • and brings along many advantages of protobuf, including forward/backward compatibility.

For detailed information on the proio format and introductory information on the software implementations, please see DOI 10.1016/j.cpc.2019.03.018. This work was inspired and influenced by LCIO, ProMC (Sergei Chekanov), and EicMC (Alexander Kiselev)

Also see the main proio repository for additional information information.

API

The API documentation is generated using Doxygen, and can be found here.

Installation

Requirements

  • Protobuf 3.1+
  • LZ4 1.8+

Building the code

First thing to note is that cpp-proio uses git submodules to pull in the language-independent proio files. This means that you will have to initialize and pull the submodule.

git submodule update --init

Once, the proio submodule is up-to-date, standard CMake practices apply, so make sure you have CMake installed. Create a build directory (e.g. cpp-proio/build), and cd into it. Then, run cmake on the directory with CMakeLists.txt (this directory).

mkdir build
cd build
cmake ../
make
make test
sudo make install

If you need to point CMake to dependencies in non-standard locations, please set the CMAKE_PREFIX_PATH variable. For example, if you build and install the required Protobuf and LZ4 libraries into subdirectories of /opt, your cmake command might look like the following:

cmake \
    -DCMAKE_PREFIX_PATH="/opt/protobuf;/opt/lz4" \
    -DCMAKE_INSTALL_PREFIX=/opt/proio \
    ../

Installing LZ4 from github

The following installs to the default installation prefix.

git clone https://github.com/lz4/lz4.git && cd lz4
make cmake
sudo cmake --build contrib/cmake_unofficial/.  -- install