Hepmc file to .root conversion

# note: ROOTSYS must be set in advance, and below, use the same
#       Python version as returned by: root-config --python-version
#       (for me, it's Python 3.10.4, hence 3.10 and 310 below)

rm -rf HepMC3 HepMC3-build HepMC3-install # a total cleanup
git clone --depth=1 https://gitlab.cern.ch/hepmc/HepMC3
mkdir HepMC3-build
cd HepMC3-build
cmake -DCMAKE_INSTALL_PREFIX=../HepMC3-install \
      -DHEPMC3_PYTHON_VERSIONS=3.10 \
      -DHEPMC3_Python_SITEARCH310=../HepMC3-install/lib/python3.10/site-packages \
      -DHEPMC3_INSTALL_INTERFACES=ON \
      -DHEPMC3_BUILD_EXAMPLES=ON \
      -DHEPMC3_ENABLE_TEST=ON \
      ../HepMC3 2>&1 | tee -a cmake.out.txt
make 2>&1 | tee -a make.out.txt # note: built examples are in: ./outputs/bin
make test 2>&1 | tee -a make_test.out.txt
# ctest . 2>&1  | tee -a ctest.out.txt
make install 2>&1 | tee -a make_install.out.txt

See also: HepMC3 → Examples