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

Target

Select target project
  • holau/Gaudi
  • dmagdali/Gaudi
  • pmunozpa/Gaudi
  • ssottoco/Gaudi
  • cvarni/Gaudi
  • mafila/Gaudi
  • admorris/Gaudi
  • staider/Gaudi
  • gunther/Gaudi
  • bstanisl/Gaudi
  • jtorasso/Gaudi
  • wochung/Gaudi
  • mveghel/Gaudi
  • averbyts/Gaudi
  • dguest/Gaudi
  • alboyer/Gaudi
  • dkonst/Gaudi
  • jcarcell/Gaudi
  • elmsheus/Gaudi
  • hpxgaudi/Gaudi
  • ganis/Gaudi
  • tadej/Gaudi
  • hahansen/Gaudi
  • juesseiv/Gaudi
  • imjelde/gaudida
  • jheuel/Gaudi
  • mimazure/Gaudi
  • masato/Gaudi
  • dcasperfaser/Gaudi
  • faser/offline/Gaudi
  • axu/Gaudi
  • sailer/Gaudi
  • amete/Gaudi
  • ponyisi/Gaudi
  • vavolkl/Gaudi
  • mstahl/Gaudi
  • wlampl/Gaudi
  • kreczko/Gaudi
  • emoyse/Gaudi
  • dhynds/Gaudi
  • sstahl/Gaudi
  • rcurrie/Gaudi
  • smh/Gaudi
  • valassi/Gaudi
  • bwynne/Gaudi_gaudi
  • abarton/Gaudi
  • tsulaia/gaudigaudi
  • mnowak/Gaudi
  • roiser/Gaudi
  • merrenst/Gaudi
  • mato/Gaudi
  • christos/Gaudi
  • goetz/Gaudi
  • goetz/AtlasGaudi
  • tsulaia/atlasgaudi
  • olupton/Gaudi
  • pseyfert/Gaudi
  • graemes/Gaudi
  • akraszna/AtlasGaudi
  • cattanem/Gaudi
  • skluth/Gaudi
  • will/Gaudi
  • ssnyder/Gaudi
  • agonzale/Gaudi
  • leggett/AtlasGaudi
  • apearce/Gaudi
  • mnowak/Gaudi-ORIG
  • fwinkl/AtlasGaudi
  • bwynne/Gaudi_atlas
  • chamont/Gaudi
  • rmatev/Gaudi
  • lhcb/Gaudi
  • atlas/Gaudi
  • akraszna/GaudiGaudi
  • fwinkl/Gaudi
  • jonrob/Gaudi
  • azaborow/Gaudi
  • clemenci/Gaudi
  • hgraslan/Gaudi
  • srimanob/Gaudi
  • graven/Gaudi
  • hegner/Gaudi
  • gaudi/Gaudi
