Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • master
  • nightly_master
  • online_much_readconf_cleanup
  • online_mvd_readconf_cleanup
  • jul25_patches
  • cleanup_rich_v25a
  • jul24_patches
  • nov23_patches
  • DC_2404
  • nighly_master
  • DC_Jan24
  • DC_Nov23
  • DC_Oct23
  • feb23_patches
  • L1Algo-dev9
  • dec21_patches
  • apr21_patches
  • APR21
  • DEC21
  • FEB23
  • JUL24
  • JUL24p1
  • RC1_APR21
  • RC1_feb23
  • RC1_nov23
  • RC2_APR21
  • RC2_feb23
  • RC2_jul25
  • RC2_nov23
  • RC3_APR21
  • RC3_nov23
  • RC4_nov23
  • RC5_nov23
  • RC_jul25
  • dev_2021_06
  • dev_2021_07
  • dev_2021_08
  • dev_2021_09
  • dev_2021_10
  • dev_2021_11
  • dev_2021_12
  • dev_2021_13
  • dev_2021_14
  • dev_2021_15
  • dev_2021_16
  • dev_2021_17
  • dev_2021_18
  • dev_2021_19
  • dev_2021_20
  • dev_2021_21
  • dev_2021_22
  • dev_2021_23
  • dev_2021_24
  • dev_2021_25
  • dev_2021_26
  • dev_2021_27
  • dev_2021_28
  • dev_2021_29
  • dev_2021_30
  • dev_2021_31
  • dev_2021_32
  • dev_2021_33
  • dev_2021_34
  • dev_2021_35
  • dev_2021_36
  • dev_2021_37
  • dev_2021_38
  • dev_2021_39
  • dev_2021_40
  • dev_2021_41
  • dev_2021_42
  • dev_2021_43
  • dev_2021_44
  • dev_2021_45
  • dev_2021_46
  • dev_2021_47
  • dev_2021_48
  • dev_2021_49
  • dev_2021_50
  • dev_2021_51
  • dev_2021_52
  • dev_2022_01
  • dev_2022_02
  • dev_2022_03
  • dev_2022_04
  • dev_2022_06
  • dev_2022_07
  • dev_2022_08
  • dev_2022_09
  • dev_2022_10
  • dev_2022_11
  • dev_2022_12
  • dev_2022_13
  • dev_2022_14
  • dev_2022_15
  • dev_2022_16
  • dev_2022_17
  • dev_2022_18
  • dev_2022_19
  • dev_2022_20
  • dev_2022_21
  • dev_2022_22
  • dev_2022_23
  • dev_2022_24
  • dev_2022_25
  • dev_2022_26
  • dev_2022_27
  • dev_2022_28
  • dev_2022_29
  • dev_2022_30
  • dev_2022_31
  • dev_2022_32
  • dev_2022_33
  • dev_2022_34
  • dev_2022_35
  • dev_2022_37
  • dev_2022_38
117 results

Target

Select target project
  • Leonard Koch / cbmroot
  • Patrick Pfistner / cbmroot
  • Lena Rossel / cbmroot
  • Ingo Deppner / cbmroot
  • Felix Weiglhofer / cbmroot
  • Nikolay Karpushkin / cbmroot
  • Valentina Akishina / cbmroot
  • Rishat Sultanov / cbmroot
  • Luisa Faber / cbmroot
  • pwg-c2f / cbmroot
  • Jan de Cuveland / cbmroot
  • Alberica Toia / cbmroot
  • Iouri Vassiliev / cbmroot
  • Norbert Herrmann / cbmroot
  • Oleksii Lubynets / cbmroot
  • Sergey Gorbunov / cbmroot
  • Cornelius Feier-Riesen / cbmroot
  • Qiunan Zhang / cbmroot
  • Bartosz Sobol / cbmroot
  • Ajit Kumar / cbmroot
20 results
Select Git revision
  • master
  • update_at_version
  • patch-3
  • patch-2
  • update_trdtype5_nasics
  • master_clean
  • patch-1
  • add_clusterizer_googletests
  • apuntke-master-patch-66704
  • nightly_master
  • apr21_patches
  • APR21
  • RC1_APR21
  • RC2_APR21
  • RC3_APR21
  • dev_2021_06
  • dev_2021_07
  • dev_2021_08
  • dev_2021_09
  • dev_2021_10
  • dev_2021_11
  • dev_2021_12
  • dev_2021_13
  • dev_2021_14
  • dev_2021_15
  • dev_2021_16
  • dev_2021_17
  • dev_2021_18
  • dev_2021_19
  • dev_2021_20
  • dev_2021_21
  • dev_2021_22
  • dev_2021_23
  • dev_2021_24
  • dev_2021_25
  • dev_2021_26
  • dev_2021_27
  • dev_2021_28
  • dev_2021_29
  • dev_2021_30
  • dev_2021_31
  • dev_2021_32
  • dev_2021_33
  • dev_2021_34
  • dev_2021_35
  • dev_2021_36
  • dev_2021_37
  • dev_2021_38
  • dev_2021_39
  • dev_2021_40
  • dev_2021_41
  • dev_2021_42
  • dev_2021_43
  • dev_2021_44
  • dev_2021_45
  • dev_2021_46
  • dev_2021_47
57 results
Show changes

Commits on Source 3441

3,341 additional commits have been omitted to prevent performance issues.
1000 files
+ 105555
33444
Compare changes
  • Side-by-side
  • Inline

Files

.ci/online/Dockerfile

0 → 100644
+26 −0
Original line number Diff line number Diff line
ARG TAG=12-fair202211.4-rocm5.4
ARG REGISTRY=hub.cbm.gsi.de/computing/images/online

FROM ${REGISTRY}/dev:${TAG} as build
  ARG SOURCE_DIR=/opt/cbm/src
  WORKDIR ${SOURCE_DIR}
  # Kaniko doesn't support RUN --mount, so we have to copy the source code instead
  COPY . .
  RUN .ci/online/scripts/install.sh