83 results
Show changes
Commits on Source (2336)
Showing
with 2828 additions and 590 deletions
...@@ -112,4 +112,15 @@ SpacesInParentheses: true ...@@ -112,4 +112,15 @@ SpacesInParentheses: true
Standard: Cpp11 Standard: Cpp11
TabWidth: 8 TabWidth: 8
UseTab: Never UseTab: Never
---
Language: Json
IndentWidth: 4
ColumnLimit: 120
---
Language: JavaScript
ColumnLimit: 120
---
Language: ObjC
# Don't format Objective-C, Objective-C++ files.
DisableFormat: true
... ...
# Formatting, extracted from #1268
766b187feb138c152ed02b8d8256f1c61ccde4ce
14a63e0a0d68fef767e9988aac418a260ae3d6e7
# Formatting
0e0deb974401d70dd16b151a0983d184aaee75e9
# clang-format
225ae7fa984f6e34c47ffadefa5ae2e344430920
cmake/GaudiProjectConfig.cmake export-subst *.icpp gitlab-language=cpp
release.notes export-subst
...@@ -7,6 +7,8 @@ InstallArea/ ...@@ -7,6 +7,8 @@ InstallArea/
# Centrally managed files and helpers # Centrally managed files and helpers
cache_preload.cmake cache_preload.cmake
toolchain.cmake
Makefile
# CMake temporary files # CMake temporary files
build*/ build*/
...@@ -16,6 +18,7 @@ CTestTestfile.cmake ...@@ -16,6 +18,7 @@ CTestTestfile.cmake
CPackSourceConfig.cmake CPackSourceConfig.cmake
CPackConfig.cmake CPackConfig.cmake
cmake_install.cmake cmake_install.cmake
Testing/
# common byproducts # common byproducts
*.pyc *.pyc
...@@ -28,9 +31,10 @@ DoxyWarnings.log ...@@ -28,9 +31,10 @@ DoxyWarnings.log
*.launch *.launch
*.launch.py *.launch.py
*.launch.opts *.launch.opts
*_cache
# QMTest byproducts # QMTest byproducts
**/tests/qmtest/* **/tests/qmtest/*.*
!**/tests/qmtest/*.qms !**/tests/qmtest/*.qms
!**/tests/qmtest/*.qmt !**/tests/qmtest/*.qmt
......
stages: #####################################################################################
- build # (c) Copyright 1998-2025 CERN for the benefit of the LHCb and ATLAS collaborations #
- test # #
- deploy # This software is distributed under the terms of the Apache version 2 licence, #
# copied verbatim in the file "LICENSE". #
image: gitlab-registry.cern.ch/lhcb-core/lbdocker/centos7-build # #
# In applying this licence, CERN does not waive the privileges and immunities #
# granted to it by virtue of its status as an Intergovernmental Organization #
# or submit itself to any jurisdiction. #
#####################################################################################
variables: variables:
NO_LBLOGIN: "1" CMAKE_GENERATOR: 'Ninja' # default build system
TARGET_BRANCH: master TARGET_BRANCH: master
BINARY_TAG: x86_64-centos7-gcc8-opt TARGET_REPOSITORY: https://gitlab.cern.ch/gaudi/Gaudi.git
BUILDDIR: build-opt
TESTS_REPORT: "test_report" # Job templates
LCG_hostos: "x86_64-centos7" .build: &template_build
LCG_release_area: "/cvmfs/sft.cern.ch/lcg/releases"
LCG_contrib: "/cvmfs/sft.cern.ch/lcg/contrib"
CCACHE_VERSION: "3.3.4-e92e5"
build:gcc8:opt:
stage: build
tags: tags:
- cvmfs - cvmfs
variables: before_script:
BINARY_TAG: x86_64-centos7-gcc8-opt # Add Ninja and CMake to the PATH
BUILDDIR: build-opt - export PATH="/cvmfs/sft.cern.ch/lcg/contrib/CMake/3.20.0/Linux-$(uname -m)/bin:/cvmfs/sft.cern.ch/lcg/contrib/ninja/1.11.1/Linux-$(uname -m)/bin:$PATH"
- export CCACHE_DIR=$PWD/.ccache
- "export LCG_VERSION=$(cut -d: -f2 <<< $CI_JOB_NAME)"
- "export platform=$(cut -d: -f3 <<< $CI_JOB_NAME)"
- "export PRESET=$(cut -d: -f4 <<< $CI_JOB_NAME)"
- if [ -z "$PRESET" ] ; then PRESET=full ; fi
script: script:
- ci-utils/build - git clone https://gitlab.cern.ch/lhcb-core/lcg-toolchains.git
- cmake --version
- cmake -S . -B build -Wno-dev -DCMAKE_TOOLCHAIN_FILE=lcg-toolchains/LCG_${LCG_VERSION}/${platform}.cmake -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DGAUDI_TEST_PUBLIC_HEADERS_BUILD=yes -C ci-utils/preset-${PRESET}.cmake
- ccache -z
# pre-heat ccache cache for GaudiKernel
- jobs=$(nproc)
- while [[ $jobs -ge 1 ]] ; do
- cmake --build build -j $jobs --target GaudiKernel && break || true
- jobs=$(( $jobs / 2 ))
- done
# build from scratch
- cmake --build build --target clean
- cmake --build build 2>&1 | tee build.log
- ccache -s
- cp build/compile_commands.json .
# run the tests
- cd build
- if ctest -T test -j $(nproc) --repeat until-pass:3 --no-compress-output ; then result=success ; else result=failure ; fi
- cp Testing/$(head -1 Testing/TAG)/Test.xml ..
- cd ..
- xsltproc ci-utils/CTest2JUnit.xslt Test.xml > results.xml
- echo "Test results can be browsed at https://lhcb-nightlies.web.cern.ch/utils/test_report?url=${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/Test.xml"
- test "$result" = "success"
artifacts: artifacts:
paths: paths:
- ${BUILDDIR} - build.log
- .ccache - compile_commands.json
- Test.xml
reports:
junit:
- results.xml
when: always
expire_in: 1 week expire_in: 1 week
cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
paths:
- .ccache
- build/Testing
build:gcc8:dbg: .lhcb_build: &template_lhcb_build
stage: build <<: *template_build
tags:
- cvmfs
variables:
BINARY_TAG: x86_64-centos7-gcc8-dbg
BUILDDIR: build-dbg
script: script:
- ci-utils/build - shopt -s expand_aliases
- . /cvmfs/lhcb.cern.ch/lib/LbEnv
- cmake --version
- lb-set-platform $platform
- lb-project-init --overwrite
- ccache -z
- mkdir build.${BINARY_TAG}
- if [ -e build/Testing ] ; then mv build/Testing build.${BINARY_TAG} ; fi
# pre-heat ccache cache for GaudiKernel
- jobs=$(nproc)
- while [[ $jobs -ge 1 ]] ; do
- make BUILDFLAGS=-j$jobs GaudiKernel && break || true
- jobs=$(( $jobs / 2 ))
- done
# build from scratch
- make clean
- make 2>&1 | tee build.log
- ccache -s
# run the tests
- if make test ARGS="-j $(nproc) --repeat until-pass:3 --no-compress-output" ; then result=success ; else result=failure ; fi
- cp build.${BINARY_TAG}/Testing/$(head -1 build.${BINARY_TAG}/Testing/TAG)/Test.xml .
- mkdir -p build && mv build.${BINARY_TAG}/Testing build
- cp build.${BINARY_TAG}/compile_commands.json .
- mv build.${BINARY_TAG}/html .
- xsltproc ci-utils/CTest2JUnit.xslt Test.xml > results.xml
- echo "Test results can be browsed at https://lhcb-nightlies.web.cern.ch/utils/test_report?url=${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/Test.xml"
- test "$result" = "success"
artifacts: artifacts:
paths: paths:
- ${BUILDDIR} - build.log
- .ccache - compile_commands.json
- Test.xml
- html
reports:
junit:
- results.xml
when: always
expire_in: 1 week expire_in: 1 week
check-formatting: .lcg_view_build: &template_lcg_view_build
stage: build <<: *template_build
dependencies: []
image: debian:testing
script: script:
- apt update && apt install -y clang-format-7 python-pip git - . /cvmfs/sft.cern.ch/lcg/views/LCG_${LCG_VERSION}/${platform}/setup.sh
- pip install yapf==0.24.0 - export CONFIGURABLE_DB_IGNORE=/cvmfs/sft.cern.ch/lcg/views/LCG_${LCG_VERSION}/${platform}/lib/Gaudi.confdb
- ci-utils/check-formatting - cmake --version
artifacts: - cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
paths: - ccache -z
- apply-formatting.patch # pre-heat ccache cache for GaudiKernel
when: on_failure - jobs=$(nproc)
expire_in: 1 day - while [[ $jobs -ge 1 ]] ; do
- cmake --build build -j $jobs --target GaudiKernel && break || true
- jobs=$(( $jobs / 2 ))
- done
# build from scratch
- cmake --build build --target clean
- cmake --build build 2>&1 | tee build.log
- ccache -s
- cp build/compile_commands.json .
# run the tests
- cd build
- if ctest -T test -j $(nproc) --repeat until-pass:3 --no-compress-output ; then result=success ; else result=failure ; fi
- cp Testing/$(head -1 Testing/TAG)/Test.xml ..
- cd ..
- xsltproc ci-utils/CTest2JUnit.xslt Test.xml > results.xml
- echo "Test results can be browsed at https://lhcb-nightlies.web.cern.ch/utils/test_report?url=${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/Test.xml"
- test "$result" = "success"
doxygen: .warnings-check: &template_warnings_check
stage: test image: gitlab-registry.cern.ch/linuxsupport/alma9-base:latest
dependencies:
- build:gcc8:opt
tags:
- cvmfs
only:
- master
- tags
variables: variables:
BINARY_TAG: x86_64-centos7-gcc8-opt LOG: build.log
BUILDDIR: build-opt
script: script:
- . ci-utils/env_setup.sh - ci-utils/build-check ${LOG}
- find ${BUILDDIR} -type f -exec touch -d $(date +@%s) \{} \; allow_failure: true
- make BUILDDIR=${BUILDDIR} doc
- rm -rf public
- mkdir -p public/doxygen
- mv ${BUILDDIR}/doxygen/html ${CI_COMMIT_REF_SLUG}
- zip -r -q public/doxygen/${CI_COMMIT_REF_SLUG}.zip ${CI_COMMIT_REF_SLUG}
artifacts:
paths:
- public
expire_in: 1 day
test:gcc8:opt:
stage: test ### Regular builds
dependencies: lcg:105c:x86_64-el9-gcc13-opt:
- build:gcc8:opt <<: *template_build
tags: image: gitlab-registry.cern.ch/lhcb-docker/os-base/alma9-devel:latest
- cvmfs warnings-check:lcg:105c:x86_64-el9-gcc13-opt:
<<: *template_warnings_check
needs:
- job: "lcg:105c:x86_64-el9-gcc13-opt"
artifacts: true
lcg:105c:x86_64-el9-gcc13-dbg:
<<: *template_build
image: gitlab-registry.cern.ch/lhcb-docker/os-base/alma9-devel:latest
warnings-check:lcg:105c:x86_64-el9-gcc13-dbg:
<<: *template_warnings_check
needs:
- job: "lcg:105c:x86_64-el9-gcc13-dbg"
artifacts: true
### Special builds
lcg:105c:x86_64-el9-gcc13-opt:minimal:
<<: *template_build
image: gitlab-registry.cern.ch/lhcb-docker/os-base/alma9-devel:latest
warnings-check:lcg:105c:x86_64-el9-gcc13-opt:minimal:
<<: *template_warnings_check
needs:
- job: "lcg:105c:x86_64-el9-gcc13-opt:minimal"
artifacts: true
lcg:105c:x86_64-el9-gcc13-opt:no-AIDA:
<<: *template_build
image: gitlab-registry.cern.ch/lhcb-docker/os-base/alma9-devel:latest
warnings-check:lcg:105c:x86_64-el9-gcc13-opt:no-AIDA:
<<: *template_warnings_check
needs:
- job: "lcg:105c:x86_64-el9-gcc13-opt:no-AIDA"
artifacts: true
lcg:105c:x86_64-el9-gcc13-opt:no-examples:
<<: *template_build
image: gitlab-registry.cern.ch/lhcb-docker/os-base/alma9-devel:latest
warnings-check:lcg:105c:x86_64-el9-gcc13-opt:no-examples:
<<: *template_warnings_check
needs:
- job: "lcg:105c:x86_64-el9-gcc13-opt:no-examples"
artifacts: true
# LHCb-style build
lhcb:105c:x86_64_v3-el9-gcc13-opt+g:
<<: *template_lhcb_build
image: gitlab-registry.cern.ch/lhcb-docker/os-base/alma9-devel:latest
warnings-check:lhcb:105c:x86_64_v3-el9-gcc13-opt+g:
<<: *template_warnings_check
needs:
- job: "lhcb:105c:x86_64_v3-el9-gcc13-opt+g"
artifacts: true
# Build on LCG View
lcg-view:105c:x86_64-el9-gcc13-opt:
<<: *template_lcg_view_build
image: gitlab-registry.cern.ch/lhcb-docker/os-base/alma9-devel:latest
warnings-check:lcg-view:105c:x86_64-el9-gcc13-opt:
<<: *template_warnings_check
needs:
- job: "lcg-view:105c:x86_64-el9-gcc13-opt"
artifacts: true
# Compatibility
lcg-view:105c:x86_64-el9-clang16-opt:
<<: *template_lcg_view_build
image: gitlab-registry.cern.ch/lhcb-docker/os-base/alma9-devel:latest
warnings-check:lcg-view:105c:x86_64-el9-clang16-opt:
<<: *template_warnings_check
needs:
- job: "lcg-view:105c:x86_64-el9-clang16-opt"
artifacts: true
lcg-view:106:x86_64-el9-gcc13-opt:
<<: *template_lcg_view_build
image: gitlab-registry.cern.ch/lhcb-docker/os-base/alma9-devel:latest
warnings-check:lcg-view:106:x86_64-el9-gcc13-opt:
<<: *template_warnings_check
needs:
- job: "lcg-view:106:x86_64-el9-gcc13-opt"
artifacts: true
lcg-view:104:x86_64-el9-gcc13-opt:
<<: *template_lcg_view_build
image: gitlab-registry.cern.ch/lhcb-docker/os-base/alma9-devel:latest
warnings-check:lcg-view:104:x86_64-el9-gcc13-opt:
<<: *template_warnings_check
needs:
- job: "lcg-view:104:x86_64-el9-gcc13-opt"
artifacts: true
### Misc checks
check-unused:
image: gitlab-registry.cern.ch/lhcb-docker/os-base/alma9-devel:latest
needs:
- job: "lcg:105c:x86_64-el9-gcc13-opt"
artifacts: true
script:
- ci-utils/check-sources compile_commands.json
allow_failure: true
pre-commit-checks:
image: registry.cern.ch/docker.io/library/python:3.9
variables: variables:
BINARY_TAG: x86_64-centos7-gcc8-opt PRE_COMMIT_HOME: ${CI_PROJECT_DIR}/.cache/pre-commit
BUILDDIR: build-opt cache:
paths:
- ${PRE_COMMIT_HOME}
before_script:
- |
set -x
python -m venv ${CI_PROJECT_DIR}/.cache/pre-commit-venv
. ${CI_PROJECT_DIR}/.cache/pre-commit-venv/bin/activate
pip install pre-commit
git fetch $TARGET_REPOSITORY $TARGET_BRANCH
git config user.name "Gitlab CI"
git config user.email "noreply@cern.ch"
script: script:
- ci-utils/test - |
if ! pre-commit run --show-diff-on-failure --from-ref FETCH_HEAD --to-ref HEAD ; then
echo ""
echo "Generating patch file..."
git commit -a -m "pre-commit fixes
patch generated by ${CI_JOB_URL}" > /dev/null
git format-patch HEAD~
cat <<EOF
=======================================
You can apply these changes with:
curl ${CI_JOB_URL}/artifacts/raw/0001-pre-commit-fixes.patch | git am
=======================================
EOF
exit 1
fi
artifacts: artifacts:
paths: paths:
- ${TESTS_REPORT} - 0001-pre-commit-fixes.patch
when: always when: on_failure
expire_in: 1 week expire_in: 1 week
test:gcc8:dbg: ### Documentation
stage: test website:
dependencies: image: registry.cern.ch/docker.io/library/python:3.9
- build:gcc8:dbg
tags:
- cvmfs
variables:
BINARY_TAG: x86_64-centos7-gcc8-dbg
BUILDDIR: build-dbg
script: script:
- ci-utils/test - rm -rf public
- mkdir -p public
- cd docs
- pip install -r source/requirements.txt
- make html
- cp -a build/html/. ../public/.
artifacts: artifacts:
paths: paths:
- ${TESTS_REPORT} - public
when: always expire_in: 1 day
expire_in: 1 week
test_public_headers_build: doxygen:105c:x86_64-el9-gcc13-opt:
stage: test <<: *template_build
dependencies: image: gitlab-registry.cern.ch/lhcb-docker/os-base/alma9-devel:latest
- build:gcc8:opt
tags:
- cvmfs
variables:
BINARY_TAG: x86_64-centos7-gcc8-opt
BUILDDIR: build-opt
script: script:
- ci-utils/test_public_headers_build - . /cvmfs/sft.cern.ch/lcg/views/LCG_${LCG_VERSION}/${platform}/setup.sh
- cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
- cmake --build build --target doc
- rm -rf public
- mkdir -p public/doxygen
- cp -r GaudiRelease/web_helpers/. public/doxygen/.
- mv build/doxygen/html ${CI_COMMIT_REF_SLUG}
- zip -r -q public/doxygen/${CI_COMMIT_REF_SLUG}.zip ${CI_COMMIT_REF_SLUG}
artifacts: artifacts:
paths: paths:
- .ccache - public
expire_in: 1 week expire_in: 1 day
# see https://gitlab.cern.ch/gitlabci-examples/deploy_eos for the details # see https://gitlab.cern.ch/gitlabci-examples/deploy_eos for the details
# of the configuration # of the configuration
deploy-doxygen: deploy-website:
stage: deploy needs:
dependencies: - job: "website"
- doxygen artifacts: true
only: - job: "doxygen:105c:x86_64-el9-gcc13-opt"
- master artifacts: true
- tags rules:
- if: $CI_COMMIT_BRANCH == "master"
- if: $CI_COMMIT_TAG
image: gitlab-registry.cern.ch/ci-tools/ci-web-deployer:latest image: gitlab-registry.cern.ch/ci-tools/ci-web-deployer:latest
script: script:
- test -z "$EOS_ACCOUNT_USERNAME" -o -z "$EOS_ACCOUNT_PASSWORD" -o -z "$EOS_PATH" && exit 0 || true - test -z "$EOS_ACCOUNT_USERNAME" -o -z "$EOS_ACCOUNT_PASSWORD" -o -z "$EOS_PATH" && exit 0 || true
# Script that performs the deploy to EOS. Makes use of the variables defined in the project # Script that performs the deploy to EOS. Makes use of the variables defined in the project
# It will copy the generated content to the folder in EOS # It will copy the generated content to the folder in EOS
- export CI_OUTPUT_DIR=public/
- deploy-eos - deploy-eos
# do not run any globally defined before_script or after_script for this step # do not run any globally defined before_script or after_script for this step
before_script: [] before_script: []
......
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
exclude: "\\.clang-format$"
- id: check-toml
- id: check-added-large-files
- repo: https://gitlab.cern.ch/lhcb-core/dev-tools/check-include-convention.git
rev: 0.1.0
hooks:
- id: check-include-convention
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v16.0.6
hooks:
- id: clang-format
- id: clang-format
name: clang-format (non-standard extensions)
types_or: [file]
files: \.(icc|icpp)$
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.4.4
hooks:
# Run the linter.
- id: ruff
args: [ --fix ]
exclude: "^.*/options/.*$"
# Run the formatter.
- id: ruff-format
- repo: local
hooks:
- id: copyright-year
name: update copyright year
language: script
entry: utils/update_copyright_year.py
types_or: [c++, c, python, cmake, xml, yaml]
exclude: |
(?x)(
ci-utils/preset-.*\.cmake|
lhcbproject\.yml|
tests/.*\.yaml|
\.clang-format
)
This diff is collapsed.
cff-version: 1.2.0
title: Gaudi
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- name: LHCb Collaboration
- name: ATLAS Collaboration
identifiers:
- type: doi
value: 10.5281/zenodo.3660963
repository-code: 'https://gitlab.cern.ch/gaudi/Gaudi'
url: 'https://cern.ch/gaudi'
abstract: >-
Gaudi is a software architecture and framework that can be
used to facilitate the development of data processing
applications for High Energy Physics experiments.
keywords:
- Gaudi
- LHCb
- ATLAS
- CERN
- HEP
- Software Framework
license: Apache-2.0
version: v39r4
date-released: '2025-03-20'
cmake_minimum_required(VERSION 3.6) #####################################################################################
# (c) Copyright 1998-2025 CERN for the benefit of the LHCb and ATLAS collaborations #
# #
# This software is distributed under the terms of the Apache version 2 licence, #
# copied verbatim in the file "LICENSE". #
# #
# In applying this licence, CERN does not waive the privileges and immunities #
# granted to it by virtue of its status as an Intergovernmental Organization #
# or submit itself to any jurisdiction. #
#####################################################################################
#[========================================================================[.rst:
Gaudi
-----
# Configurable options for building Gaudi in the ATLAS software stack: This file is the top level CMakeLists.txt that describes the whole
option( GAUDI_ATLAS "Enable ATLAS-specific settings" OFF ) configuration of the build of Gaudi.
set( GAUDI_ATLAS_BASE_PROJECT "AthenaExternals" CACHE STRING
"Name of the ATLAS base project to build Gaudi against" )
# Ensure that we can find GaudiProjectConfig.cmake A few commands
# (this works only for projects embedding GaudiProjectConfig.cmake) ^^^^^^^^^^^^^^
if(NOT GaudiProject_DIR AND ("$ENV{GaudiProject_DIR}" STREQUAL ""))
set(GaudiProject_DIR ${CMAKE_SOURCE_DIR}/cmake) * Configure: ``cmake -S . -B build.$BINARY_TAG -D CMAKE_BUILD_TYPE=Developer [-G Ninja]``
* Compile: ``cmake --build build.$BINARY_TAG -j `nproc` ``
* Run tests: ``cd build.$BINARY_TAG ; ctest -j `nproc` ; cd ..``
* Install: ``cmake --install build.$BINARY_TAG [--prefix path/to/where/you/want]``
* Package (zip+rpm): ``cmake --build build.$BINARY_TAG -t package``
List of available options
^^^^^^^^^^^^^^^^^^^^^^^^^
An option is a cached variable that can be turned ON or OFF.
To get descriptions and values of these options:
``cmake -N -LH build.$BINARY_TAG``
after the configuration or use ccmake or cmake-gui.
* Optional dependencies
* GAUDI_USE_AIDA
* GAUDI_USE_XERCESC
* GAUDI_USE_CLHEP
* GAUDI_USE_HEPPDT
* GAUDI_USE_CPPUNIT
* GAUDI_USE_UNWIND
* GAUDI_USE_GPERFTOOLS
* GAUDI_USE_DOXYGEN
* GAUDI_USE_INTELAMPLIFIER
* GAUDI_USE_JEMALLOC
* GAUDI_USE_CUDA
* Install options
* GAUDI_INSTALL_OPTIONAL
* Install layout variables
* CMAKE_INSTALL_BINDIR
* CMAKE_INSTALL_LIBDIR
* CMAKE_INSTALL_INCLUDEDIR
* GAUDI_INSTALL_PLUGINDIR
* GAUDI_INSTALL_PYTHONDIR
* GAUDI_INSTALL_CONFIGDIR
* For sanitized build
* GAUDI_GENCONF_NO_FAIL
* Compile options
* GAUDI_BUILD_EXAMPLES
* GAUDI_ENABLE_GAUDIPARTPROP
* GAUDI_REFLEX_COMPONENT_ALIASES
* Doxygen
* DOXYGEN_WITH_LOCAL_MATHJAX
* DOXYGEN_WITH_CPPREFERENCE_LINKS
To disable the build of tests, set the option ``BUILD_TESTING`` to FALSE.
When to re-configure the project manually?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* When a new .qmt file is added.
* When a new python package is added in a python/ folder that already
had one installed python package.
* When a new release.notes*.html is added to GaudiRelease/doc/.
TWiki documentation
^^^^^^^^^^^^^^^^^^^
Developer's guide: `<https://twiki.cern.ch/twiki/bin/view/LHCb/GaudiCMake315Configuration>`_
Maintainer's guide: `<https://twiki.cern.ch/twiki/bin/view/LHCb/MaintainGaudiCMake315Configuration>`_
#]========================================================================]
cmake_minimum_required(VERSION 3.19)
# Optional CUDA
option(GAUDI_USE_CUDA "Build AsynchronousAlgorithm features that require CUDA")
if(GAUDI_USE_CUDA)
set(optionalCUDA CUDA)
else()
set(optionalCUDA)
endif() endif()
#--------------------------------------------------------------- project(Gaudi VERSION 39.4
# Load macros and functions for Gaudi-based projects LANGUAGES CXX ${optionalCUDA}
find_package(GaudiProject REQUIRED) DESCRIPTION "Gaudi Software Framework"
#--------------------------------------------------------------- HOMEPAGE_URL "https://cern.ch/gaudi")
# Base Gaudi on "the ATLAS base project" (AtlasExternals by default) when # Add the "Developer" build type
# building for ATLAS: include(cmake/DeveloperBuildType.cmake)
if( GAUDI_ATLAS )
find_package( ${GAUDI_ATLAS_BASE_PROJECT} ) # set RPATH (currently only on macOS)
gaudi_ctest_setup() # Needed for correct CTest usage in this setup if(APPLE)
include(cmake/GaudiRPath.cmake)
endif() endif()
# Find/set up some needed externals: # Set up the GAUDI_ATOMIC_LIBS variable
include(${CMAKE_SOURCE_DIR}/cmake/externals.cmake) include(cmake/GaudiAtomicLibs.cmake)
# Declare project name and version # Import Gaudi functions (gaudi_*) ==> for documentation look in the file
gaudi_project(Gaudi v31r0) include(cmake/GaudiToolbox.cmake)
# These tests do not really fit in a subdirectory. # Export the list of compile commands
add_test(NAME cmake.CMakeModules set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE BOOL "Enable/Disable output of compile_commands.json" FORCE)
COMMAND nosetests ${CMAKE_SOURCE_DIR}/cmake/tests)
gaudi_add_test(cmake.QMTDeps
COMMAND nosetests --with-doctest ${CMAKE_SOURCE_DIR}/cmake/extract_qmtest_metadata.py)
# Configure how CPack should run: set(GAUDI_USE_PYTHON_MAJOR 3 CACHE STRING "Major version of Python to use")
find_file( _cpack_config NAMES GaudiCPackSettings.cmake string(APPEND GAUDI_OPTIONAL_DEPENDENCIES "set(GAUDI_USE_PYTHON_MAJOR ${GAUDI_USE_PYTHON_MAJOR})\n")
PATHS ${CMAKE_MODULE_PATH} )
if( _cpack_config ) # Find all the dependencies of the project
include( ${_cpack_config} ) list(PREPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/modules") # (Find*.cmake)
else() include(cmake/GaudiDependencies.cmake)
message( WARNING "Could not find GaudiCPackSettings.cmake" )
string(APPEND GAUDI_OPTIONAL_DEPENDENCIES "
set(GAUDI_BUILD_EXAMPLES ${GAUDI_BUILD_EXAMPLES})
set(GAUDI_ENABLE_GAUDIPARTPROP ${GAUDI_ENABLE_GAUDIPARTPROP})
")
# The C++ standard used must be the same as ROOT's
if(NOT GAUDI_CXX_STANDARD)
# Check if ROOT_CXX_STANDARD is already defined
if(DEFINED ROOT_CXX_STANDARD)
message(STATUS "ROOT_CXX_STANDARD is already defined by ROOT. Using it...")
else()
# Deduce CXX_STANDARD from ROOT_CXX_FLAGS
set(ROOT_CXX_FLAGS_TEMP ${ROOT_CXX_FLAGS}) # Use a temporary variable to avoid modifying the original
separate_arguments(ROOT_CXX_FLAGS_TEMP)
list(FILTER ROOT_CXX_FLAGS_TEMP INCLUDE REGEX "-std=(c|gnu)\\+\\+[0-9]+")
list(TRANSFORM ROOT_CXX_FLAGS_TEMP REPLACE "-std=(c|gnu)\\+\\+([0-9]+)" "\\2")
if(NOT ROOT_CXX_FLAGS_TEMP)
message(FATAL_ERROR "Cannot find the C++ standard of ROOT")
endif()
list(GET ROOT_CXX_FLAGS_TEMP 0 ROOT_CXX_STANDARD)
endif()
set(GAUDI_CXX_STANDARD ${ROOT_CXX_STANDARD} CACHE STRING "The version of C++ used to compile Gaudi")
endif()
message(STATUS "Gaudi will be built using C++${GAUDI_CXX_STANDARD} standard.")
set(CMAKE_CXX_STANDARD ${GAUDI_CXX_STANDARD})
set(CMAKE_CXX_STANDARD_REQUIRED TRUE) # do not fall back on older version
set(CMAKE_CXX_EXTENSIONS OFF) # strict c++.. instead of gnu++..
if(GAUDI_USE_CUDA)
set(CMAKE_CUDA_STANDARD ${GAUDI_CXX_STANDARD})
set(CMAKE_CUDA_STANDARD_REQUIRED TRUE)
set(CMAKE_CUDA_EXTENSIONS OFF)
endif()
# Enable testing with CTest/CDash
include(CTest)
# These are test-only, private dependencies
if(BUILD_TESTING)
find_package(Catch2 REQUIRED)
include(Catch)
endif()
# Include sub-projects one by one without introducing dependency conflicts
add_subdirectory(GaudiPluginService)
add_subdirectory(GaudiPolicy)
add_subdirectory(GaudiKernel)
add_subdirectory(GaudiConfiguration)
add_subdirectory(GaudiCoreSvc)
add_subdirectory(GaudiUtils)
add_subdirectory(Gaudi)
add_subdirectory(GaudiFunctional)
add_subdirectory(GaudiAud)
add_subdirectory(GaudiCommonSvc)
add_subdirectory(GaudiHive)
add_subdirectory(GaudiMonitor)
add_subdirectory(GaudiMP)
add_subdirectory(GaudiPartProp)
add_subdirectory(GaudiProfiling)
add_subdirectory(GaudiPython)
add_subdirectory(GaudiRelease)
add_subdirectory(GaudiSvc)
add_subdirectory(PartPropSvc)
add_subdirectory(RootCnv)
add_subdirectory(RootHistCnv)
add_subdirectory(GaudiTestSuite)
add_subdirectory(GaudiExamples)
if(GAUDI_USE_CUDA)
add_subdirectory(GaudiCUDA)
endif()
# Generate GAUDI_VERSION.h
gaudi_generate_version_header_file()
# Framework level tests
# Test scripts inside cmake/
gaudi_add_pytest(cmake/extract_qmtest_metadata.py
PREFIX cmake.doctest.
ROOT_DIR cmake
OPTIONS --doctest-modules
)
if(NOT PROJECT_NAME STREQUAL CMAKE_PROJECT_NAME) # If we are building the full stack as one project
# we do not install nor package nor register CMake tests
# but we add Gaudi's CMake modules to the CMAKE_MODULE_PATH for downstream projects
list(PREPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} PARENT_SCOPE)
return()
endif()
# Unit tests of gaudi_* functions
include(cmake/tests/testGaudiToolbox.cmake)
# Unit tests of the installation
include(cmake/tests/testGaudiInstallation.cmake)
# Unit tests of Gaudi as dependency in a downstream project (with config files)
include(cmake/tests/testGaudiDownstream.cmake)
# Installation of Gaudi
include(CMakePackageConfigHelpers)
# Generate the config files
configure_package_config_file(cmake/GaudiConfig.cmake.in ${PROJECT_NAME}Config.cmake
INSTALL_DESTINATION "${GAUDI_INSTALL_CONFIGDIR}"
PATH_VARS CMAKE_INSTALL_BINDIR CMAKE_INSTALL_LIBDIR CMAKE_INSTALL_INCLUDEDIR
GAUDI_INSTALL_PLUGINDIR GAUDI_INSTALL_PYTHONDIR
NO_CHECK_REQUIRED_COMPONENTS_MACRO)
write_basic_package_version_file(${PROJECT_NAME}ConfigVersion.cmake
COMPATIBILITY AnyNewerVersion)
# Install the set of exported targets
install(EXPORT ${PROJECT_NAME} NAMESPACE ${PROJECT_NAME}::
DESTINATION "${CMAKE_INSTALL_PREFIX}"
FILE "${PROJECT_NAME}Targets.cmake"
DESTINATION "${GAUDI_INSTALL_CONFIGDIR}")
# Install cmake files for downstream project to be able to use Gaudi
gaudi_install(CMAKE cmake/GaudiToolbox.cmake
cmake/header_build_test.tpl
cmake/GaudiDependencies.cmake
cmake/DeveloperBuildType.cmake
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
cmake/modules) # Find*.cmake
install(PROGRAMS
cmake/extract_qmtest_metadata.py # used in gaudi_add_tests(QMTest)
cmake/scan_dict_deps.py # used in gaudi_add_dictionary(...)
DESTINATION "${GAUDI_INSTALL_CONFIGDIR}"
)
# Add an uninstall target
add_custom_target(uninstall
COMMAND test -f ${CMAKE_CURRENT_BINARY_DIR}/install_manifest.txt &&
xargs rm < ${CMAKE_CURRENT_BINARY_DIR}/install_manifest.txt &&
rm ${CMAKE_CURRENT_BINARY_DIR}/install_manifest.txt &&
echo ${PROJECT_NAME} uninstalled successfully. ||
echo ${PROJECT_NAME} has not been installed yet or you need to be root to uninstall.
COMMENT "Uninstalling ${PROJECT_NAME}")
# CPack configuration
set(CPACK_PACKAGE_NAME ${PROJECT_NAME})
set(CPACK_PACKAGE_VENDOR "CERN-LHCb")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_DESCRIPTION}")
set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
foreach(v IN ITEMS MAJOR MINOR PATCH)
set(CPACK_PACKAGE_VERSION_${v} ${PROJECT_VERSION_${v}})
endforeach()
if(DEFINED BINARY_TAG)
set(CPACK_SYSTEM_NAME ${BINARY_TAG})
elseif(DEFINED ENV{BINARY_TAG})
set(CPACK_SYSTEM_NAME $ENV{BINARY_TAG})
endif()
set(CPACK_GENERATOR "ZIP;RPM") # package format
# The following line is needed to prevent the compilation of python modules before packaging (an incorrect version of python may be used).
# FIXME: the day we can tell CMake to prepend the call to rpm by the run script, do it and remove this line (something like ``set(CPACK_RPM_LAUNCHER ${CMAKE_BINARY_DIR}/run)``)
set(CPACK_RPM_SPEC_MORE_DEFINE "%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')")
# -- for the sources
set(CPACK_SOURCE_IGNORE_FILES "/InstallArea/;/build\\\\..*/;/\\\\.git/;/\\\\.git.*")
set(CPACK_SOURCE_GENERATOR "ZIP;RPM")
include(CPack)
# Set the version of the project as a cache variable to be seen by other
# projects in the same super-project.
set(${PROJECT_NAME}_VERSION "${PROJECT_VERSION}" CACHE STRING "Version of ${PROJECT_NAME}" FORCE)
# Optionally enable compatibility with old-style CMake configurations, via helper module
option(GAUDI_LEGACY_CMAKE_SUPPORT "Enable compatibility with old-style CMake builds" "$ENV{GAUDI_LEGACY_CMAKE_SUPPORT}")
if(GAUDI_LEGACY_CMAKE_SUPPORT)
find_file(legacy_cmake_config_support NAMES LegacyGaudiCMakeSupport.cmake)
if(legacy_cmake_config_support)
include(${legacy_cmake_config_support})
else()
message(FATAL_ERROR "GAUDI_LEGACY_CMAKE_SUPPORT set to TRUE, but cannot find LegacyGaudiCMakeSupport.cmake")
endif()
endif() endif()
unset( _cpack_config )
mark_as_advanced( _cpack_config )
Gaudi Contribution Guide
========================
The Gaudi project is open source (see the LICENSE) and welcomes
contributions from experiments and users.
To contribute to Gaudi development you can *fork* the project from
CERN GitLab, where the Gaudi source is held.
Bug fixes and features should be developed in your own branch, then
a *merge request* made back to the upstream Gaudi repository.
By submitting a merge request to the Gaudi repository you agree that
your contribution will be copyrighted to CERN and covered by the Apache 2
licence, as per the LICENSE.
Coding Style Guidelines
-----------------------
Code contributions to Gaudi should adhere to the ``clang-format`` rules
(an automatic check is part of the Continuous Integration system).
gaudi_subdir(Gaudi) #####################################################################################
# (c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations #
gaudi_depends_on_subdirs(GaudiKernel) # #
# This software is distributed under the terms of the Apache version 2 licence, #
#---Executables------------------------------------------------------------- # copied verbatim in the file "LICENSE". #
gaudi_add_executable(Gaudi src/main.cpp LINK_LIBRARIES GaudiKernel) # #
# In applying this licence, CERN does not waive the privileges and immunities #
#---Installation------------------------------------------------------------ # granted to it by virtue of its status as an Intergovernmental Organization #
gaudi_install_python_modules() # or submit itself to any jurisdiction. #
gaudi_install_scripts() #####################################################################################
# Gaudi subdirectory
#---Tests-------------------------------------------------------------------
# FIXME: these variables must be unset in the tests for compatibility with CMT # Build binaries
gaudi_build_env(UNSET GAUDIAPPNAME gaudi_add_executable(Gaudi
UNSET GAUDIAPPVERSION) SOURCES src/main.cpp
LINK GaudiKernel)
gaudi_add_test(QMTest QMTEST # Add a symlink Gaudi.exe -> Gaudi because some tests expect to use Gaudi.exe
ENVIRONMENT file(CREATE_LINK Gaudi ${CMAKE_CURRENT_BINARY_DIR}/Gaudi.exe SYMBOLIC)
JOBOPTSEARCHPATH=${CMAKE_CURRENT_SOURCE_DIR}/tests/pyjobopts:${CMAKE_CURRENT_SOURCE_DIR}/tests
PYTHONPATH+=${CMAKE_CURRENT_SOURCE_DIR}/tests/python) # Generate Gaudi_user.confdb
gaudi_generate_confuserdb(Gaudi.ConfUser)
gaudi_add_test(nose
COMMAND nosetests --with-doctest -v # Python tests
${CMAKE_CURRENT_SOURCE_DIR}/tests/nose gaudi_add_pytest(tests/pytest)
${CMAKE_CURRENT_SOURCE_DIR}/python/Gaudi) gaudi_add_pytest(python/Gaudi/Main.py
OPTIONS --doctest-modules
# Settings relating to sanitizer builds ROOT_DIR python
if (SANITIZER_ENABLED) PREFIX Gaudi.doctest.python.
)
message(STATUS "Enabled sanitizer ${SANITIZER_ENABLED}")
# Install python modules
# Enable automatic LD_PRELOAD gaudi_install(PYTHON)
gaudi_env( SET PRELOAD_SANITIZER_LIB ${SANITIZER_ENABLED}) # Install other scripts
gaudi_build_env(SET PRELOAD_SANITIZER_LIB ${SANITIZER_ENABLED}) gaudi_install(SCRIPTS)
# Address sanitizer runtime options
set(GAUDI_ASAN_OPTS detect_leaks=0,alloc_dealloc_mismatch=0,halt_on_error=0,suppressions=\${GAUDIROOT}/job/Gaudi-ASan.supp
CACHE STRING "Runtime options for AddressSanitizer")
message(STATUS "ASAN OPTIONS ${GAUDI_ASAN_OPTS}")
gaudi_env( SET ASAN_OPTIONS ${GAUDI_ASAN_OPTS} )
gaudi_build_env(SET ASAN_OPTIONS ${GAUDI_ASAN_OPTS} )
# Leak sanitizer runtime options
set(GAUDI_LSAN_OPTS print_suppressions=0,halt_on_error=0,suppressions=\${GAUDIROOT}/job/Gaudi-LSan.supp
CACHE STRING "Runtime options for LeakSanitizer")
message(STATUS "LSAN OPTIONS ${GAUDI_LSAN_OPTS}")
gaudi_env( SET LSAN_OPTIONS ${GAUDI_LSAN_OPTS} )
gaudi_build_env(SET LSAN_OPTIONS ${GAUDI_LSAN_OPTS} )
# Thread sanitizer runtime options
# Note this sanitizer is known to prefer to be run with *everything* built using the
# sanitizer, which is not possible here (i.e. LCG externals). See
# https://github.com/google/sanitizers/wiki/ThreadSanitizerCppManual#non-instrumented-code
# Using the options ignore_interceptors_accesses=1,ignore_noninstrumented_modules=1
# seems to help reduce the noise a bit, but might remove real issues..
set(GAUDI_TSAN_OPTS print_suppressions=0,halt_on_error=0,ignore_interceptors_accesses=1,ignore_noninstrumented_modules=1,suppressions=\${GAUDIROOT}/job/Gaudi-TSan.supp
CACHE STRING "Runtime options for ThreadSanitizer")
message(STATUS "TSAN OPTIONS ${GAUDI_TSAN_OPTS}")
gaudi_env( SET TSAN_OPTIONS ${GAUDI_TSAN_OPTS} )
gaudi_build_env(SET TSAN_OPTIONS ${GAUDI_TSAN_OPTS} )
# Undefined Behaviour sanitizer runtime options
set(GAUDI_UBSAN_OPTS print_stacktrace=1,print_suppressions=0,halt_on_error=0,suppressions=\${GAUDIROOT}/job/Gaudi-UBSan.supp
CACHE STRING "Runtime options for UndefinedSanitizer")
message(STATUS "UBSAN OPTIONS ${GAUDI_UBSAN_OPTS}")
gaudi_env( SET UBSAN_OPTIONS ${GAUDI_UBSAN_OPTS} )
gaudi_build_env(SET UBSAN_OPTIONS ${GAUDI_UBSAN_OPTS} )
endif()
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# Address sanitizer specific suppressions # Address sanitizer specific suppressions
# http://clang.llvm.org/docs/AddressSanitizer.html # http://clang.llvm.org/docs/AddressSanitizer.html
# #
# Note the leak sanitizer options in Gaudi-LSan.supp # Note the leak sanitizer options in Gaudi-LSan.supp
# are also used by the address sanitizer. # are also used by the address sanitizer.
# -------------------------------------------------- # --------------------------------------------------
......
This diff is collapsed.
# -------------------------------------------------- # -----------------------------------------------------------
# Undefined Behaviour sanitizer suppressions # Undefined Behaviour sanitizer suppressions
# http://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html # http://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html
# -------------------------------------------------- # -----------------------------------------------------------
# Boost - https://svn.boost.org/trac10/ticket/13233 # Boost
# https://svn.boost.org/trac10/ticket/13233
vptr:boost/log/attributes/attribute_value.hpp vptr:boost/log/attributes/attribute_value.hpp
vptr:boost/smart_ptr/detail/shared_count.hpp vptr:boost/smart_ptr/detail/shared_count.hpp
# /cvmfs/lhcb.cern.ch/lib/lcg/releases/Boost/1.70.0-cc8f0/x86_64-centos7-gcc8-dbg/include/boost/any.hpp:249:17: runtime error: downcast of address 0x000001169570 which does not point to an object of type 'holder'
vptr:boost/any.hpp
# Xerces / XMLFileCatalog # Xerces / XMLFileCatalog
# /workspace/build/GAUDI/GAUDI_HEAD/GaudiUtils/src/component/XMLFileCatalog.cpp:84:67: runtime error: downcast of address 0x000001927a58 which does not point to an object of type 'DOMElement' # /workspace/build/GAUDI/GAUDI_HEAD/GaudiUtils/src/component/XMLFileCatalog.cpp:84:67: runtime error: downcast of address 0x000001927a58 which does not point to an object of type 'DOMElement'
...@@ -25,10 +28,7 @@ vptr:GaudiUtils/src/component/XMLFileCatalog.cpp ...@@ -25,10 +28,7 @@ vptr:GaudiUtils/src/component/XMLFileCatalog.cpp
# #0 0x7fd5ce2fb0d9 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() /cvmfs/lhcb.cern.ch/lib/lcg/releases/gcc/8.1.0/x86_64-centos7/include/c++/8.1.0/bits/shared_ptr_base.h:161 # #0 0x7fd5ce2fb0d9 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() /cvmfs/lhcb.cern.ch/lib/lcg/releases/gcc/8.1.0/x86_64-centos7/include/c++/8.1.0/bits/shared_ptr_base.h:161
# #1 0x7fd5aecaed10 in (anonymous namespace)::RealFileSystem::dir_begin(llvm::Twine const&, std::error_code&) (/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-centos7-gcc8-dbg/lib/libCling.so+0x249cd10) # #1 0x7fd5aecaed10 in (anonymous namespace)::RealFileSystem::dir_begin(llvm::Twine const&, std::error_code&) (/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-centos7-gcc8-dbg/lib/libCling.so+0x249cd10)
# #2 0x7fd5ad2e5981 in clang::driver::toolchains::Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple(llvm::Triple const&, llvm::opt::ArgList const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, llvm::StringRef, bool) (/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-centos7-gcc8-dbg/lib/libCling.so+0xad3981) # #2 0x7fd5ad2e5981 in clang::driver::toolchains::Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple(llvm::Triple const&, llvm::opt::ArgList const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, llvm::StringRef, bool) (/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-centos7-gcc8-dbg/lib/libCling.so+0xad3981)
# Include gcc version so we don't automatically vptr:bits/shared_ptr_base.h
# apply these to newer releases.
vptr:include/c++/7.3.0/bits/shared_ptr_base.h
vptr:include/c++/8.1.0/bits/shared_ptr_base.h
# TBB # TBB
# /cvmfs/lhcb.cern.ch/lib/lcg/releases/tbb/2018_U1-d3621/x86_64-centos7-gcc7-dbg/include/tbb/task.h:780:34: runtime error: member call on address 0x7fccb4ac8e00 which does not point to an object of type 'scheduler' # /cvmfs/lhcb.cern.ch/lib/lcg/releases/tbb/2018_U1-d3621/x86_64-centos7-gcc7-dbg/include/tbb/task.h:780:34: runtime error: member call on address 0x7fccb4ac8e00 which does not point to an object of type 'scheduler'
...@@ -37,3 +37,50 @@ vptr:include/c++/8.1.0/bits/shared_ptr_base.h ...@@ -37,3 +37,50 @@ vptr:include/c++/8.1.0/bits/shared_ptr_base.h
# ^~~~~~~~~~~~~~~~~~~~~~~ # ^~~~~~~~~~~~~~~~~~~~~~~
# vptr for 'tbb::internal::custom_scheduler<tbb::internal::IntelSchedulerTraits>' # vptr for 'tbb::internal::custom_scheduler<tbb::internal::IntelSchedulerTraits>'
vptr:include/tbb/task.h vptr:include/tbb/task.h
# Gaudi - listcomponents
#/cvmfs/lhcb.cern.ch/lib/lcg/releases/Boost/1.70.0-eebf1/x86_64-centos7-gcc9-dbg/include/boost/serialization/singleton.hpp:181:12: runtime error: reference binding to null pointer of type 'const struct extended_type_info_typeid'
# #0 0x7f1847675979 in boost::serialization::singleton<boost::serialization::extended_type_info_typeid<std::vector<std::tuple<int, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::tuple<int, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > > >::get_instance() /cvmfs/lhcb.cern.ch/lib/lcg/releases/Boost/1.70.0-eebf1/x86_64-centos7-gcc9-dbg/include/boost/serialization/singleton.hpp:181
# #1 0x7f1847675b21 in boost::serialization::singleton<boost::serialization::extended_type_info_typeid<std::vector<std::tuple<int, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::tuple<int, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > > >::get_const_instance() /cvmfs/lhcb.cern.ch/lib/lcg/releases/Boost/1.70.0-eebf1/x86_64-centos7-gcc9-dbg/include/boost/serialization/singleton.hpp:196
# #2 0x7f1847675b21 in boost::archive::detail::oserializer<boost::archive::text_oarchive, std::vector<std::tuple<int, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::tuple<int, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > >::oserializer() /cvmfs/lhcb.cern.ch/lib/lcg/releases/Boost/1.70.0-eebf1/x86_64-centos7-gcc9-dbg/include/boost/archive/detail/oserializer.hpp:116
# #3 0x7f1847675b21 in boost::serialization::detail::singleton_wrapper<boost::archive::detail::oserializer<boost::archive::text_oarchive, std::vector<std::tuple<int, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::tuple<int, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > > >::singleton_wrapper() /cvmfs/lhcb.cern.ch/lib/lcg/releases/Boost/1.70.0-eebf1/x86_64-centos7-gcc9-dbg/include/boost/serialization/singleton.hpp:147
# #4 0x7f1847675b21 in boost::serialization::singleton<boost::archive::detail::oserializer<boost::archive::text_oarchive, std::vector<std::tuple<int, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::tuple<int, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > > >::get_instance() /cvmfs/lhcb.cern.ch/lib/lcg/releases/Boost/1.70.0-eebf1/x86_64-centos7-gcc9-dbg/include/boost/serialization/singleton.hpp:171
# #5 0x7f184754d477 in __static_initialization_and_destruction_0 /cvmfs/lhcb.cern.ch/lib/lcg/releases/Boost/1.70.0-eebf1/x86_64-centos7-gcc9-dbg/include/boost/serialization/singleton.hpp:207
# #6 0x7f184754ef44 in _GLOBAL__sub_I_TestSerializationAlgo.cpp Online/ZeroMQ/component/TestSerializationAlgo.cpp:99
# #7 0x7f1849d7c9b2 in _dl_init_internal (/lib64/ld-linux-x86-64.so.2+0xf9b2)
# #8 0x7f1849d8158d in dl_open_worker (/lib64/ld-linux-x86-64.so.2+0x1458d)
# #9 0x7f1849d7c7c3 in _dl_catch_error (/lib64/ld-linux-x86-64.so.2+0xf7c3)
# #10 0x7f1849d80b7a in _dl_open (/lib64/ld-linux-x86-64.so.2+0x13b7a)
# #11 0x7f1848aacfaa in dlopen_doit (/lib64/libdl.so.2+0xfaa)
# #12 0x7f1849d7c7c3 in _dl_catch_error (/lib64/ld-linux-x86-64.so.2+0xf7c3)
# #13 0x7f1848aad5ac in _dlerror_run (/lib64/libdl.so.2+0x15ac)
# #14 0x7f1848aad040 in __dlopen_check (/lib64/libdl.so.2+0x1040)
# #15 0x4089e4 in main Gaudi/GaudiPluginService/src/listcomponents.cpp:114
# #16 0x7f1848109554 in __libc_start_main (/lib64/libc.so.6+0x22554)
# #17 0x403348 (Gaudi/InstallArea/x86_64-centos7-gcc9-dbg+ubsan/bin/listcomponents.exe+0x403348)
vptr:Gaudi/GaudiPluginService/src/listcomponents.cpp
#/cvmfs/lhcb.cern.ch/lib/lcg/releases/Boost/1.70.0-eebf1/x86_64-centos7-gcc9-dbg/include/boost/serialization/singleton.hpp:181:12: runtime error: reference binding to null pointer of type 'const struct extended_type_info_typeid'
# #0 0x7f1b07822066 in boost::serialization::singleton<boost::serialization::extended_type_info_typeid<std::map<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<int>, std::allocator<std::pair<int const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > > >::get_instance() /cvmfs/lhcb.cern.ch/lib/lcg/releases/Boost/1.70.0-eebf1/x86_64-centos7-gcc9-dbg/include/boost/serialization/singleton.hpp:181
# #1 0x7f1b0782220e in boost::serialization::singleton<boost::serialization::extended_type_info_typeid<std::map<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<int>, std::allocator<std::pair<int const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > > >::get_const_instance() /cvmfs/lhcb.cern.ch/lib/lcg/releases/Boost/1.70.0-eebf1/x86_64-centos7-gcc9-dbg/include/boost/serialization/singleton.hpp:196
# #2 0x7f1b0782220e in boost::archive::detail::oserializer<boost::archive::text_oarchive, std::map<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<int>, std::allocator<std::pair<int const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > >::oserializer() /cvmfs/lhcb.cern.ch/lib/lcg/releases/Boost/1.70.0-eebf1/x86_64-centos7-gcc9-dbg/include/boost/archive/detail/oserializer.hpp:116
# #3 0x7f1b0782220e in boost::serialization::detail::singleton_wrapper<boost::archive::detail::oserializer<boost::archive::text_oarchive, std::map<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<int>, std::allocator<std::pair<int const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > > >::singleton_wrapper() /cvmfs/lhcb.cern.ch/lib/lcg/releases/Boost/1.70.0-eebf1/x86_64-centos7-gcc9-dbg/include/boost/serialization/singleton.hpp:147
# #4 0x7f1b0782220e in boost::serialization::singleton<boost::archive::detail::oserializer<boost::archive::text_oarchive, std::map<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<int>, std::allocator<std::pair<int const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > > >::get_instance() /cvmfs/lhcb.cern.ch/lib/lcg/releases/Boost/1.70.0-eebf1/x86_64-centos7-gcc9-dbg/include/boost/serialization/singleton.hpp:171
# #5 0x7f1b076f14c3 in __static_initialization_and_destruction_0 /cvmfs/lhcb.cern.ch/lib/lcg/releases/Boost/1.70.0-eebf1/x86_64-centos7-gcc9-dbg/include/boost/serialization/singleton.hpp:207
# #6 0x7f1b076f2f44 in _GLOBAL__sub_I_TestSerializationAlgo.cpp Online/ZeroMQ/component/TestSerializationAlgo.cpp:99
# #7 0x7f1b141079b2 in _dl_init_internal (/lib64/ld-linux-x86-64.so.2+0xf9b2)
# #8 0x7f1b1410c58d in dl_open_worker (/lib64/ld-linux-x86-64.so.2+0x1458d)
# #9 0x7f1b141077c3 in _dl_catch_error (/lib64/ld-linux-x86-64.so.2+0xf7c3)
# #10 0x7f1b1410bb7a in _dl_open (/lib64/ld-linux-x86-64.so.2+0x13b7a)
# #11 0x7f1b0cab3faa in dlopen_doit (/lib64/libdl.so.2+0xfaa)
# #12 0x7f1b141077c3 in _dl_catch_error (/lib64/ld-linux-x86-64.so.2+0xf7c3)
# #13 0x7f1b0cab45ac in _dlerror_run (/lib64/libdl.so.2+0x15ac)
# #14 0x7f1b0cab4040 in __dlopen_check (/lib64/libdl.so.2+0x1040)
# #15 0x7f1b11cdbca0 in doLoad Gaudi/GaudiKernel/src/Lib/System.cpp:98
# #16 0x7f1b11ce3378 in loadWithoutEnvironment Gaudi/GaudiKernel/src/Lib/System.cpp:141
# #17 0x7f1b11ce3b31 in System::loadDynamicLib(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, void**) Gaudi/GaudiKernel/src/Lib/System.cpp:174
# #18 0x459b01 in configGenerator::genConfig(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) Gaudi/GaudiKernel/src/Util/genconf.cpp:501
# #19 0x4724f5 in main Gaudi/GaudiKernel/src/Util/genconf.cpp:434
# #20 0x7f1b0ccd9554 in __libc_start_main (/lib64/libc.so.6+0x22554)
# #21 0x436fa8 (Gaudi/InstallArea/x86_64-centos7-gcc9-dbg+ubsan/bin/genconf.exe+0x436fa8)
vptr:Gaudi/GaudiKernel/src/Util/genconf.cpp
#####################################################################################
# (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations #
# #
# This software is distributed under the terms of the Apache version 2 licence, #
# copied verbatim in the file "LICENSE". #
# #
# In applying this licence, CERN does not waive the privileges and immunities #
# granted to it by virtue of its status as an Intergovernmental Organization #
# or submit itself to any jurisdiction. #
#####################################################################################
import sys import sys
import Gaudi.Configurables import Gaudi.Configurables
sys.modules[__name__] = Gaudi.Configurables sys.modules[__name__] = Gaudi.Configurables
#####################################################################################
# (c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations #
# #
# This software is distributed under the terms of the Apache version 2 licence, #
# copied verbatim in the file "LICENSE". #
# #
# In applying this licence, CERN does not waive the privileges and immunities #
# granted to it by virtue of its status as an Intergovernmental Organization #
# or submit itself to any jurisdiction. #
#####################################################################################
# File: Gaudi/CommonGaudiConfigurables.py # File: Gaudi/CommonGaudiConfigurables.py
# Author: Pere Mato (pere.mato@cern.ch) # Author: Pere Mato (pere.mato@cern.ch)
""" """
This module would scan all known Gaudi configurable modules for This module would scan all known Gaudi configurable modules for
'Configurable' classes and fill __all__ such that it can be imported 'Configurable' classes and fill __all__ such that it can be imported
by any module requiring it. by any module requiring it.
""" """
from GaudiKernel.Configurable import Configurable from GaudiKernel.Configurable import Configurable
from GaudiKernel.ConfigurableMeta import ConfigurableMeta from GaudiKernel.ConfigurableMeta import ConfigurableMeta
__all__ = [] __all__ = []
packages = [ packages = [
'GaudiCoreSvc', 'GaudiCommonSvc', 'GaudiSvc', 'GaudiAlg', 'GaudiAud', "GaudiCoreSvc",
'GaudiPoolDb', 'RootHistCnv', 'GaudiUtils', 'RootCnv' "GaudiCommonSvc",
"GaudiSvc",
"GaudiAud",
"GaudiPoolDb",
"RootHistCnv",
"GaudiUtils",
"RootCnv",
] ]
# --Loop open all listed packages and populate __all__ with the names and # --Loop open all listed packages and populate __all__ with the names and
# the local scope with the Configurable classes # the local scope with the Configurable classes
for package in packages: for package in packages:
try: try:
mod = __import__('%s.%sConf' % (package, package), globals(), locals(), mod = __import__(
['%sConf' % package]) "%s.%sConf" % (package, package), globals(), locals(), ["%sConf" % package]
)
for nam in dir(mod): for nam in dir(mod):
cls = getattr(mod, nam) cls = getattr(mod, nam)
if type(cls) is ConfigurableMeta and issubclass(cls, Configurable): if type(cls) is ConfigurableMeta and issubclass(cls, Configurable):
...@@ -32,26 +50,26 @@ for package in packages: ...@@ -32,26 +50,26 @@ for package in packages:
# --Fix some of the name idiosyncrasies in Gaudi # --Fix some of the name idiosyncrasies in Gaudi
aliases = { aliases = {
'EventDataSvc': 'EvtDataSvc', "EventDataSvc": "EvtDataSvc",
'DetectorDataSvc': 'DetDataSvc', "DetectorDataSvc": "DetDataSvc",
'HistogramDataSvc': 'HistogramSvc', "HistogramDataSvc": "HistogramSvc",
'HbookHistSvc': 'HbookCnv__PersSvc', "HbookHistSvc": "HbookCnv__PersSvc",
'RootHistSvc': 'RootHistCnv__PersSvc', "RootHistSvc": "RootHistCnv__PersSvc",
'EventPersistencySvc': 'EvtPersistencySvc', "EventPersistencySvc": "EvtPersistencySvc",
'DetectorPersistencySvc': 'DetPersistencySvc', "DetectorPersistencySvc": "DetPersistencySvc",
'HistogramPersistencySvc': 'HistogramPersistencySvc', "HistogramPersistencySvc": "HistogramPersistencySvc",
'FileRecordPersistencySvc': 'PersistencySvc', "FileRecordPersistencySvc": "PersistencySvc",
'FileCatalog': 'Gaudi__MultiFileCatalog', "FileCatalog": "Gaudi__MultiFileCatalog",
'IODataManager': 'Gaudi__IODataManager', "IODataManager": "Gaudi__IODataManager",
'RootCnvSvc': 'Gaudi__RootCnvSvc', "RootCnvSvc": "Gaudi__RootCnvSvc",
'RootEvtSelector': 'Gaudi__RootEvtSelector', "RootEvtSelector": "Gaudi__RootEvtSelector",
} }
_gbl = globals() # optimization _gbl = globals() # optimization
# This would be nicer with dict comprehension (http://www.python.org/dev/peps/pep-0274)
# but it is available only in Python 2.7 # do the aliasing only if the original is available
aliases = dict([(new, _gbl[old]) for new, old in aliases.items() if old in _gbl aliases = {new: _gbl[old] for new, old in aliases.items() if old in _gbl}
]) # do the aliasing only if the original is available
# change the default name # change the default name
for new in aliases: for new in aliases:
aliases[new].DefaultedName = new aliases[new].DefaultedName = new
...@@ -59,4 +77,8 @@ for new in aliases: ...@@ -59,4 +77,8 @@ for new in aliases:
_gbl.update(aliases) _gbl.update(aliases)
__all__.extend(aliases) __all__.extend(aliases)
# remove temporaries # remove temporaries
del _gbl, new del _gbl
try:
del new # only available if len(aliases)>0
except NameError:
pass
#####################################################################################
# (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations #
# #
# This software is distributed under the terms of the Apache version 2 licence, #
# copied verbatim in the file "LICENSE". #
# #
# In applying this licence, CERN does not waive the privileges and immunities #
# granted to it by virtue of its status as an Intergovernmental Organization #
# or submit itself to any jurisdiction. #
#####################################################################################
from GaudiKernel.Configurable import ConfigurableUser
class GaudiPersistency(ConfigurableUser):
"""Configurable to enable ROOT-based persistency.
Note: it requires Gaudi::RootCnvSvc (package RootCnv).
"""
__slots__ = {}
def __apply_configuration__(self):
"""Apply low-level configuration"""
# aliased names
from Configurables import (
ApplicationMgr,
EventPersistencySvc,
FileCatalog,
FileRecordDataSvc,
IODataManager,
PersistencySvc,
RootCnvSvc,
)
cnvSvcs = [RootCnvSvc()]
EventPersistencySvc().CnvServices += cnvSvcs
PersistencySvc("FileRecordPersistencySvc").CnvServices += cnvSvcs
app = ApplicationMgr()
app.SvcOptMapping += [FileCatalog(), IODataManager(), RootCnvSvc()]
app.ExtSvc += [FileRecordDataSvc()]
#####################################################################################
# (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations #
# #
# This software is distributed under the terms of the Apache version 2 licence, #
# copied verbatim in the file "LICENSE". #
# #
# In applying this licence, CERN does not waive the privileges and immunities #
# granted to it by virtue of its status as an Intergovernmental Organization #
# or submit itself to any jurisdiction. #
#####################################################################################
# File: Gaudi/python/Gaudi/Configuration.py # File: Gaudi/python/Gaudi/Configuration.py
# Author: Pere Mato (pere.mato@cern.ch) # Author: Pere Mato (pere.mato@cern.ch)
from GaudiKernel.Constants import * import logging
from GaudiKernel.Configurable import *
from GaudiKernel.ConfigurableDb import loadConfigurableDb, cfgDb # Make these available in our namespace
from Gaudi.CommonGaudiConfigurables import * # noqa: F401 F403
from GaudiKernel.Configurable import * # noqa: F401 F403
from GaudiKernel.Configurable import Configurable
from GaudiKernel.ConfigurableDb import cfgDb, loadConfigurableDb
from GaudiKernel.ConfigurableDb import getConfigurable as confDbGetConfigurable from GaudiKernel.ConfigurableDb import getConfigurable as confDbGetConfigurable
from CommonGaudiConfigurables import * from GaudiKernel.Constants import * # noqa: F401 F403
from GaudiKernel.ProcessJobOptions import importOptions, importUnits from GaudiKernel.ProcessJobOptions import (
from GaudiKernel.ProcessJobOptions import InstallRootLoggingHandler as _InstallRootLoggingHandler InstallRootLoggingHandler as _InstallRootLoggingHandler,
)
from GaudiKernel.ProcessJobOptions import importOptions, importUnits # noqa: F401
import logging
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
# Ensure that a root logging handler is always present. # Ensure that a root logging handler is always present.
_InstallRootLoggingHandler() _InstallRootLoggingHandler()
...@@ -19,23 +34,33 @@ allConfigurables = Configurable.allConfigurables ...@@ -19,23 +34,33 @@ allConfigurables = Configurable.allConfigurables
def _fillConfDict(): def _fillConfDict():
nFiles = loadConfigurableDb() nFiles = loadConfigurableDb()
log = logging.getLogger('PropertyProxy') log = logging.getLogger("PropertyProxy")
log.debug("Read module info for %d configurables from %d genConfDb files", log.debug(
len(cfgDb), nFiles) "Read module info for %d configurables from %d genConfDb files",
len(cfgDb),
nFiles,
)
if len(cfgDb.duplicates()) > 0: if len(cfgDb.duplicates()) > 0:
log.warning("Found %d duplicates among the %d genConfDb files :", log.warning(
len(cfgDb.duplicates()), nFiles) "Found %d duplicates among the %d genConfDb files :",
len(cfgDb.duplicates()),
nFiles,
)
log.warning("--------------------------------------------------") log.warning("--------------------------------------------------")
log.warning(" -%s: %s - %s", "<component name>", "<module>", log.warning(
"[ <duplicates> ]") " -%s: %s - %s", "<component name>", "<module>", "[ <duplicates> ]"
)
log.warning("--------------------------------------------------") log.warning("--------------------------------------------------")
dups = cfgDb.duplicates() dups = cfgDb.duplicates()
for cfgName in dups.keys(): for cfgName in dups.keys():
log.warning(" -%s: %s - %s", cfgName, cfgDb[cfgName]['module'], log.warning(
str([d['module'] for d in dups[cfgName]])) " -%s: %s - %s",
cfgName,
cfgDb[cfgName]["module"],
str([d["module"] for d in dups[cfgName]]),
)
pass pass
del dups del dups
log.warning("Fix your cmt/requirements file !!")
pass pass
else: else:
log.debug("No duplicates have been found: that's good !") log.debug("No duplicates have been found: that's good !")
...@@ -46,9 +71,6 @@ def _fillConfDict(): ...@@ -46,9 +71,6 @@ def _fillConfDict():
# fill the configurable dictionary at module load # fill the configurable dictionary at module load
_fillConfDict() _fillConfDict()
import os
import sys
def importConfiguration(conf, local=locals()): def importConfiguration(conf, local=locals()):
local[conf] = confDbGetConfigurable(conf) local[conf] = confDbGetConfigurable(conf)
...@@ -80,10 +102,11 @@ def configurationDict(all=False): ...@@ -80,10 +102,11 @@ def configurationDict(all=False):
conf_dict[n][p] = v conf_dict[n][p] = v
# purge empty configurables # purge empty configurables
keys = conf_dict.keys() keys = conf_dict.keys()
ret_dict = {}
for n in keys: for n in keys:
if not conf_dict[n]: if conf_dict[n]:
del conf_dict[n] ret_dict[n] = conf_dict[n]
return conf_dict return ret_dict
def getConfigurable(name, defaultType=None): def getConfigurable(name, defaultType=None):
...@@ -98,7 +121,7 @@ def getConfigurable(name, defaultType=None): ...@@ -98,7 +121,7 @@ def getConfigurable(name, defaultType=None):
if defaultType is None: if defaultType is None:
# try to use the name of the configurable as default type # try to use the name of the configurable as default type
defaultType = name defaultType = name
if type(defaultType) is str: if isinstance(defaultType, str):
# we need to convert from string to actual class # we need to convert from string to actual class
if defaultType in globals(): if defaultType in globals():
# We the type is defined in the global namespace # We the type is defined in the global namespace
...@@ -106,48 +129,6 @@ def getConfigurable(name, defaultType=None): ...@@ -106,48 +129,6 @@ def getConfigurable(name, defaultType=None):
else: else:
# otherwise we try to get it from the Configurables database # otherwise we try to get it from the Configurables database
import Configurables import Configurables
defaultType = getattr(Configurables, defaultType) defaultType = getattr(Configurables, defaultType)
return defaultType(name) return defaultType(name)
def setCustomMainLoop(runner):
'''
Replace the default main execution loop with the specified callable object.
@param runner: a callable that accepts an initialized instance of GaudiPython.AppMgr
and the number of events to process and returns a StatusCode or a boolean
(True means success)
'''
# change the mainLoop function
from Gaudi.Main import gaudimain
gaudimain.mainLoop = lambda _self, app, nevt: runner(app, nevt)
class GaudiPersistency(ConfigurableUser):
"""Configurable to enable ROOT-based persistency.
Note: it requires Gaudi::RootCnvSvc (package RootCnv).
"""
__slots__ = {}
def __apply_configuration__(self):
"""Apply low-level configuration"""
from Configurables import (
ApplicationMgr,
PersistencySvc,
FileRecordDataSvc,
EventPersistencySvc,
)
# aliased names
from Configurables import (
RootCnvSvc,
RootEvtSelector,
IODataManager,
FileCatalog,
)
cnvSvcs = [RootCnvSvc()]
EventPersistencySvc().CnvServices += cnvSvcs
PersistencySvc("FileRecordPersistencySvc").CnvServices += cnvSvcs
app = ApplicationMgr()
app.SvcOptMapping += [FileCatalog(), IODataManager(), RootCnvSvc()]
app.ExtSvc += [FileRecordDataSvc()]
This diff is collapsed.
#####################################################################################
# (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations #
# #
# This software is distributed under the terms of the Apache version 2 licence, #
# copied verbatim in the file "LICENSE". #
# #
# In applying this licence, CERN does not waive the privileges and immunities #
# granted to it by virtue of its status as an Intergovernmental Organization #
# or submit itself to any jurisdiction. #
#####################################################################################
import ctypes
import os import os
import sys import sys
__configurables_module_fullname__ = __name__ + '.Configurables' __configurables_module_fullname__ = __name__ + ".Configurables"
__ignore_missing_configurables__ = False __ignore_missing_configurables__ = False
# Small class that allows to access all the configurables as attributes of the # Small class that allows to access all the configurables as attributes of the
...@@ -19,16 +30,27 @@ class _ConfigurablesModule(object): ...@@ -19,16 +30,27 @@ class _ConfigurablesModule(object):
# If set to true, does not raise an AttributeError if the configurable is not found. # If set to true, does not raise an AttributeError if the configurable is not found.
self.ignoreMissingConfigurables = False self.ignoreMissingConfigurables = False
self.__name__ = __configurables_module_fullname__ self.__name__ = __configurables_module_fullname__
self.__loader__ = None
def __getattr__(self, name): def __getattr__(self, name):
# trigger the load of the configurables database # trigger the load of the configurables database
from Gaudi.Configuration import confDbGetConfigurable, cfgDb
from Gaudi.CommonGaudiConfigurables import aliases from Gaudi.CommonGaudiConfigurables import aliases
from Gaudi.Configuration import cfgDb, confDbGetConfigurable
# return value # return value
retval = None retval = None
# handle the special cases (needed for modules): __all__, __path__ # handle the special cases (needed for modules): __all__, __path__
if name == "__all__": if name == "__all__":
retval = cfgDb.keys() retval = cfgDb.keys()
elif name == "__spec__":
import importlib
retval = importlib.machinery.ModuleSpec(
name=__configurables_module_fullname__,
loader=self.__loader__,
)
elif name == "__package__":
retval = self.__name__
elif name == "__path__": elif name == "__path__":
raise AttributeError("'module' object has no attribute '__path__'") raise AttributeError("'module' object has no attribute '__path__'")
elif name in cfgDb.keys(): # ignore private names elif name in cfgDb.keys(): # ignore private names
...@@ -37,16 +59,76 @@ class _ConfigurablesModule(object): ...@@ -37,16 +59,76 @@ class _ConfigurablesModule(object):
retval = aliases[name] retval = aliases[name]
elif self.ignoreMissingConfigurables: elif self.ignoreMissingConfigurables:
import logging import logging
logging.getLogger(__configurables_module_fullname__).warning( logging.getLogger(__configurables_module_fullname__).warning(
'Configurable class %s not in database', name) "Configurable class %s not in database", name
)
else: else:
# We raise an AttributeError exception if the configurable could not be found # We raise an AttributeError exception if the configurable could not be found
# to respect the Python semantic. # to respect the Python semantic.
raise AttributeError("module '%s' does not have attribute '%s'" % raise AttributeError(
(__configurables_module_fullname__, name)) "module '%s' does not have attribute '%s'"
% (__configurables_module_fullname__, name)
)
return retval return retval
# install the facade module instance as a module # install the facade module instance as a module
Configurables = _ConfigurablesModule() Configurables = _ConfigurablesModule()
sys.modules[__configurables_module_fullname__] = Configurables sys.modules[__configurables_module_fullname__] = Configurables
_GaudiKernelLib = None
class c_opt_t(ctypes.Structure):
_fields_ = [("key", ctypes.c_char_p), ("value", ctypes.c_char_p)]
class Application(object):
def __init__(self, opts, appType="Gaudi::Application"):
global _GaudiKernelLib
if _GaudiKernelLib is None:
# Note: using CDLL instead of PyDLL means that every call to the Python C
# API must be protected acquiring the GIL
#
if sys.platform == "darwin":
# LD_LIBRARY_PATH cannot be used for dlopen on macos;
# use custom variable GAUDI_PLUGIN_PATH instead
_libpaths = os.environ.get("GAUDI_PLUGIN_PATH")
if not _libpaths:
print("WARNING: GAUDI_PLUGIN_PATH is empty!")
for _path in _libpaths.split(":"):
_lib = os.path.join(_path, "libGaudiKernel.dylib")
if os.path.isfile(_lib):
gkl = _GaudiKernelLib = ctypes.CDLL(
_lib,
mode=ctypes.RTLD_GLOBAL,
)
else:
gkl = _GaudiKernelLib = ctypes.CDLL(
"libGaudiKernel.so",
mode=ctypes.RTLD_GLOBAL,
)
gkl._py_Gaudi__Application__create.restype = ctypes.c_void_p
gkl._py_Gaudi__Application__run.argtypes = [ctypes.c_void_p]
gkl._py_Gaudi__Application__run.restype = ctypes.c_int
gkl._py_Gaudi__Application__delete.argtypes = [ctypes.c_void_p]
c_opts = (c_opt_t * len(opts))()
for idx, item in enumerate(opts.items()):
c_opts[idx].key = item[0].encode("ascii")
c_opts[idx].value = item[1].encode("ascii")
self._impl = _GaudiKernelLib._py_Gaudi__Application__create(
appType.encode("ascii"), c_opts, ctypes.c_ulong(len(c_opts))
)
@classmethod
def create(cls, appType, opts):
return cls(opts, appType=appType)
def run(self):
return _GaudiKernelLib._py_Gaudi__Application__run(self._impl)
def __del__(self):
_GaudiKernelLib._py_Gaudi__Application__delete(self._impl)