FROM ${REGISTRY}/runtime:${TAG}
  ARG CBMROOT_PATH=/opt/cbm/cbmroot
  ARG FAIRSOFT_PATH=/opt/cbm/fairsoft
  COPY --from=build ${CBMROOT_PATH}/bin ${CBMROOT_PATH}/bin
  COPY --from=build ${CBMROOT_PATH}/lib/*.so ${CBMROOT_PATH}/lib/
  # FIXME HACK FOR DC OCT 23
  COPY --from=build ${FAIRSOFT_PATH}/lib/libGenVector.so ${FAIRSOFT_PATH}/lib/.
  COPY --from=build ${FAIRSOFT_PATH}/lib/libGenVector.so.6.26 ${FAIRSOFT_PATH}/lib/.
  COPY --from=build ${FAIRSOFT_PATH}/lib/libGenVector.so.6.26.10 ${FAIRSOFT_PATH}/lib/.
  COPY --from=build ${FAIRSOFT_PATH}/lib/libCore.so ${FAIRSOFT_PATH}/lib/.
  COPY --from=build ${FAIRSOFT_PATH}/lib/libCore.so.6.26 ${FAIRSOFT_PATH}/lib/.
  COPY --from=build ${FAIRSOFT_PATH}/lib/libCore.so.6.26.10 ${FAIRSOFT_PATH}/lib/.

  ENV LD_LIBRARY_PATH=${CBMROOT_PATH}/lib:${FAIRSOFT_PATH}/lib:/opt/rocm/lib:${LD_LIBRARY_PATH}
  ENV PATH=${CBMROOT_PATH}/bin:${PATH}
  CMD ["cbmreco"]
+13 −0
Original line number Diff line number Diff line
FROM gcr.io/kaniko-project/executor:v1.16.0-debug
    ARG USERNAME="username"
    ARG PASSWORD="your_password"
    ARG REGISTRY="hub.cbm.gsi.de"
    ARG IMAGE="${REGISTRY}/computing/cbmroot/cbm_online"
    ARG TAG="${USER}-debug"
    RUN mkdir -p /kaniko/.docker
    RUN echo "{\"auths\":{\"${REGISTRY}\":{\"username\":\"${USERNAME}\",\"password\":\"${PASSWORD}\"}}}" > /kaniko/.docker/config.json
    # TODO: Mount CbmRoot source instead of copying it into the container (-> same with authentification...)
    COPY . /workspace
    ENV IMAGE=${IMAGE}
    ENV TAG=${TAG}
    ENTRYPOINT ["/bin/sh" , "-xc", "/kaniko/executor --context dir:///workspace --dockerfile /workspace/algo/containers/cbm_online/Dockerfile --destination $IMAGE:$TAG"]
+44 −0
Original line number Diff line number Diff line
#!/bin/bash

set -e

user="$1"
password="$2"

script=$(readlink -f "$0")

function check_arg() {
    if [ -z "$1" ]; then
        echo "Error: No $2 specified."
        echo "Usage: $script <user> <password>"
        exit 1
    fi
}

check_arg "$user" "user"
check_arg "$password" "password"

# Set tag as optional third argument
if [ -z "$3" ]; then
    tag="$user-debug"
else
    tag="$3"
fi

# This script must be run from the CbmRoot top level directory.
# Check for .git, .clang-format, and .gitlab-ci.yml
if [ ! -d .git ] || [ ! -f .clang-format ] || [ ! -f .gitlab-ci.yml ]; then
    echo "Error: This script must be run from the CbmRoot top level directory."
    exit 1
fi

registry="hub.cbm.gsi.de/computing/cbmroot"
image="cbm_online"

build_args=" \
    --build-arg="USERNAME=$user" \
    --build-arg="PASSWORD=$password" \
    --build-arg="TAG=$tag" \
"
dockerfile="algo/containers/cbm_online/DockerfileBuild"
docker build --progress plain $build_args -f $dockerfile -t cbm_online_builder .
+24 −0
Original line number Diff line number Diff line
#!/bin/bash

set -e

srcdir=cbmroot
build_type=RelWithDebInfo
install_prefix=/opt/cbm/cbmroot
fairsoft_path=/opt/cbm/fairsoft
enable_hip=ON
rocm_root=/opt/rocm
hip_archs="gfx906;gfx908" # MI50;MI100
n_jobs=16

cmake_args="-DCMAKE_INSTALL_PREFIX=$install_prefix \
    -DCMAKE_BUILD_TYPE=$build_type \
    -DSIMPATH=$fairsoft_path \
    -DXPU_ENABLE_HIP=$enable_hip \
    -DXPU_ROCM_ROOT=$rocm_root \
    -DXPU_HIP_ARCH=$hip_archs \
"

ln -s ../cmake algo/cmake
cmake -S algo -B build $cmake_args
cmake --build build -j$n_jobs --target install

.ci/online/test_run.sh

0 → 100755
+22 −0
Original line number Diff line number Diff line
#! /bin/bash

set -e

IMAGE=hub.cbm.gsi.de/fweig/containers/cbm_online:online-container
DOCKER_FLAGS=" \
    --rm \
    -it \
    --mount type=bind,source=$HOME/cbm/params,target=/opt/cbm/params \
    --mount type=bind,source=/home/cbmdata/mcbm22/2391,target=/opt/cbm/data \
"

CMD="cbmreco"
CMD_FLAGS=" \
    -p /opt/cbm/params \
    -i /opt/cbm/data/2391_node8_1_0000.tsa \
    -n 1 \
    --omp 1 \
"

docker run $DOCKER_FLAGS $IMAGE $CMD $CMD_FLAGS
# docker run $DOCKER_FLAGS $IMAGE ls -l /opt/cbm/data
+30 −0
Original line number Diff line number Diff line
#! /bin/bash

set -e

IMAGE=hub.cbm.gsi.de/fweig/containers/cbm_online:online-container
DOCKER_FLAGS=" \
    --rm \
    -it \
    --mount type=bind,source=$HOME/cbm/params,target=/opt/cbm/params \
    --mount type=bind,source=/home/cbmdata/mcbm22/2391,target=/opt/cbm/data \
    --device=/dev/kfd \
    --device=/dev/dri \
    --security-opt seccomp=unconfined \
    --group-add video
"

CMD="cbmreco"
CMD_FLAGS=" \
    -p /opt/cbm/params \
    -i /opt/cbm/data/2391_node8_1_0000.tsa \
    -n 1 \
    --omp 1\
    -l info \
    -d hip1 \
"
# CMD=xpuinfo
# CMD_FLAGS=

docker run $DOCKER_FLAGS $IMAGE $CMD $CMD_FLAGS
# docker run $DOCKER_FLAGS $IMAGE ls -l /opt/cbm/data
+17 −6
Original line number Diff line number Diff line
---
AccessModifierOffset: -2
AccessModifierOffset: -1

AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: true
@@ -14,11 +14,11 @@ AllowAllArgumentsOnNextLine: false
AllowAllConstructorInitializersOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false

AllowShortBlocksOnASingleLine: Always
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: true
AllowShortEnumsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Always
AllowShortIfStatementsOnASingleLine: WithoutElse
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: false

@@ -80,18 +80,26 @@ IncludeCategories:
    Priority:        1
  - Regex:           '^("|<).*/Cbm'
    Priority:        1
  - Regex:          '".*"'
    Priority:        1
  - Regex:           '^("|<).*slice'
    Priority:        2
  - Regex:           '^("|<)Monitor.hpp'
    Priority:        2
  - Regex:           '^("|<)System.hpp'
    Priority:        2
  - Regex:           '^("|<)Fair'
    Priority:        3
  - Regex:           '^("|<)Logger.h'
    Priority:        3
  - Regex:           '^("|<)T'
  - Regex:           '^("|<)T.*\.h'
    Priority:        4
  - Regex:           '^("|<)Rt'
  - Regex:           '^("|<)Rt.*\.h'
    Priority:        4
  - Regex:           '^("|<)boost'
    Priority:        5
  - Regex:           '^<.*[^\.]h>'
    Priority:        6
  - Regex:           '^<.*[^\.h]>'
    Priority:        6
  - Regex:           '^<.*>'
@@ -126,7 +134,7 @@ SpaceAfterCStyleCast: true
#SpaceAfterLogicalNot: true
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
@@ -142,6 +150,9 @@ SpacesInContainerLiterals: false
SpacesInParentheses: false
SpacesInSquareBrackets: false

WhitespaceSensitiveMacros: ['CBM_ENUM_DICT', 'CBM_YAML_PROPERTIES']
StatementMacros: ['CBM_PARALLEL_FOR']

Standard: c++11

TabWidth: 8

.clang-tidy

0 → 100644
+9 −0
Original line number Diff line number Diff line
Checks:          '-*,modernize-deprecated-headers'
WarningsAsErrors: ''
HeaderFilterRegex: '.*'
AnalyzeTemporaryDtors: false
FormatStyle:     file
CheckOptions:
  - key:             modernize-deprecated-headers.CheckHeaderFile
    value:           'true'
...

.dockerignore

0 → 100644
+8 −0
Original line number Diff line number Diff line
.git
.vscode

/geometry
/input
/parameters
/build
/algo/external
+23 −1
Original line number Diff line number Diff line
@@ -5,7 +5,29 @@
/geometry
/input
/parameters
/qa_data
/build
/algo/external

# Comment some single files
Dart*.cfg

# gdb Crash dumps
**/core_dump_*

# Git rebase backoup files
**/*.orig

# IDEs
.vscode
.cache

# Housekeeping
*~
.*
!.gitignore
!.gitlab-ci.yml
!.dockerignore                          
!.clang-format             
!.clang-tidy                
!.ci/
+436 −117

File changed.

Preview size limit exceeded, changes collapsed.

+256 −443

File changed.

Preview size limit exceeded, changes collapsed.

+61 −41
Original line number Diff line number Diff line
@@ -10,61 +10,72 @@
/fles/  @f.uhlig @p.-a.loizeau
/macro/ @f.uhlig @p.-a.loizeau

/macro/C2F/      @i.selyuzhenkov
/macro/analysis/ @i.selyuzhenkov
/macro/KF/       @se.gorbunov @v.akishina
/macro/C2F/      @a.andronic @k.piasecki
/macro/analysis/ @a.andronic @k.piasecki
/macro/KF/       @se.gorbunov

# Core
/core/             @f.uhlig @v.friese @p.-a.loizeau
/core/qa/          @se.gorbunov
/core/qa/          @se.gorbunov @s.zharko
/core/data/test/   @f.uhlig
/core/data/raw/    @p.-a.loizeau
/core/base/utils/  @f.uhlig @s.lebedev
/core/base/report/ @s.lebedev
/core/base/draw/   @s.lebedev
/core/base/utils/  @f.uhlig
/core/base/report/ @f.uhlig
/core/base/draw/   @f.uhlig

# Algo
/algo/ @d.smith @fweig

# Simulation
/sim/                    @f.uhlig @v.friese @p.-a.loizeau
/sim/transport/geosetup/ @e.lavrik
#/sim/transport/geosetup/ @e.lavrik

# Reco
/reco/              @f.uhlig @v.friese @p.-a.loizeau
/reco/littrack/     @s.lebedev @andrey.lebedev
/reco/L1/           @se.gorbunov @v.akishina
/reco/littrack/     @se.gorbunov
/reco/L1/           @se.gorbunov @s.zharko
/reco/eventbuilder/ @d.smith
/reco/KF/           @se.gorbunov @v.akishina
/reco/KF/           @se.gorbunov @s.zharko

# Analysis
/analysis/                                 @i.selyuzhenkov
/analysis/                                 @a.andronic @k.piasecki
/analysis/PWGC2F/femtoscopy/               @wielanek_AT_if.pw.edu.pl
/analysis/common/                          @i.selyuzhenkov
/analysis/PWGHAD/                          @i.selyuzhenkov
/analysis/PWGCHA/                          @i.selyuzhenkov
/analysis/PWGDIL/                          @i.selyuzhenkov
/analysis/common/                          @a.andronic @k.piasecki
/analysis/PWGHAD/                          @a.andronic @k.piasecki
/analysis/PWGCHA/                          @a.andronic @k.piasecki
/analysis/PWGDIL/                          @a.andronic @k.piasecki
/analysis/PWGDIL/dielectron/pi0eta/        @c.pauly
/analysis/PWGDIL/dielectron/papaframework/ @praisig @ebechtel_AT_ikf.uni-frankfurt.de
/analysis/PWGDIL/dielectron/lmvm/          @i.selyuzhenkov
/analysis/PWGDIL/dielectron/papaframework/ @a_meye37_AT_uni-muenster.de
/analysis/PWGDIL/dielectron/lmvm/          @a.andronic @k.piasecki
/analysis/PWGDIL/dielectron/conversion/    @c.pauly
/analysis/PWGDIL/dimuon/                   @i.selyuzhenkov
/analysis/PWGDIL/dimuon/                   @a.andronic @k.piasecki

## Detectors

# TRD
/core/data/trd/       @praisig
/core/data/test/trd/  @praisig
/core/detectors/trd/  @praisig
/macro/trd/           @praisig
/sim/detectors/trd/   @praisig
/reco/detectors/trd/  @praisig
/core/data/trd/       @a.bercuci @p.kaehler
/core/data/test/trd/  @a.bercuci @p.kaehler
/core/detectors/trd/  @a.bercuci @p.kaehler
/macro/trd/           @a.bercuci @p.kaehler
/sim/detectors/trd/   @a.bercuci @p.kaehler
/reco/detectors/trd/  @a.bercuci @p.kaehler
/algo/detectors/trd/  @a.bercuci @p.kaehler

# PSD
/analysis/detectors/psd/ @karpushkin_AT_inr.ru
/core/data/psd/          @karpushkin_AT_inr.ru
/core/data/test/psd/     @karpushkin_AT_inr.ru
/core/detectors/psd/     @karpushkin_AT_inr.ru
/macro/psd/              @karpushkin_AT_inr.ru
/sim/detectors/psd/      @karpushkin_AT_inr.ru
/reco/detectors/psd/     @karpushkin_AT_inr.ru
/analysis/detectors/psd/ @v.friese
/core/data/psd/          @v.friese
/core/data/test/psd/     @v.friese
/core/detectors/psd/     @v.friese
/macro/psd/              @v.friese
/sim/detectors/psd/      @v.friese
/reco/detectors/psd/     @v.friese

# FSD
/analysis/detectors/fsd/ @dvorar10_AT_fjfi.cvut.cz
/core/data/fsd/          @dvorar10_AT_fjfi.cvut.cz
/core/detectors/fsd/     @dvorar10_AT_fjfi.cvut.cz
/sim/detectors/fsd/      @dvorar10_AT_fjfi.cvut.cz
/reco/detectors/fsd/     @dvorar10_AT_fjfi.cvut.cz

# MUCH
/core/data/much/         @v.singhal
@@ -73,6 +84,8 @@
/macro/much/             @v.singhal
/sim/detectors/much/     @v.singhal
/reco/detectors/much/    @v.singhal
/algo/detectors/much/    @v.singhal
/macro/analysis/much/    @v.singhal

# TOF
/analysis/detectors/tof/ @n.herrmann @i.deppner
@@ -85,14 +98,16 @@
/reco/detectors/tof/     @n.herrmann @i.deppner
/MQ/eTOF/                @n.herrmann @i.deppner
/MQ/hitbuilder/          @n.herrmann @i.deppner
/algo/detectors/tof/     @n.herrmann @i.deppner

# RICH
/core/data/rich/      @s.lebedev
/core/data/test/rich/ @s.lebedev
/core/detectors/rich/ @s.lebedev
/macro/rich/          @s.lebedev
/sim/detectors/rich/  @s.lebedev
/reco/detectors/rich/ @s.lebedev
/core/data/rich/      @ma.beyer
/core/data/test/rich/ @ma.beyer
/core/detectors/rich/ @ma.beyer
/macro/rich/          @ma.beyer
/sim/detectors/rich/  @ma.beyer
/reco/detectors/rich/ @ma.beyer
/algo/detectors/rich/ @ma.beyer

# STS
/analysis/detectors/sts/ @v.friese
@@ -103,8 +118,13 @@
/sim/detectors/sts/      @v.friese
/reco/detectors/sts/     @v.friese
/MQ/sts/                 @v.friese
/algo/detectors/sts/     @v.friese
/algo/data/sts/          @v.friese

# MVD
/core/data/mvd/ @c.muentz @m.deveaux
/macro/mvd/     @c.muentz @m.deveaux
/mvd/           @c.muentz @m.deveaux
/reco/detectors/mvd/     @c.muentz @m.deveaux @j.stroth
/core/detectors/mvd/     @c.muentz @m.deveaux @j.stroth
/core/data/mvd/          @c.muentz @m.deveaux @j.stroth
/analysis/detectors/mvd/ @c.muentz @m.deveaux @j.stroth
/macro/mvd/              @c.muentz @m.deveaux @j.stroth
/sim/detectors/mvd/      @c.muentz @m.deveaux @j.stroth
+20 −3
Original line number Diff line number Diff line
@@ -3,8 +3,13 @@
message(" -- Read CTestCustom.cmake --")

# Maximum size of uploaded test output of failed tests is 100kB
# or 10MB in case of weekly tests
# Larger output is cutted
if(${CBM_TEST_MODEL} MATCHES Weekly)
  set(CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE "10240000")
else()
  set(CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE "102400")
endif()

# Maximum size of uploaded test output of passed tests is 1kB
# Larger output is cutted
@@ -43,6 +48,7 @@ set(CTEST_CUSTOM_WARNING_EXCEPTION
        # -- warnings from our external packages
        "external/flib_dpb"
        "external/ipc" 
        "maybe_unused"
        "include/AnalysisTree"

        # -- remove intended fall through warnings
@@ -53,6 +59,15 @@ set(CTEST_CUSTOM_WARNING_EXCEPTION
        "CbmDeviceUnpackTofMcbm2018.cxx.*warning: attributes at the beginning of statement are ignored"
        "CbmDeviceUnpackTofMcbm2018.cxx.*warning: this statement may fall through"
        "CbmDeviceUnpackTofMcbm2018.cxx.*note: here"
        "CbmMcbm2018TofPar.cxx.*warning: attributes at the beginning of statement are ignored"
        "CbmMcbm2018TofPar.cxx.*warning: this statement may fall through"
        "CbmMcbm2018TofPar.cxx.*note: here"

        # -- warnings from a feature we want and which is okay
        "CbmCheckEvents.cxx:86:52"

        # -- warnings about to long function for debugging
        "variable tracking size limit exceeded"

        # -- warnings from structures for HADAQ memory casting
        "struct hadaq::HadTu"
@@ -63,8 +78,10 @@ set(CTEST_CUSTOM_WARNING_EXCEPTION
        # -- warnings from structures for MBS/LMD memory casting
        "struct mbs::Header"

        # -- warnings from my test machine demac006
        "warning: text-based stub file"
        # -- warnings from macosx test machines
        "ld: warning: dylib.*was built for newer macOS version.*than being linked"
        ".*\\^.*"
        "warning.*generated."

        # -- don't show pragma message warnings
        "Compiling CBM Configuration"
+149 −115
Original line number Diff line number Diff line
# Check if cmake has the required version
# Since flesnet requires 3.14.0 we should be consistent while we
# build it in the CbmRoot context
cmake_minimum_required(VERSION 3.14.0 FATAL_ERROR)
cmake_policy(VERSION 3.14...3.23)

Set(CTEST_SOURCE_DIRECTORY $ENV{SOURCEDIR})
Set(CTEST_BINARY_DIRECTORY $ENV{BUILDDIR})
Set(CTEST_SITE $ENV{SITE})
@@ -5,6 +11,11 @@ Set(CTEST_BUILD_NAME $ENV{LABEL})
Set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
Set(CTEST_PROJECT_NAME "CBMROOT")
Set(EXTRA_FLAGS $ENV{EXTRA_FLAGS})
Set(INSTALL_PROJECT $ENV{INSTALL_PROJECT})

if(NOT CBM_TEST_MODEL)
  set(CBM_TEST_MODEL NIGHTLY)
endif()

include(${CTEST_SOURCE_DIRECTORY}/CTestConfig.cmake)
Ctest_Read_Custom_Files("${CTEST_SOURCE_DIRECTORY}")
@@ -17,31 +28,37 @@ Set(CTEST_BUILD_COMMAND "${BUILD_COMMAND} -i -k -j$ENV{number_of_processors}")
# Extract the FairRoot version from fairroot-config
# The version info is of the form Major.Minor.Patch e.g. 15.11.1 and
# is stored in the variable FairRoot_VERSION
Set(CMAKE_MODULE_PATH "${CTEST_SOURCE_DIRECTORY}/cmake/modules" ${CMAKE_MODULE_PATH})
Include(CbmMacros)
FairRootVersion()
#Set(CMAKE_MODULE_PATH "${CTEST_SOURCE_DIRECTORY}/cmake/modules" ${CMAKE_MODULE_PATH})
#set(FAIRROOTPATH $ENV{FAIRROOTPATH})
#Include(CbmMacros)
#FairRootVersion()

message("Compiling with $ENV{number_of_processors} jobs in parallel.")
message("Testing with $ENV{number_of_processors_for_test} jobs in parallel.")

If(${FairRoot_VERSION} VERSION_LESS 16.0.0)
  Set(CTEST_USE_LAUNCHERS 0)
Else()
Set(CTEST_USE_LAUNCHERS 1)
EndIf()

If($ENV{ctest_model} MATCHES Weekly)
  Set(_Model PROFILE)
ElseIf($ENV{ctest_model} MATCHES MergeRequest)
  Set(_Model CONTINUOUS)
If(${CBM_TEST_MODEL} MATCHES MergeRequest OR ${CBM_TEST_MODEL} MATCHES Continuous)
  Set(_BuildType NIGHTLY)
  Set(_CMakeModel Continuous)
elseIf(${CBM_TEST_MODEL} MATCHES Weekly OR ${CBM_TEST_MODEL} MATCHES Profile)
  Set(_BuildType PROFILE)
  Set(_CMakeModel Nightly)
Else()
  String(TOUPPER $ENV{ctest_model} _Model)
  String(TOUPPER ${CBM_TEST_MODEL} _BuildType)
  set(_CMakeModel ${CBM_TEST_MODEL})
EndIf()

If(EXTRA_FLAGS)
  Set(CTEST_CONFIGURE_COMMAND " \"${CMAKE_EXECUTABLE_NAME}\" \"-G${CTEST_CMAKE_GENERATOR}\" \"-DCMAKE_BUILD_TYPE=${_Model}\" \"-DCTEST_USE_LAUNCHERS=${CTEST_USE_LAUNCHERS}\" \"${EXTRA_FLAGS}\" \"${CTEST_SOURCE_DIRECTORY}\" ")
If(EXTRA_FLAGS AND INSTALL_PROJECT)
  Set(CTEST_CONFIGURE_COMMAND " \"${CMAKE_EXECUTABLE_NAME}\" \"-G${CTEST_CMAKE_GENERATOR}\" \"-DCBM_TEST_MODEL=${CBM_TEST_MODEL}\" \"-DCMAKE_BUILD_TYPE=${_BuildType}\" \"-DCTEST_USE_LAUNCHERS=${CTEST_USE_LAUNCHERS}\" \"${EXTRA_FLAGS}\" \"-DCMAKE_INSTALL_PREFIX=${CTEST_SOURCE_DIRECTORY}/install\" \"${CTEST_SOURCE_DIRECTORY}\" ")
ElseIf(EXTRA_FLAGS)
  Set(CTEST_CONFIGURE_COMMAND " \"${CMAKE_EXECUTABLE_NAME}\" \"-G${CTEST_CMAKE_GENERATOR}\" \"-DCBM_TEST_MODEL=${CBM_TEST_MODEL}\" \"-DCMAKE_BUILD_TYPE=${_BuildType}\" \"-DCTEST_USE_LAUNCHERS=${CTEST_USE_LAUNCHERS}\" \"${EXTRA_FLAGS}\" \"${CTEST_SOURCE_DIRECTORY}\" ")
Else()
  Set(CTEST_CONFIGURE_COMMAND " \"${CMAKE_EXECUTABLE_NAME}\" \"-G${CTEST_CMAKE_GENERATOR}\" \"-DCMAKE_BUILD_TYPE=${_Model}\" \"-DCTEST_USE_LAUNCHERS=${CTEST_USE_LAUNCHERS}\" \"${CTEST_SOURCE_DIRECTORY}\" ")
  Set(CTEST_CONFIGURE_COMMAND " \"${CMAKE_EXECUTABLE_NAME}\" \"-G${CTEST_CMAKE_GENERATOR}\" \"-DCBM_TEST_MODEL=${CBM_TEST_MODEL}\" \"-DCMAKE_BUILD_TYPE=${_BuildType}\" \"-DCTEST_USE_LAUNCHERS=${CTEST_USE_LAUNCHERS}\" \"${CTEST_SOURCE_DIRECTORY}\" ")
EndIf()

If($ENV{ctest_model} MATCHES Nightly OR $ENV{ctest_model} MATCHES Weekly OR $ENV{ctest_model} MATCHES Profile)
#If(${CBM_TEST_MODEL} MATCHES Nightly OR ${CBM_TEST_MODEL} MATCHES Weekly OR ${CBM_TEST_MODEL} MATCHES Profile)
If(NOT ${_BuildType} MATCHES EXPERIMENTAL)

  Find_Program(GCOV_COMMAND gcov)
  If(GCOV_COMMAND)
@@ -49,112 +66,137 @@ If($ENV{ctest_model} MATCHES Nightly OR $ENV{ctest_model} MATCHES Weekly OR $ENV
    Set(CTEST_COVERAGE_COMMAND ${GCOV_COMMAND})
  EndIf(GCOV_COMMAND)

  If(NOT $ENV{ctest_model} MATCHES Weekly)
    Set(ENV{ctest_model} Nightly)
  EndIf()

  # get the information about conflicting or localy modified files
  # from svn, extract the relavant information about the file name
  # and put the result in the output variable
  If(EXISTS ${CTEST_SOURCE_DIRECTORY}/.svn)
    Execute_Process(COMMAND svn stat -u
                    COMMAND grep ^[CM]
                    COMMAND cut -c21-
                    OUTPUT_VARIABLE FILELIST
                    )

    # create out of the output a cmake list. This step is done to convert the
    # stream into seperated filenames.
    # The trick is to exchange an "\n" by an ";" which is the separartor in
    # a list created by cmake
    String(REGEX REPLACE "\n" ";" _result "${FILELIST}")

    ForEach(_file ${_result})
      String(STRIP "${_file}" _file1)
      Set(CTEST_NOTES_FILES ${CTEST_NOTES_FILES} "${CTEST_SOURCE_DIRECTORY}/${_file1}")
    EndForEach(_file ${_result})
  EndIf()

  CTEST_EMPTY_BINARY_DIRECTORY(${CTEST_BINARY_DIRECTORY})

EndIf()

If($ENV{ctest_model} MATCHES MergeRequest)
  set(ENV{ctest_model} Continuous)
EndIf()

Ctest_Start($ENV{ctest_model})
Ctest_Start(${_CMakeModel})

unset(repeat)
If($ENV{ctest_model} MATCHES Continuous)
if(${_CMakeModel} MATCHES Continuous)
  if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.17)
    set(repeat REPEAT UNTIL_PASS:2)
  endif()
  set(ENV{ctest_model} Nightly)
EndIf()

# The stop time should be a date compatible string without day nor timezone
# Examples:
# => CTEST_END_TIME_LIMIT=`date -d "${END_TIME}CET -5minutes" +"%H:%M:%S"`
# => CTEST_END_TIME_LIMIT=`date -d "now +25minutes" +"%H:%M:%S"`
unset(stop_time)
If(DEFINED ENV{CTEST_END_TIME_LIMIT})
  set(stop_time STOP_TIME "$ENV{CTEST_END_TIME_LIMIT}")
  message(STATUS " End time for the ctest test runs set to ${stop_time}")
EndIf()

If(NOT $ENV{ctest_model} MATCHES Experimental)
If(NOT ${_BuildType} MATCHES EXPERIMENTAL)
  Ctest_Update(SOURCE "${CTEST_SOURCE_DIRECTORY}")
EndIf()

Ctest_Configure(BUILD "${CTEST_BINARY_DIRECTORY}"
                RETURN_VALUE _RETVAL
)

If(NOT _RETVAL)
  Ctest_Build(BUILD "${CTEST_BINARY_DIRECTORY}")
  If($ENV{ctest_model} MATCHES Continuous)
    If(${CMAKE_VERSION} VERSION_LESS 3.14.0)
      CTest_Submit(PARTS Update Configure Build)
    Else()
  Ctest_Build(BUILD "${CTEST_BINARY_DIRECTORY}"
              NUMBER_ERRORS _NUM_ERROR
             )

  If(${_CMakeModel} MATCHES Continuous)
    CTest_Submit(PARTS Update Configure Build
                 BUILD_ID cdash_build_id
                )
    if(${_NUM_ERROR} GREATER 0)
      message(STATUS " ")
      message(STATUS " You can find the produced results on the CDash server")
      message(STATUS " ")
      message(STATUS " CDash Build Summary ..: "
              "${CTEST_DROP_METHOD}://${CTEST_DROP_SITE}/buildSummary.php?buildid=${cdash_build_id}"
             )
      message(STATUS " CDash Test List ......: "
              "${CTEST_DROP_METHOD}://${CTEST_DROP_SITE}/viewTest.php?buildid=${cdash_build_id}"
             )
      message(STATUS " ")
      Message(STATUS "Build finished with ${_NUM_ERROR} errors")
      message(FATAL_ERROR "Compilation failure")
    endif()
  EndIf()

  If(DEFINED ENV{CI_TEST_STAGE_TOTAL_TIME_LIMIT})
    # Compute test stage timeout based on current time + limit from environment variable
    If(DEFINED ENV{CTEST_END_TIME_LIMIT})
      # If also full DASH run timeout defined, also compare the two and keep the earliest one
      execute_process (
        COMMAND scripts/find_citests_ctest_stop_time.sh $ENV{CTEST_END_TIME_LIMIT}
        OUTPUT_VARIABLE CI_TESTS_TOTAL_END_TIME_DATE
      )
    Else()
      # Else just get the CI jpb timeout
      execute_process (
        COMMAND scripts/find_citests_ctest_stop_time.sh
        OUTPUT_VARIABLE CI_TESTS_TOTAL_END_TIME_DATE
      )
    EndIf()
    set(stop_time STOP_TIME "${CI_TESTS_TOTAL_END_TIME_DATE}")
    message(STATUS "Due to CI mode, Set end time for the ctest test runs to ${stop_time}")
  EndIf()

  Ctest_Test(BUILD "${CTEST_BINARY_DIRECTORY}"
             PARALLEL_LEVEL $ENV{number_of_processors}
             PARALLEL_LEVEL $ENV{number_of_processors_for_test}
             ${repeat}
             ${stop_time}
             RETURN_VALUE _ctest_test_ret_val
            )

  If($ENV{ctest_model} MATCHES Continuous)
    If(${CMAKE_VERSION} VERSION_LESS 3.14.0)
      CTest_Submit(PARTS Test)
    Else()
  If(${_CMakeModel} MATCHES Continuous)
    CTest_Submit(PARTS Test
                 BUILD_ID cdash_build_id
                )
  EndIf()
  EndIf()

  If(GCOV_COMMAND)
    Ctest_Coverage(BUILD "${CTEST_BINARY_DIRECTORY}")
    If($ENV{ctest_model} MATCHES Continuous)
      If(${CMAKE_VERSION} VERSION_LESS 3.14.0)
        CTest_Submit(PARTS Coverage)
      Else()
    If(${_CMakeModel} MATCHES Continuous)
      CTest_Submit(PARTS Coverage
                   BUILD_ID cdash_build_id
                  )
    EndIf()
  EndIf()
  EndIf()

  Ctest_Upload(FILES ${CTEST_NOTES_FILES})
  If(NOT $ENV{ctest_model} MATCHES Continuous)
    If(${CMAKE_VERSION} VERSION_LESS 3.14.0)
      Ctest_Submit()
    Else()
  If(NOT ${_CMakeModel} MATCHES Continuous)
    Ctest_Submit(BUILD_ID cdash_build_id)
  EndIf()

  If(EXTRA_FLAGS MATCHES "CBM_TEST_INSTALL" AND NOT _ctest_test_ret_val)
#  If(EXTRA_FLAGS MATCHES "INSTALL_PREFIX" AND EXTRA_FLAGS MATCHES "CBM_TEST_INSTALL" AND NOT _ctest_test_ret_val)
    Message("Testing Installation")
    execute_process(COMMAND ${BUILD_COMMAND} install -j$ENV{number_of_processors} WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY}
                    RESULTS_VARIABLE _install_ret_value
                   )
    if (NOT _install_ret_value)
      message("executing test suite in ${CTEST_BINARY_DIRECTORY}/install with source folder available")
      execute_process(COMMAND ${CTEST_SOURCE_DIRECTORY}/cmake/scripts/execute_installation_test.sh ${CTEST_SOURCE_DIRECTORY}/install
                      RESULTS_VARIABLE _install_ret_value
                     )
      execute_process(COMMAND ${CMAKE_EXECUTABLE_NAME} -E rm -R build MQ algo analysis core external fles reco sim
                      WORKING_DIRECTORY ${CTEST_SOURCE_DIRECTORY}
                     )
      message("executing test suite in ${CTEST_BINARY_DIRECTORY}/install wihout source folder available")
      execute_process(COMMAND ${CTEST_SOURCE_DIRECTORY}/cmake/scripts/execute_installation_test.sh ${CTEST_SOURCE_DIRECTORY}/install
                      RESULTS_VARIABLE _install_ret_value
                     )
    endif()
  Else()
     # if installation isn't tested the return value should be 0
     set(_install_ret_value false)
  EndIf()

  Message("_ctest_test_ret_val: ${_ctest_test_ret_val}")
  Message("_install_ret_value: ${_install_ret_value}")

  # Pipeline should fail also in case of failed tests
  if (_ctest_test_ret_val)
    If(${CMAKE_VERSION} VERSION_LESS 3.14.0)
    Else()
  if (_ctest_test_ret_val OR _install_ret_value)
    message(STATUS " ")
    message(STATUS " You can find the produced results on the CDash server")
    message(STATUS " ")
@@ -165,20 +207,13 @@ If(NOT _RETVAL)
            "${CTEST_DROP_METHOD}://${CTEST_DROP_SITE}/viewTest.php?buildid=${cdash_build_id}"
           )
    message(STATUS " ")
    EndIf()
    Message(FATAL_ERROR "Some tests failed.")
  endif()

Else()
  If(${CMAKE_VERSION} VERSION_LESS "3.14.0")
    Ctest_Submit()
Else()
  CTest_Submit(BUILD_ID cdash_build_id)
EndIf()
EndIf()

If(${CMAKE_VERSION} VERSION_LESS 3.14.0)
Else()
message(STATUS " ")
message(STATUS " You can find the produced results on the CDash server")
message(STATUS " ")
@@ -189,4 +224,3 @@ Else()
        "${CTEST_DROP_METHOD}://${CTEST_DROP_SITE}/viewTest.php?buildid=${cdash_build_id}"
       )
message(STATUS " ")
EndIf()
+16 −3
Original line number Diff line number Diff line
#!/bin/bash
# Copyright (C) 2007 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
# SPDX-License-Identifier: GPL-3.0-only
# First commited by Florian Uhlig


function print_example(){
echo "##################################################################"
@@ -61,7 +65,8 @@ else
fi

# set the ctest model to command line parameter
export ctest_model=$1
#export ctest_model=$1
ctest_model=$1

# test for architecture
arch=$(uname -s | tr '[A-Z]' '[a-z]')
@@ -114,14 +119,22 @@ then
  fi
fi

if [ -z $NCPU4TEST ]; then
  export number_of_processors_for_test=$number_of_processors
else
  export number_of_processors_for_test=$NCPU4TEST
fi

echo "************************"
date
echo "LABEL: " $LABEL
echo "SITE: " $SITE
echo "Model: " ${ctest_model}
echo "Nr. of processes: " $number_of_processors
echo "Nr. of processes for build: " $number_of_processors
echo "Nr. of processes for test: " $number_of_processors_for_test
echo "************************"

cd $SOURCEDIR

ctest -S $SOURCEDIR/CbmRoot_test.cmake -V --VV 
ctest -S $SOURCEDIR/CbmRoot_test.cmake -V -DCBM_TEST_MODEL=${ctest_model}
#ctest -S $SOURCEDIR/CbmRoot_test.cmake -V --VV

LICENSE

0 → 100644
+674 −0

File added.

Preview size limit exceeded, changes collapsed.

+19 −14
Original line number Diff line number Diff line
If(FairSoft_VERSION VERSION_LESS 18.6.0)
  Add_Definitions(-DHAVE_FAIRMQSTATEMACHINE)
EndIf()
Set(FAIRMQ_LIBS FairMQStateMachine FairMQ)

# RPATH information should be present for executables in the build as well
# as in the installation directory

# use, i.e. don't skip the full RPATH for the build tree
set(CMAKE_SKIP_BUILD_RPATH FALSE)

# when building, don't use the install RPATH already
# (but later on when installing)
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)

set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")

# add the automatically determined parts of the RPATH
# which point to directories outside the build tree to the install RPATH
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)


if(FairMQ_HAS_StateMachine)
  Set(FAIRMQ_LIBS FairMQStateMachine FairMQ)
else()
  Set(FAIRMQ_LIBS FairMQ)
EndIf()

add_subdirectory(base)
add_subdirectory(source)
@@ -22,9 +31,5 @@ add_subdirectory(mcbm)
#add_subdirectory(sts)
#add_subdirectory(test)

# The following subdirectories contain files which do not compile with
# FairRoot v18
# Don't compile it for the time being
# TODO: Fix the compilation problems
add_subdirectory(parmq)
add_subdirectory(hitbuilder)
+12 −34
Original line number Diff line number Diff line
set(INCLUDE_DIRECTORIES
  ${CMAKE_CURRENT_SOURCE_DIR}
    ${CMAKE_SOURCE_DIR}/MQ/base
  )

Set(SYSTEM_INCLUDE_DIRECTORIES
    ${SYSTEM_INCLUDE_DIRECTORIES}
    ${FAIRMQ_INCLUDE_DIR}
)

include_directories(${INCLUDE_DIRECTORIES})
include_directories(SYSTEM ${SYSTEM_INCLUDE_DIRECTORIES})

set(LINK_DIRECTORIES
  ${FAIRMQ_LIBRARY_DIR}
)

link_directories(${LINK_DIRECTORIES})

set(FAIR_LIBS
  FairMQ
)

If(FAIRLOGGER_FOUND)
  set(FAIR_LIBS
      ${FAIR_LIBS}
      FairLogger
     )
EndIf()

set(SRCS
  CbmMQChannels.cxx
  )

Set(LIBRARY_NAME CbmMQBase)
Set(DEPENDENCIES
    ${FAIR_LIBS}
set(LIBRARY_NAME CbmMQBase)
set(PUBLIC_DEPENDENCIES
  FairMQ::FairMQ
  )

set(INTERFACE_DEPENDENCIES
  ROOT::Net
  )

GENERATE_LIBRARY()
generate_cbm_library()
+17 −14
Original line number Diff line number Diff line
/* Copyright (C) 2019 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
   SPDX-License-Identifier: GPL-3.0-only
   Authors: Florian Uhlig [committer] */

#include "CbmMQChannels.h"

#include "FairMQDevice.h"

CbmMQChannels::CbmMQChannels(std::vector<std::string> allowedChannels)
  : fAllowedChannels {allowedChannels} {
CbmMQChannels::CbmMQChannels(std::vector<std::string> allowedChannels) : fAllowedChannels {allowedChannels}
{
  fChannelsToSend.resize(fAllowedChannels.size());
  for (auto& entry : fChannelsToSend) {
    entry.push_back("");
@@ -10,32 +15,29 @@ CbmMQChannels::CbmMQChannels(std::vector<std::string> allowedChannels)
  fComponentsToSend.resize(fAllowedChannels.size());
}

bool CbmMQChannels::IsChannelNameAllowed(std::string channelName) {
bool CbmMQChannels::IsChannelNameAllowed(std::string channelName)
{
  for (auto const& entry : fAllowedChannels) {
    std::size_t pos1 = channelName.find(entry);
    if (pos1 != std::string::npos) {
      const std::vector<std::string>::const_iterator pos =
        std::find(fAllowedChannels.begin(), fAllowedChannels.end(), entry);
      const std::vector<std::string>::size_type idx =
        pos - fAllowedChannels.begin();
      const std::vector<std::string>::size_type idx = pos - fAllowedChannels.begin();
      LOG(info) << "Found " << entry << " in " << channelName;
      LOG(info) << "Channel name " << channelName
                << " found in list of allowed channel names at position "
                << idx;
      LOG(info) << "Channel name " << channelName << " found in list of allowed channel names at position " << idx;
      fComponentsToSend[idx]++;
      // The array is initialized with one empty string. If the string has still teh value from initialization
      // exchnge the value by the new channel name. In any other case add one more entry to the vector
      if (fChannelsToSend[idx].size() == 1
          && fChannelsToSend[idx].at(0).empty()) {
      if (fChannelsToSend[idx].size() == 1 && fChannelsToSend[idx].at(0).empty()) {
        fChannelsToSend[idx].at(0) = channelName;
      } else {
      }
      else {
        fChannelsToSend[idx].push_back(channelName);
      }
      return true;
    }
  }
  LOG(info) << "Channel name " << channelName
            << " not found in list of allowed channel names.";
  LOG(info) << "Channel name " << channelName << " not found in list of allowed channel names.";
  LOG(info) << "The allowed channels are: ";
  for (auto const& entry : fAllowedChannels) {
    LOG(info) << entry;
@@ -44,7 +46,8 @@ bool CbmMQChannels::IsChannelNameAllowed(std::string channelName) {
  return false;
}

bool CbmMQChannels::CheckChannels(FairMQDevice* device) {
bool CbmMQChannels::CheckChannels(FairMQDevice* device)
{
  // Get the information about created channels from the device
  // Check if the defined channels from the topology (by name)
  // are in the list of channels which are possible/allowed
+7 −4
Original line number Diff line number Diff line
/* Copyright (C) 2019 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
   SPDX-License-Identifier: GPL-3.0-only
   Authors: Florian Uhlig [committer] */

#ifndef CBMMQCHANNELS_H_
#define CBMMQCHANNELS_H_

#include "FairMQDevice.h"

#include <string>
#include <vector>

class FairMQDevice;

class CbmMQChannels {
public:
@@ -14,9 +19,7 @@ public:
  bool CheckChannels(FairMQDevice* device);

  std::vector<int> GetComponentsToSend() { return fComponentsToSend; }
  std::vector<std::vector<std::string>> GetChannelsToSend() {
    return fChannelsToSend;
  }
  std::vector<std::vector<std::string>> GetChannelsToSend() { return fChannelsToSend; }

private:
  std::vector<std::string> fAllowedChannels {};
+32 −52
Original line number Diff line number Diff line
//#ifdef HAVE_FAIRMQSTATEMACHINE
//#include "FairMQStateMachine.h"
//#endif
/* Copyright (C) 2019 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
   SPDX-License-Identifier: GPL-3.0-only
   Authors: Florian Uhlig [committer] */

#include "FairMQDevice.h"

namespace cbm {
  namespace mq {
    enum class Transition : int {
namespace cbm
{
  namespace mq
  {
    enum class Transition : int
    {
      Idle,
      DeviceReady,
      Ready,
@@ -14,69 +18,45 @@ namespace cbm {
      ErrorFound
    };

    enum class State : int { Running };
    enum class State : int
    {
      Running
    };

    void ChangeState(FairMQDevice* device, cbm::mq::Transition transition) {
#ifdef HAVE_FAIRMQSTATEMACHINE
      if (transition == cbm::mq::Transition::ErrorFound) {
        device->ChangeState(FairMQStateMachine::Event::ERROR_FOUND);
      } else if (transition == cbm::mq::Transition::End) {
        device->ChangeState(FairMQStateMachine::Event::END);
      } else if (transition == cbm::mq::Transition::Ready) {
        device->ChangeState(FairMQStateMachine::Event::internal_READY);
      } else if (transition == cbm::mq::Transition::DeviceReady) {
        device->ChangeState(FairMQStateMachine::Event::internal_DEVICE_READY);
      } else if (transition == cbm::mq::Transition::Idle) {
        device->ChangeState(FairMQStateMachine::Event::internal_IDLE);
      } else {
        LOG(fatal) << "State Change not yet implemented";
        device->ChangeState(FairMQStateMachine::Event::ERROR_FOUND);
      }
#else
      if (transition == cbm::mq::Transition::ErrorFound) {
        device->ChangeState(fair::mq::Transition::ErrorFound);
      } else if (transition == cbm::mq::Transition::End) {
    void ChangeState(FairMQDevice* device, cbm::mq::Transition transition)
    {
      if (transition == cbm::mq::Transition::ErrorFound) { device->ChangeState(fair::mq::Transition::ErrorFound); }
      else if (transition == cbm::mq::Transition::End) {
        device->ChangeState(fair::mq::Transition::End);
      } else if (transition == cbm::mq::Transition::Ready) {
      }
      else if (transition == cbm::mq::Transition::Ready) {
        device->ChangeState(fair::mq::Transition::ResetTask);
      } else if (transition == cbm::mq::Transition::DeviceReady) {
      }
      else if (transition == cbm::mq::Transition::DeviceReady) {
        device->ChangeState(fair::mq::Transition::ResetDevice);
      } else if (transition == cbm::mq::Transition::Idle) {
      }
      else if (transition == cbm::mq::Transition::Idle) {
        device->ChangeState(fair::mq::Transition::Stop);
      } else {
      }
      else {
        LOG(fatal) << "State Change not yet implemented";
        device->ChangeState(fair::mq::Transition::ErrorFound);
      }
#endif
    }

    void LogState(FairMQDevice* device) {
#ifdef HAVE_FAIRMQSTATEMACHINE
      //      LOG(info) << "Current State: " <<  FairMQStateMachine::GetCurrentStateName();
      LOG(info) << "Current State: " << device->GetCurrentStateName();
#else
    void LogState(FairMQDevice* device)
    {
      LOG(info) << "Current State: " << device->GetCurrentStateName();
#endif
    }

    bool CheckCurrentState(FairMQDevice* device, cbm::mq::State state) {
#ifdef HAVE_FAIRMQSTATEMACHINE
      if (state == cbm::mq::State::Running) {
        return device->CheckCurrentState(FairMQStateMachine::State::RUNNING);
      } else {
        LOG(fatal) << "State not yet implemented";
        device->ChangeState(FairMQStateMachine::Event::ERROR_FOUND);
        return 0;
      }
#else
      if (state == cbm::mq::State::Running) {
        return !(device->NewStatePending());
      } else {
    bool CheckCurrentState(FairMQDevice* device, cbm::mq::State state)
    {
      if (state == cbm::mq::State::Running) { return !(device->NewStatePending()); }
      else {
        LOG(fatal) << "State not yet implemented";
        device->ChangeState(fair::mq::Transition::ErrorFound);
        return 0;
      }
#endif
    }
  }  // namespace mq
}  // namespace cbm
+16 −0
Original line number Diff line number Diff line
/* Copyright (C) 2021 Facility for Antiproton and Ion Research in Europe, Darmstadt
   SPDX-License-Identifier: GPL-3.0-only
   Authors: Pierre-Alain Loizeau [committer] */

#ifndef CBMMQTMESSAGE_H_
#define CBMMQTMESSAGE_H_

#include "TMessage.h"

// special class to expose protected TMessage constructor
class CbmMqTMessage : public TMessage {
public:
  CbmMqTMessage(void* buf, Int_t len) : TMessage(buf, len) { ResetBit(kIsOwner); }
};

#endif /* CBMMQTMESSAGE_H_ */
+12 −9
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@ Set(SYSTEM_INCLUDE_DIRECTORIES
    ${FAIRMQ_INCLUDE_DIR}
    ${FAIRMQ_INCLUDE_DIR}/options

    ${IPC_INCLUDE_DIRECTORY}
    ${FLES_IPC_INCLUDE_DIRECTORY}
    ${CBMROOT_SOURCE_DIR}/external/cppzmq
)

@@ -66,13 +66,18 @@ If(FAIRLOGGER_FOUND)
     )
EndIf()

set(EXE_NAME EventBuilderEtofStar2019)
set(SRCS CbmDeviceEventBuilderEtofStar2019.cxx runEventBuilderEtofStar2019.cxx)
set(DEPENDENCIES
# Dependencies common to all executables
set(DEPENDENCIES_ALL
  ${DEPENDENCIES}
  ${FAIR_LIBS}
  ${BOOST_LIBS}
  fles_ipc
)

set(EXE_NAME EventBuilderEtofStar2019)
set(SRCS CbmDeviceEventBuilderEtofStar2019.cxx runEventBuilderEtofStar2019.cxx)
set(DEPENDENCIES
  ${DEPENDENCIES_ALL}
  external::fles_ipc
  CbmFlibStar2019
  CbmFlibMcbm2018
  CbmBase
@@ -94,10 +99,8 @@ Set(NO_DICT_SRCS
# Mask warning from file provided by STAR
SET_SOURCE_FILES_PROPERTIES(${CBMROOT_SOURCE_DIR}/fles/star2017/unpacker/star_rhicf.c PROPERTIES COMPILE_FLAGS -Wno-pointer-sign)
set(DEPENDENCIES
  ${DEPENDENCIES}
  ${FAIR_LIBS}
  ${BOOST_LIBS}
  fles_ipc
  ${DEPENDENCIES_ALL}
  external::fles_ipc
  CbmFlibStar2019
  CbmFlibMcbm2018
  CbmBase
+78 −114

File changed.

Preview size limit exceeded, changes collapsed.

+16 −28
Original line number Diff line number Diff line
/* Copyright (C) 2019 PI-UHd, GSI
   SPDX-License-Identifier: GPL-3.0-only
   Authors: Norbert Herrmann [committer] */

/**
 * CbmDeviceEventBuilderEtofStar2019.h
 *
@@ -6,11 +10,13 @@
#ifndef CBMDEVICEEVENTBUILDERETOFSTAR2019_H_
#define CBMDEVICEEVENTBUILDERETOFSTAR2019_H_

#include "FairMQDevice.h"
#include "CbmMqTMessage.h"

#include "TMessage.h"
#include "Timeslice.hpp"

#include "FairMQDevice.h"

#include "TMessage.h"
#include "TStopwatch.h"

class CbmStar2019EventBuilderEtofAlgo;
@@ -31,19 +37,15 @@ public:

  Bool_t ReInitContainers();

  void SetSandboxMode(Bool_t bSandboxMode = kTRUE) {
    fbSandboxMode = bSandboxMode;
  }
  void SetSandboxMode(Bool_t bSandboxMode = kTRUE) { fbSandboxMode = bSandboxMode; }
  void SetEventDumpEnable(Bool_t bDumpEna = kTRUE);

  /// Temp until we change from CbmMcbmUnpack to something else
  void AddMsComponentToList(size_t component, UShort_t usDetectorId);
  void SetNbMsInTs(size_t /*uCoreMsNb*/, size_t /*uOverlapMsNb*/) {};

  CbmDeviceEventBuilderEtofStar2019(const CbmDeviceEventBuilderEtofStar2019&) =
    delete;
  CbmDeviceEventBuilderEtofStar2019
  operator=(const CbmDeviceEventBuilderEtofStar2019&) = delete;
  CbmDeviceEventBuilderEtofStar2019(const CbmDeviceEventBuilderEtofStar2019&) = delete;
  CbmDeviceEventBuilderEtofStar2019 operator=(const CbmDeviceEventBuilderEtofStar2019&) = delete;

protected:
  virtual void InitTask();
@@ -56,13 +58,10 @@ protected:
private:
  uint64_t fNumMessages;
  /// Control flags
  Bool_t
    fbMonitorMode;  //! Switch ON the filling of a minimal set of histograms
  Bool_t
    fbDebugMonitorMode;  //! Switch ON the filling of a additional set of histograms
  Bool_t fbMonitorMode;       //! Switch ON the filling of a minimal set of histograms
  Bool_t fbDebugMonitorMode;  //! Switch ON the filling of a additional set of histograms
  Bool_t fbSandboxMode;       //! Switch OFF the emission of data toward the STAR DAQ
  Bool_t
    fbEventDumpEna;  //! Switch ON the dumping of the events to a binary file
  Bool_t fbEventDumpEna;      //! Switch ON the dumping of the events to a binary file

  /// Parameters management
  TList* fParCList;
@@ -74,10 +73,7 @@ private:
  bool CheckTimeslice(const fles::Timeslice& ts);
  bool IsChannelNameAllowed(std::string channelName);

  std::vector<std::string> fAllowedChannels             = {"tofcomponent",
                                               "parameters",
                                               "etofevts",
                                               "syscmd"};
  std::vector<std::string> fAllowedChannels             = {"tofcomponent", "parameters", "etofevts", "syscmd"};
  std::vector<std::vector<std::string>> fChannelsToSend = {{}, {}, {}};

  /// Processing algo
@@ -92,12 +88,4 @@ private:
  const UInt_t kuBinDumpEndWord = 0xFAEBDEEF;
};

// special class to expose protected TMessage constructor
class CbmMQTMessage : public TMessage {
public:
  CbmMQTMessage(void* buf, Int_t len) : TMessage(buf, len) {
    ResetBit(kIsOwner);
  }
};

#endif /* CBMDEVICEEVENTBUILDERETOFSTAR2019_H_ */
+36 −38
Original line number Diff line number Diff line
/* Copyright (C) 2019 PI-UHd, GSI
   SPDX-License-Identifier: GPL-3.0-only
   Authors: Norbert Herrmann [committer] */

/**
 * CbmDeviceTriggerHandlerEtof.cxx
 *
@@ -6,6 +10,7 @@
 */

#include "CbmDeviceTriggerHandlerEtof.h"

#include "CbmMQDefs.h"

#include "FairEventHeader.h"
@@ -18,22 +23,21 @@
#include "FairRunOnline.h"
#include "FairRuntimeDb.h"

#include <thread>  // this_thread::sleep_for

#include <boost/archive/binary_iarchive.hpp>
#include <boost/archive/binary_oarchive.hpp>
#include <boost/serialization/vector.hpp>

#include <chrono>
#include <iomanip>
#include <string>
#include <thread>  // this_thread::sleep_for

#include <stdexcept>
#include <string>
struct InitTaskError : std::runtime_error {
  using std::runtime_error::runtime_error;
};

static std::chrono::steady_clock::time_point dctime =
  std::chrono::steady_clock::now();
static std::chrono::steady_clock::time_point dctime = std::chrono::steady_clock::now();
static double dSize                                 = 0.;

using namespace std;
@@ -45,11 +49,14 @@ CbmDeviceTriggerHandlerEtof::CbmDeviceTriggerHandlerEtof()
  , fbDebugMonitorMode(kFALSE)
  , fbSandboxMode(kFALSE)
  , fbEventDumpEna(kFALSE)
  , fdEvent(0.) {}
  , fdEvent(0.)
{
}

CbmDeviceTriggerHandlerEtof::~CbmDeviceTriggerHandlerEtof() {}

void CbmDeviceTriggerHandlerEtof::InitTask() try {
void CbmDeviceTriggerHandlerEtof::InitTask()
try {
  // Get the information about created channels from the device
  // Check if the defined channels from the topology (by name)
  // are in the list of channels which are possible/allowed
@@ -62,21 +69,20 @@ void CbmDeviceTriggerHandlerEtof::InitTask() try {
  LOG(info) << "Number of defined input channels: " << noChannel;
  for (auto const& entry : fChannels) {
    LOG(info) << "Channel name: " << entry.first;
    if (!IsChannelNameAllowed(entry.first))
      throw InitTaskError("Channel name does not match.");
    if (entry.first != "syscmd")
      OnData(entry.first, &CbmDeviceTriggerHandlerEtof::HandleData);
    if (!IsChannelNameAllowed(entry.first)) throw InitTaskError("Channel name does not match.");
    if (entry.first != "syscmd") OnData(entry.first, &CbmDeviceTriggerHandlerEtof::HandleData);
    else
      OnData(entry.first, &CbmDeviceTriggerHandlerEtof::HandleMessage);
  }
  InitWorkspace();
} catch (InitTaskError& e) {
}
catch (InitTaskError& e) {
  LOG(error) << e.what();
  cbm::mq::ChangeState(this, cbm::mq::Transition::ErrorFound);
}

bool CbmDeviceTriggerHandlerEtof::IsChannelNameAllowed(
  std::string channelName) {
bool CbmDeviceTriggerHandlerEtof::IsChannelNameAllowed(std::string channelName)
{
  for (auto const& entry : fAllowedChannels) {
    std::size_t pos1 = channelName.find(entry);
    if (pos1 != std::string::npos) {
@@ -84,19 +90,17 @@ bool CbmDeviceTriggerHandlerEtof::IsChannelNameAllowed(
        std::find(fAllowedChannels.begin(), fAllowedChannels.end(), entry);
      const vector<std::string>::size_type idx = pos - fAllowedChannels.begin();
      LOG(info) << "Found " << entry << " in " << channelName;
      LOG(info) << "Channel name " << channelName
                << " found in list of allowed channel names at position "
                << idx;
      LOG(info) << "Channel name " << channelName << " found in list of allowed channel names at position " << idx;
      return true;
    }
  }
  LOG(info) << "Channel name " << channelName
            << " not found in list of allowed channel names.";
  LOG(info) << "Channel name " << channelName << " not found in list of allowed channel names.";
  LOG(error) << "Stop device.";
  return false;
}

Bool_t CbmDeviceTriggerHandlerEtof::InitWorkspace() {
Bool_t CbmDeviceTriggerHandlerEtof::InitWorkspace()
{
  LOG(info) << "Init work space for CbmDeviceTriggerHandlerEtof.";

  // steering variables
@@ -107,19 +111,17 @@ Bool_t CbmDeviceTriggerHandlerEtof::InitWorkspace() {

// handler is called whenever a message arrives on "data", with a reference to the message and a sub-channel index (here 0)
//bool CbmDeviceTriggerHandlerEtof::HandleData(FairMQMessagePtr& msg, int /*index*/)
bool CbmDeviceTriggerHandlerEtof::HandleData(FairMQParts& parts,
                                             int /*index*/) {
bool CbmDeviceTriggerHandlerEtof::HandleData(FairMQParts& parts, int /*index*/)
{
  // Don't do anything with the data
  // Maybe add an message counter which counts the incomming messages and add
  // an output
  fNumMessages++;
  LOG(debug) << "Received message " << fNumMessages << " with " << parts.Size()
             << " parts"
  LOG(debug) << "Received message " << fNumMessages << " with " << parts.Size() << " parts"
             << ", size0: " << parts.At(0)->GetSize();

  uint TrigWord {0};
  std::string msgStrE(static_cast<char*>(parts.At(0)->GetData()),
                      (parts.At(0))->GetSize());
  std::string msgStrE(static_cast<char*>(parts.At(0)->GetData()), (parts.At(0))->GetSize());
  std::istringstream issE(msgStrE);
  boost::archive::binary_iarchive inputArchiveE(issE);
  inputArchiveE >> TrigWord;
@@ -128,17 +130,13 @@ bool CbmDeviceTriggerHandlerEtof::HandleData(FairMQParts& parts,
  int iBuffSzByte = parts.At(1)->GetSize();

  // Send Subevent to STAR
  LOG(debug) << "Send Data for event " << fdEvent << ", TrigWord " << TrigWord
             << " with size " << iBuffSzByte << Form(" at %p ", pDataBuff);
  if (kFALSE == fbSandboxMode) {
    star_rhicf_write(TrigWord, pDataBuff, iBuffSzByte);
  }
  LOG(debug) << "Send Data for event " << fdEvent << ", TrigWord " << TrigWord << " with size " << iBuffSzByte
             << Form(" at %p ", pDataBuff);
  if (kFALSE == fbSandboxMode) { star_rhicf_write(TrigWord, pDataBuff, iBuffSzByte); }
  dSize += iBuffSzByte;
  if (0 == (int) fdEvent % 10000) {
    std::chrono::duration<double> deltatime =
      std::chrono::steady_clock::now() - dctime;
    LOG(info) << "Processed " << fdEvent
              << " events,  delta-time: " << deltatime.count()
    std::chrono::duration<double> deltatime = std::chrono::steady_clock::now() - dctime;
    LOG(info) << "Processed " << fdEvent << " events,  delta-time: " << deltatime.count()
              << ", rate: " << dSize * 1.E-6 / deltatime.count() << "MB/s";
    dctime = std::chrono::steady_clock::now();
    dSize  = 0.;
@@ -150,8 +148,8 @@ bool CbmDeviceTriggerHandlerEtof::HandleData(FairMQParts& parts,

/************************************************************************************/

bool CbmDeviceTriggerHandlerEtof::HandleMessage(FairMQMessagePtr& msg,
                                                int /*index*/) {
bool CbmDeviceTriggerHandlerEtof::HandleMessage(FairMQMessagePtr& msg, int /*index*/)
{
  const char* cmd    = (char*) (msg->GetData());
  const char cmda[4] = {*cmd};
  LOG(info) << "Handle message " << cmd << ", " << cmd[0];
+12 −24
Original line number Diff line number Diff line
/* Copyright (C) 2019 PI-UHd, GSI
   SPDX-License-Identifier: GPL-3.0-only
   Authors: Norbert Herrmann [committer] */

/**
 * CbmDeviceTriggerHandlerStar2019.h
 *
@@ -8,20 +12,19 @@
#ifndef CBMDEVICETRIGGERHANDLERETOF_H_
#define CBMDEVICETRIGGERHANDLERETOF_H_

#include "FairMQDevice.h"
#include "CbmMqTMessage.h"
#include "CbmTofStarData2019.h"

#include "MicrosliceDescriptor.hpp"
#include "Timeslice.hpp"

#include "CbmTofStarData2019.h"
#include "FairMQDevice.h"

#include "Rtypes.h"
#include "TMessage.h"

#include <map>
#include <vector>

class CbmMQTMessage;
// Relevant TOF classes

extern "C" int star_rhicf_write(unsigned int trg_word, void* dta, int bytes);
@@ -55,11 +58,7 @@ private:
  Bool_t ReInitContainers();

  uint64_t fNumMessages;
  std::vector<std::string> fAllowedChannels = {"tofcomponent",
                                               "parameters",
                                               "etofevts",
                                               "tofhits",
                                               "syscmd"};
  std::vector<std::string> fAllowedChannels = {"tofcomponent", "parameters", "etofevts", "tofhits", "syscmd"};

  // Input variables

@@ -68,25 +67,14 @@ private:
  // Constants or setting parameters
  Int_t fiMsgCnt;
  /// Control flags
  Bool_t
    fbMonitorMode;  //! Switch ON the filling of a minimal set of histograms
  Bool_t
    fbDebugMonitorMode;  //! Switch ON the filling of a additional set of histograms
  Bool_t fbMonitorMode;       //! Switch ON the filling of a minimal set of histograms
  Bool_t fbDebugMonitorMode;  //! Switch ON the filling of a additional set of histograms
  Bool_t fbSandboxMode;       //! Switch OFF the emission of data toward the STAR DAQ
  Bool_t
    fbEventDumpEna;  //! Switch ON the dumping of the events to a binary file
  Bool_t fbEventDumpEna;      //! Switch ON the dumping of the events to a binary file

  Double_t fdEvent;

  // histograms
};

// special class to expose protected TMessage constructor
class CbmMQTMessage : public TMessage {
public:
  CbmMQTMessage(void* buf, Int_t len) : TMessage(buf, len) {
    ResetBit(kIsOwner);
  }
};

#endif /* CBMDEVICETRIGGERHANDLERETOF_H_ */
+7 −4
Original line number Diff line number Diff line
/* Copyright (C) 2019 PI-UHd, GSI
   SPDX-License-Identifier: GPL-3.0-only
   Authors: Norbert Herrmann [committer] */

#include "CbmDeviceEventBuilderEtofStar2019.h"
#include "runFairMQDevice.h"

#include <iomanip>
#include <string>

#include "runFairMQDevice.h"

namespace bpo = boost::program_options;
using namespace std;

void addCustomOptions(bpo::options_description& options) { ; }

FairMQDevicePtr getDevice(const FairMQProgOptions& /*config*/) {
  return new CbmDeviceEventBuilderEtofStar2019();
}
FairMQDevicePtr getDevice(const FairMQProgOptions& /*config*/) { return new CbmDeviceEventBuilderEtofStar2019(); }
+10 −7
Original line number Diff line number Diff line
/* Copyright (C) 2019 PI-UHd, GSI
   SPDX-License-Identifier: GPL-3.0-only
   Authors: Norbert Herrmann [committer] */

#include "CbmDeviceTriggerHandlerEtof.h"
#include "runFairMQDevice.h"

#include <iomanip>
#include <string>

#include "runFairMQDevice.h"

namespace bpo = boost::program_options;
using namespace std;

void addCustomOptions(bpo::options_description& options) {
  options.add_options()(
    "SandboxMode", bpo::value<bool>()->default_value(1), "Test mode switch");
void addCustomOptions(bpo::options_description& options)
{
  options.add_options()("SandboxMode", bpo::value<bool>()->default_value(1), "Test mode switch");
  ;
}

FairMQDevicePtr getDevice(const FairMQProgOptions& /*config*/) {
  return new CbmDeviceTriggerHandlerEtof();
}
FairMQDevicePtr getDevice(const FairMQProgOptions& /*config*/) { return new CbmDeviceTriggerHandlerEtof(); }