Skip to content

Commits on Source 2733

2,633 additional commits have been omitted to prevent performance issues.
---
Language: Cpp
BasedOnStyle: LLVM
# BasedOnStyle: LLVM
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: true
AlignEscapedNewlinesLeft: false
AlignEscapedNewlines: Right
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: true
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: true
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true
BinPackArguments: true
BinPackParameters: true
BreakBeforeBinaryOperators: false
BreakBeforeBraces: Linux
BraceWrapping:
AfterClass: false
AfterControlStatement: false
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
BreakBeforeInheritanceComma: false
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: true
BreakConstructorInitializers: BeforeComma
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 120
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerBinding: false
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
- Regex: '.*'
Priority: 1
IncludeIsMainRegex: '(Test)?$'
IndentCaseLabels: false
IndentFunctionDeclarationAfterType: false
IndentPPDirectives: AfterHash
IndentWidth: 2
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: All
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 60
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerBindsToType: true
SpaceAfterControlStatementKeyword: true
PointerAlignment: Left
ReflowComments: true
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: true
# Waiting for clang-5
# SplitEmptyFunction: false
# SplitEmptyRecord: false
# SplitEmptyNamespace: false
Standard: Cpp11
TabWidth: 8
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
release.notes export-subst
*.icpp gitlab-language=cpp
# backup files
*~
*.pyc
.*.swp
build.*.log
Makefile
NMake
install.*.history
setup.*
cleanup.*
version.cmt
genConf/
QMTest/
# build products
InstallArea/
patches/
test_results/
*-slc[56]-*/
i686-winxp-vc9-dbg/
# Centrally managed files and helpers
cache_preload.cmake
toolchain.cmake
Makefile
.*-slc[56]-*.d/
.i686-winxp-vc9-dbg.d/
# CMake temporary files
build*/
.build/
CMakeFiles/
CTestTestfile.cmake
CPackSourceConfig.cmake
CPackConfig.cmake
cmake_install.cmake
Testing/
# common byproducts
*.pyc
*.pyo
DoxyWarnings.log
.gdb_history
*.new
.coverage
*.patch
*.launch
*.launch.py
*.launch.opts
*_cache
# QMTest byproducts
**/tests/qmtest/*.*
!**/tests/qmtest/*.qms
!**/tests/qmtest/*.qmt
# Metadata used by IDEs
# - Eclipse
.project
.cproject
.settings
.pydevproject
.vscode
.build/
build-dir/
build.*/
.eclipse/
CMakeFiles/
CTestTestfile.cmake
CPackSourceConfig.cmake
CPackConfig.cmake
cmake_install.cmake
GaudiConfig.cmake
GaudiConfigVersion.cmake
Gaudi/ChangeLog
GaudiAlg/ChangeLog
GaudiAud/ChangeLog
GaudiCommonSvc/ChangeLog
GaudiCoreSvc/ChangeLog
GaudiExamples/ChangeLog
GaudiGSL/ChangeLog
GaudiKernel/ChangeLog
GaudiMonitor/ChangeLog
GaudiMP/ChangeLog
GaudiPartProp/ChangeLog
GaudiPolicy/ChangeLog
GaudiProfiling/ChangeLog
GaudiPython/ChangeLog
GaudiRelease/ChangeLog
GaudiSvc/ChangeLog
GaudiSys/ChangeLog
GaudiUtils/ChangeLog
PartPropSvc/ChangeLog
RootCnv/ChangeLog
RootHistCnv/ChangeLog
ChangeLog
# - QtCreator
CMakeLists.txt.user
# - VSCode
.vscode/
stages:
- build
- test
- deploy
image: gitlab-registry.cern.ch/lhcb-core/lbdocker/centos7-build
#####################################################################################
# (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. #
#####################################################################################
variables:
NO_LBLOGIN: "1"
CMAKE_GENERATOR: 'Ninja' # default build system
TARGET_BRANCH: master
BINARY_TAG: x86_64-centos7-gcc7-opt
BUILDDIR: build-opt
TESTS_REPORT: "test_report"
LCG_hostos: "x86_64-centos7"
LCG_release_area: "/cvmfs/sft.cern.ch/lcg/releases"
LCG_contrib: "/cvmfs/sft.cern.ch/lcg/contrib"
CLANG_FORMAT_VERSION: "3.9"
CCACHE_VERSION: "3.3.4-e92e5"
build:gcc7:opt:
stage: build
TARGET_REPOSITORY: https://gitlab.cern.ch/gaudi/Gaudi.git
# Job templates
.build: &template_build
tags:
- cvmfs
variables:
BINARY_TAG: x86_64-centos7-gcc7-opt
BUILDDIR: build-opt
before_script:
# Add Ninja and CMake to the PATH
- export PATH="/cvmfs/sft.cern.ch/lcg/contrib/CMake/3.30.6/Linux-$(uname -m)/bin:/cvmfs/sft.cern.ch/lcg/contrib/ninja/1.12.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:
- 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) --test-load $(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:
paths:
- ${BUILDDIR}
- .ccache
- build.log
- compile_commands.json
- Test.xml
reports:
junit:
- results.xml
when: always
expire_in: 1 week
build:gcc7:dbg:
stage: build
tags:
- cvmfs
variables:
BINARY_TAG: x86_64-centos7-gcc7-dbg
BUILDDIR: build-dbg
script:
- ci-utils/build
artifacts:
cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
paths:
- ${BUILDDIR}
- .ccache
expire_in: 1 week
- build/Testing
build:gcc62:opt:
stage: build
tags:
- cvmfs
variables:
BINARY_TAG: x86_64-centos7-gcc62-opt
BUILDDIR: build-gcc62
.lhcb_build: &template_lhcb_build
<<: *template_build
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:
paths:
- ${BUILDDIR}
- .ccache
- build.log
- compile_commands.json
- Test.xml
- html
reports:
junit:
- results.xml
when: always
expire_in: 1 week
check-formatting:
stage: test
dependencies: []
tags:
- cvmfs
variables:
BINARY_TAG: x86_64-centos7-gcc7-opt
BUILDDIR: build-opt
.lcg_view_build: &template_lcg_view_build
<<: *template_build
script:
- ci-utils/check-formatting
artifacts:
paths:
- apply-formatting.patch
when: on_failure
expire_in: 1 day
- . /cvmfs/sft.cern.ch/lcg/views/LCG_${LCG_VERSION}/${platform}/setup.sh
- export CONFIGURABLE_DB_IGNORE=/cvmfs/sft.cern.ch/lcg/views/LCG_${LCG_VERSION}/${platform}/lib/Gaudi.confdb
- cmake --version
- cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
- 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) --test-load $(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:
stage: test
dependencies:
- build:gcc7:opt
tags:
- cvmfs
only:
- master
- tags
.warnings-check: &template_warnings_check
image: gitlab-registry.cern.ch/linuxsupport/alma9-base:latest
variables:
BINARY_TAG: x86_64-centos7-gcc7-opt
BUILDDIR: build-opt
LOG: build.log
script:
- . ci-utils/env_setup.sh
- find ${BUILDDIR} -type f -exec touch -d $(date +@%s) \{} \;
- 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
- ci-utils/build-check ${LOG}
allow_failure: true
test:gcc7:opt:
stage: test
dependencies:
- build:gcc7:opt
tags:
- cvmfs
variables:
BINARY_TAG: x86_64-centos7-gcc7-opt
BUILDDIR: build-opt
### Regular builds
lcg:105c:x86_64-el9-gcc13-opt:
<<: *template_build
image: gitlab-registry.cern.ch/lhcb-docker/os-base/alma9-devel:latest
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:107:x86_64-el9-gcc14-opt:
<<: *template_lcg_view_build
image: gitlab-registry.cern.ch/lhcb-docker/os-base/alma9-devel:latest
warnings-check:lcg-view:107:x86_64-el9-gcc14-opt:
<<: *template_warnings_check
needs:
- job: "lcg-view:107:x86_64-el9-gcc14-opt"
artifacts: true
# Compatibility
lcg-view:107:x86_64-el9-clang19-opt:
<<: *template_lcg_view_build
image: gitlab-registry.cern.ch/lhcb-docker/os-base/alma9-devel:latest
warnings-check:lcg-view:107:x86_64-el9-clang19-opt:
<<: *template_warnings_check
needs:
- job: "lcg-view:107:x86_64-el9-clang19-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/test
artifacts:
paths:
- ${TESTS_REPORT}
when: always
expire_in: 1 week
- ci-utils/check-sources compile_commands.json
allow_failure: true
test:gcc7:dbg:
stage: test
dependencies:
- build:gcc7:dbg
tags:
- cvmfs
pre-commit-checks:
image: registry.cern.ch/docker.io/library/python:3.9
variables:
BINARY_TAG: x86_64-centos7-gcc7-dbg
BUILDDIR: build-dbg
PRE_COMMIT_HOME: ${CI_PROJECT_DIR}/.cache/pre-commit
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:
- 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:
paths:
- ${TESTS_REPORT}
when: always
- 0001-pre-commit-fixes.patch
when: on_failure
expire_in: 1 week
test:gcc62:opt:
stage: test
dependencies:
- build:gcc62:opt
tags:
- cvmfs
variables:
BINARY_TAG: x86_64-centos7-gcc62-opt
BUILDDIR: build-gcc62
TESTS_REPORT: test_report-gcc62
### Documentation
website:
image: registry.cern.ch/docker.io/library/python:3.9
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:
paths:
- ${TESTS_REPORT}
when: always
expire_in: 1 week
- public
expire_in: 1 day
test_public_headers_build:
stage: test
dependencies:
- build:gcc7:opt
tags:
- cvmfs
variables:
BINARY_TAG: x86_64-centos7-gcc7-opt
BUILDDIR: build-opt
doxygen:107:x86_64-el9-gcc14-opt:
<<: *template_build
image: gitlab-registry.cern.ch/lhcb-docker/os-base/alma9-devel:latest
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:
paths:
- .ccache
expire_in: 1 week
- public
expire_in: 1 day
# see https://gitlab.cern.ch/gitlabci-examples/deploy_eos for the details
# of the configuration
deploy-doxygen:
stage: deploy
dependencies:
- doxygen
only:
- master
- tags
deploy-website:
needs:
- job: "website"
artifacts: true
- job: "doxygen:107:x86_64-el9-gcc14-opt"
artifacts: true
rules:
- if: $CI_COMMIT_BRANCH == "master"
- if: $CI_COMMIT_TAG
image: gitlab-registry.cern.ch/ci-tools/ci-web-deployer:latest
script:
- 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
# It will copy the generated content to the folder in EOS
- export CI_OUTPUT_DIR=public/
- deploy-eos
# do not run any globally defined before_script or after_script for this step
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: v40r0
date-released: '2025-07-03'
cmake_minimum_required(VERSION 3.6)
# Configurable options for building Gaudi in the ATLAS software stack:
option( GAUDI_ATLAS "Enable ATLAS-specific settings" OFF )
set( GAUDI_ATLAS_BASE_PROJECT "AtlasExternals" CACHE STRING
"Name of the ATLAS base project to build Gaudi against" )
# Ensure that we can find GaudiProjectConfig.cmake
# (this works only for projects embedding GaudiProjectConfig.cmake)
if(NOT GaudiProject_DIR AND ("$ENV{GaudiProject_DIR}" STREQUAL ""))
set(GaudiProject_DIR ${CMAKE_SOURCE_DIR}/cmake)
endif()
#---------------------------------------------------------------
# Load macros and functions for Gaudi-based projects
find_package(GaudiProject REQUIRED)
#---------------------------------------------------------------
# Base Gaudi on "the ATLAS base project" (AtlasExternals by default) when
# building for ATLAS:
if( GAUDI_ATLAS )
find_package( ${GAUDI_ATLAS_BASE_PROJECT} )
gaudi_ctest_setup() # Needed for correct CTest usage in this setup
endif()
# Find/set up some needed externals:
include(${CMAKE_SOURCE_DIR}/cmake/externals.cmake)
# Declare project name and version
gaudi_project(Gaudi v30r4)
# These tests do not really fit in a subdirectory.
get_filename_component(PYTHON_EXECUTABLE_DIR "${PYTHON_EXECUTABLE}" DIRECTORY)
gaudi_add_test(cmake.CMakeModules
COMMAND nosetests ${CMAKE_SOURCE_DIR}/cmake/tests
ENVIRONMENT PATH+=${PYTHON_EXECUTABLE_DIR}:/usr/bin:/bin)
gaudi_add_test(cmake.QMTDeps
COMMAND nosetests --with-doctest ${CMAKE_SOURCE_DIR}/cmake/extract_qmtest_metadata.py)
# Configure how CPack should run:
find_file( _cpack_config NAMES GaudiCPackSettings.cmake
PATHS ${CMAKE_MODULE_PATH} )
if( _cpack_config )
include( ${_cpack_config} )
#####################################################################################
# (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
-----
This file is the top level CMakeLists.txt that describes the whole
configuration of the build of Gaudi.
A few commands
^^^^^^^^^^^^^^
* 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.29)
# Optional CUDA
option(GAUDI_USE_CUDA "Build AsynchronousAlgorithm features that require CUDA")
if(GAUDI_USE_CUDA)
set(optionalCUDA CUDA)
else()
set(optionalCUDA)
endif()
project(Gaudi VERSION 40.0
LANGUAGES CXX ${optionalCUDA}
DESCRIPTION "Gaudi Software Framework"
HOMEPAGE_URL "https://cern.ch/gaudi")
# Add the "Developer" build type
include(cmake/DeveloperBuildType.cmake)
# set RPATH (currently only on macOS)
if(APPLE)
include(cmake/GaudiRPath.cmake)
endif()
# Set up the GAUDI_ATOMIC_LIBS variable
include(cmake/GaudiAtomicLibs.cmake)
# Import Gaudi functions (gaudi_*) ==> for documentation look in the file
include(cmake/GaudiToolbox.cmake)
# Export the list of compile commands
set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE BOOL "Enable/Disable output of compile_commands.json" FORCE)
# Find all the dependencies of the project
list(PREPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/modules") # (Find*.cmake)
include(cmake/GaudiDependencies.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()
# CppCheck
option(GAUDI_USE_CPPCHECK "Enable Cppcheck" OFF)
if(GAUDI_USE_CPPCHECK)
find_package(Cppcheck)
if (CPPCHECK_FOUND)
set( CMAKE_CXX_CPPCHECK
${CPPCHECK_EXECUTABLE}
"--enable=warning,portability,performance"
"--quiet" "--inline-suppr" "--template=gcc"
# we are using these libraries
"--library=boost"
"--library=python"
# suppressions
"--suppress=duplInheritedMember" # common occurrance
"--suppress=normalCheckLevelMaxBranches" # do not warn about too complex code
"--suppress=*:*Dict.cxx" # do not check auto-generated code
CACHE STRING "cppcheck command line options" FORCE )
endif()
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(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
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)
# 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)
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/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)
# 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( WARNING "Could not find GaudiCPackSettings.cmake" )
message(FATAL_ERROR "GAUDI_LEGACY_CMAKE_SUPPORT set to TRUE, but cannot find LegacyGaudiCMakeSupport.cmake")
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)
gaudi_depends_on_subdirs(GaudiKernel)
#---Executables-------------------------------------------------------------
gaudi_add_executable(Gaudi src/main.cpp LINK_LIBRARIES GaudiKernel)
#---Installation------------------------------------------------------------
gaudi_install_python_modules()
gaudi_install_scripts()
#---Tests-------------------------------------------------------------------
# FIXME: these variables must be unset in the tests for compatibility with CMT
gaudi_build_env(UNSET GAUDIAPPNAME
UNSET GAUDIAPPVERSION)
gaudi_add_test(QMTest QMTEST
ENVIRONMENT
JOBOPTSEARCHPATH=${CMAKE_CURRENT_SOURCE_DIR}/tests/pyjobopts:${CMAKE_CURRENT_SOURCE_DIR}/tests
PYTHONPATH+=${CMAKE_CURRENT_SOURCE_DIR}/tests/python)
gaudi_add_test(nose
COMMAND nosetests --with-doctest -v
${CMAKE_CURRENT_SOURCE_DIR}/tests/nose
${CMAKE_CURRENT_SOURCE_DIR}/python/Gaudi)
# Settings relating to sanitizer builds
if (SANITIZER_ENABLED)
message(STATUS "Enabled sanitizer ${SANITIZER_ENABLED}")
# Enable automatic LD_PRELOAD
gaudi_env( SET PRELOAD_SANITIZER_LIB ${SANITIZER_ENABLED})
gaudi_build_env(SET PRELOAD_SANITIZER_LIB ${SANITIZER_ENABLED})
# 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} )
#####################################################################################
# (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. #
#####################################################################################
# Gaudi subdirectory
# Build binaries
gaudi_add_executable(Gaudi
SOURCES src/main.cpp
LINK GaudiKernel)
# Add a symlink Gaudi.exe -> Gaudi because some tests expect to use Gaudi.exe
file(CREATE_LINK Gaudi ${CMAKE_CURRENT_BINARY_DIR}/Gaudi.exe SYMBOLIC)
# Generate Gaudi_user.confdb
gaudi_generate_confuserdb(Gaudi.ConfUser)
# Python tests
gaudi_add_pytest(tests/pytest)
# Record project version in a Python module
set(GIT_DESCRIBE_TAG "unknown")
if(EXISTS "${PROJECT_SOURCE_DIR}/.git")
find_package(Git)
if(GIT_FOUND)
execute_process(
COMMAND ${GIT_EXECUTABLE} describe --tags
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
OUTPUT_VARIABLE GIT_DESCRIBE_TAG
OUTPUT_STRIP_TRAILING_WHITESPACE
)
endif()
endif()
# 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} )
# set optional version tweak and patch
if(NOT PROJECT_VERSION_TWEAK)
set(PROJECT_VERSION_TWEAK 0)
endif()
if(NOT PROJECT_VERSION_PATCH)
set(PROJECT_VERSION_PATCH 0)
endif()
# 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} )
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/_version.py.in
${CMAKE_BINARY_DIR}/python/Gaudi/_version.py @ONLY)
# 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} )
# Install python modules
gaudi_install(PYTHON)
install(FILES ${CMAKE_BINARY_DIR}/python/Gaudi/_version.py
DESTINATION "${GAUDI_INSTALL_PYTHONDIR}/Gaudi")
endif()
# Install other scripts
gaudi_install(SCRIPTS)
__version__ = "@PROJECT_VERSION@"
version_info = (@PROJECT_VERSION_MAJOR@, @PROJECT_VERSION_MINOR@, @PROJECT_VERSION_PATCH@, @PROJECT_VERSION_TWEAK@)
git_describe_tag = "@GIT_DESCRIBE_TAG@"
......@@ -4,6 +4,95 @@
# http://clang.llvm.org/docs/LeakSanitizer.html
# --------------------------------------------------
# Gaudi leaks -- Should really be looked into, but proving difficult to
# isolate and these errors cause a lot of noise downstream so mask
# until properly fixed.
#Indirect leak of 1528 byte(s) in 1 object(s) allocated from:
# #0 0x7f700694bda8 in operator new(unsigned long) /afs/cern.ch/cms/CAF/CMSCOMM/COMM_ECAL/dkonst/GCC/build/contrib/gcc-8.2.0/src/gcc/8.2.0/libsanitizer/lsan/lsan_interceptors.cc:229
# #1 0x7f6fd24faa20 in std::_MakeUniq<LHCb::RawDataCnvSvc>::__single_object std::make_unique<LHCb::RawDataCnvSvc, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, ISvcLocator*>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&&, ISvcLocator*&&) /cvmfs/lhcb.cern.ch/lib/lcg/releases/gcc/8.2.0-3fa06/x86_64-centos7/include/c++/8.2.0/bits/unique_ptr.h:831
# #2 0x7f6fd24faa20 in Gaudi::PluginService::v2::Details::DefaultFactory<LHCb::RawDataCnvSvc, Gaudi::PluginService::v2::Factory<IService* (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, ISvcLocator*)> >::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, ISvcLocator*) /usera/jonesc/LHCbCMake/Feature/Gaudi/InstallArea/x86_64-centos7-gcc8-dbg+lsan/include/Gaudi/Details/PluginServiceDetailsV2.h:204
# #3 0x7f6fd24faa20 in std::_Function_handler<std::unique_ptr<IService, std::default_delete<IService> > (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, ISvcLocator*), Gaudi::PluginService::v2::Details::DefaultFactory<LHCb::RawDataCnvSvc, Gaudi::PluginService::v2::Factory<IService* (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, ISvcLocator*)> > >::_M_invoke(std::_Any_data const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, ISvcLocator*&&) /cvmfs/lhcb.cern.ch/lib/lcg/releases/gcc/8.2.0-3fa06/x86_64-centos7/include/c++/8.2.0/bits/std_function.h:283
# #4 0x7f6fe86121e1 in std::function<std::unique_ptr<IService, std::default_delete<IService> > (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, ISvcLocator*)>::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, ISvcLocator*) const /cvmfs/lhcb.cern.ch/lib/lcg/releases/gcc/8.2.0-3fa06/x86_64-centos7/include/c++/8.2.0/bits/std_function.h:687
# #5 0x7f6fe788282b in std::unique_ptr<IService, std::default_delete<IService> > Gaudi::PluginService::v2::Factory<IService* (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, ISvcLocator*)>::create<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(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&, ISvcLocator*) ../GaudiPluginService/Gaudi/PluginServiceV2.h:47
# #6 0x7f6fe788282b in ServiceManager::createService(Gaudi::Utils::TypeNameString const&) ../GaudiCoreSvc/src/ApplicationMgr/ServiceManager.cpp:81
# #7 0x7f6fe7880ed3 in ServiceManager::addService(Gaudi::Utils::TypeNameString const&, int) ../GaudiCoreSvc/src/ApplicationMgr/ServiceManager.cpp:123
# #8 0x7f6fe7882306 in ServiceManager::service(Gaudi::Utils::TypeNameString const&, bool) ../GaudiCoreSvc/src/ApplicationMgr/ServiceManager.cpp:197
leak:Gaudi::PluginService::v2::Details::DefaultFactory*
# Direct leak of 48 byte(s) in 1 object(s) allocated from:
# #0 0x7fe26d832da8 in operator new(unsigned long) /afs/cern.ch/cms/CAF/CMSCOMM/COMM_ECAL/dkonst/GCC/build/contrib/gcc-8.2.0/src/gcc/8.2.0/libsanitizer/lsan/lsan_interceptors.cc:229
# #1 0x41082b in Gaudi::PluginService::v1::Factory<Base2*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int>::ReturnType Gaudi::PluginService::v1::Details::Factory<Component2>::create<Gaudi::PluginService::v1::Factory<Base2*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int&&) ../GaudiPluginService/Gaudi/Details/PluginServiceDetailsV1.h:40
# #2 0x40505a in Gaudi::PluginService::v1::Factory<Base2*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int>::create(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&, int) ../GaudiPluginService/Gaudi/PluginServiceV1.h:62
# #3 0x40505a in Base2* Gaudi::PluginService::v1::Factory<Base2*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int>::create<char [11]>(char const (&) [11], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int) ../GaudiPluginService/Gaudi/PluginServiceV1.h:69
leak:Gaudi::PluginService::v1::Factory*
# Suppress a number of leaks from ntuple booking... not clear if these are ROOT or Gaudi issues...
# Indirect leak of 160 byte(s) in 2 object(s) allocated from:
# #0 0x7ff846fbbec8 in operator new[](unsigned long) /afs/cern.ch/cms/CAF/CMSCOMM/COMM_ECAL/dkonst/GCC/build/contrib/gcc-8.2.0/src/gcc/8.2.0/libsanitizer/lsan/lsan_interceptors.cc:231
# #1 0x7ff8336e7653 in TBranch::Init(char const*, char const*, int) /mnt/build/jenkins/workspace/lcg_release_tar/BUILDTYPE/Debug/COMPILER/gcc8binutils/LABEL/centos7/build/projects/ROOT-6.18.00/src/ROOT/6.18.00/tree/tree/src/TBranch.cxx:309
# #2 0x7ff8336e7039 in TBranch::TBranch(TTree*, char const*, void*, char const*, int, int) /mnt/build/jenkins/workspace/lcg_release_tar/BUILDTYPE/Debug/COMPILER/gcc8binutils/LABEL/centos7/build/projects/ROOT-6.18.00/src/ROOT/6.18.00/tree/tree/src/TBranch.cxx:239
# #3 0x7ff833773ceb in TTree::Branch(char const*, void*, char const*, int) /mnt/build/jenkins/workspace/lcg_release_tar/BUILDTYPE/Debug/COMPILER/gcc8binutils/LABEL/centos7/build/projects/ROOT-6.18.00/src/ROOT/6.18.00/tree/tree/src/TTree.cxx:1893
# #4 0x7ff831763748 in RootHistCnv::RRWNTupleCnv::book(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, INTuple*, TTree*&) ../RootHistCnv/src/RRWNTupleCnv.cpp:27
leak:RootHistCnv::RRWNTupleCnv::book
# Appears to be an issue with the mutex ownsership with LockedHandle
# Direct leak of 40 byte(s) in 1 object(s) allocated from:
# #0 0x7f09944fcda8 in operator new(unsigned long) /afs/cern.ch/cms/CAF/CMSCOMM/COMM_ECAL/dkonst/GCC/build/contrib/gcc-8.2.0/src/gcc/8.2.0/libsanitizer/lsan/lsan_interceptors.cc:229
# #1 0x7f0987aa2e6d in StatusCode THistSvc::regHist_i<TH1>(std::unique_ptr<TH1, std::default_delete<TH1> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, THistSvc::THistID*&) ../GaudiSvc/src/THistSvc/THistSvc.icc:139
# #2 0x7f0987aa3375 in LockedHandle<TH1, std::mutex> THistSvc::regShared_i<TH1>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::unique_ptr<TH1, std::default_delete<TH1> >) ../GaudiSvc/src/THistSvc/THistSvc.icc:264
# #3 0x7f0987a8f8ef in THistSvc::regShared(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::unique_ptr<TH1, std::default_delete<TH1> >, LockedHandle<TH1, std::mutex>&) ../GaudiSvc/src/THistSvc/THistSvc.cpp:430
leak:THistSvc::regHist_i
# THistWrite GaudiTestSuite test generates a lot of leaks during histogram creation :((
# Indirect leak of 816 byte(s) in 1 object(s) allocated from:
# #0 0x7f817fd0aec8 in operator new[](unsigned long) /afs/cern.ch/cms/CAF/CMSCOMM/COMM_ECAL/dkonst/GCC/build/contrib/gcc-8.2.0/src/gcc/8.2.0/libsanitizer/lsan/lsan_interceptors.cc:231
# #1 0x7f817bedf4b6 in TArrayD::Set(int) /mnt/build/jenkins/workspace/lcg_release_tar/BUILDTYPE/Debug/COMPILER/gcc8binutils/LABEL/centos7/build/projects/ROOT-6.18.00/src/ROOT/6.18.00/core/cont/src/TArrayD.cxx:112
# #2 0x7f81796c52bf in TH1D::TH1D(char const*, char const*, int, double, double) /mnt/build/jenkins/workspace/lcg_release_tar/BUILDTYPE/Debug/COMPILER/gcc8binutils/LABEL/centos7/build/projects/ROOT-6.18.00/src/ROOT/6.18.00/hist/hist/src/TH1.cxx:9627
# #3 0x7f817782ab5d in THistWrite::initialize() ../GaudiTestSuite/src/THist/THistWrite.cpp:94
leak:THistWrite::initialize
# Note sure where in this lot the leak is ...
#Indirect leak of 160 byte(s) in 1 object(s) allocated from:
# #0 0x7fde515afec8 in operator new[](unsigned long) /afs/cern.ch/cms/CAF/CMSCOMM/COMM_ECAL/dkonst/GCC/build/contrib/gcc-8.2.0/src/gcc/8.2.0/libsanitizer/lsan/lsan_interceptors.cc:231
# #1 0x7fde41c7610f in TString::Clobber(int) /mnt/build/jenkins/workspace/lcg_release_tar/BUILDTYPE/Debug/COMPILER/gcc8binutils/LABEL/centos7/build/projects/ROOT-6.18.00/src/ROOT/6.18.00/core/base/src/TString.cxx:1198
# #2 0x7fde3f8b675b in TBufferFile::ReadTString(TString&) /mnt/build/jenkins/workspace/lcg_release_tar/BUILDTYPE/Debug/COMPILER/gcc8binutils/LABEL/centos7/build/projects/ROOT-6.18.00/src/ROOT/6.18.00/io/io/src/TBufferFile.cxx:200
# #3 0x7fde41c76609 in TString::Streamer(TBuffer&) /mnt/build/jenkins/workspace/lcg_release_tar/BUILDTYPE/Debug/COMPILER/gcc8binutils/LABEL/centos7/build/projects/ROOT-6.18.00/src/ROOT/6.18.00/core/base/src/TString.cxx:1348
# #4 0x7fde3f9b15d8 in TStreamerInfoActions::ReadTString(TBuffer&, void*, TStreamerInfoActions::TConfiguration const*) /mnt/build/jenkins/workspace/lcg_release_tar/BUILDTYPE/Debug/COMPILER/gcc8binutils/LABEL/centos7/build/projects/ROOT-6.18.00/src/ROOT/6.18.00/io/io/src/TStreamerInfoActions.cxx:924
# #5 0x7fde3f8c1204 in TStreamerInfoActions::TConfiguredAction::operator()(TBuffer&, void*) const /mnt/build/jenkins/workspace/lcg_release_tar/BUILDTYPE/Debug/COMPILER/gcc8binutils/LABEL/centos7/build/projects/ROOT-6.18.00/src/ROOT-6.18.00-build/include/TStreamerInfoActions.h:124
# #6 0x7fde3f8bf0e0 in TBufferFile::ApplySequence(TStreamerInfoActions::TActionSequence const&, void*) /mnt/build/jenkins/workspace/lcg_release_tar/BUILDTYPE/Debug/COMPILER/gcc8binutils/LABEL/centos7/build/projects/ROOT-6.18.00/src/ROOT/6.18.00/io/io/src/TBufferFile.cxx:3564
# #7 0x7fde3f8beb59 in TBufferFile::ReadClassBuffer(TClass const*, void*, TClass const*) /mnt/build/jenkins/workspace/lcg_release_tar/BUILDTYPE/Debug/COMPILER/gcc8binutils/LABEL/centos7/build/projects/ROOT-6.18.00/src/ROOT/6.18.00/io/io/src/TBufferFile.cxx:3485
# #8 0x7fde41bbc5aa in TObjString::Streamer(TBuffer&) /mnt/build/jenkins/workspace/lcg_release_tar/BUILDTYPE/Debug/COMPILER/gcc8binutils/LABEL/centos7/build/projects/ROOT-6.18.00/src/ROOT-6.18.00-build/core/G__Core.cxx:21610
# #9 0x7fde41d294c7 in TClass::StreamerTObjectInitialized(TClass const*, void*, TBuffer&, TClass const*) /mnt/build/jenkins/workspace/lcg_release_tar/BUILDTYPE/Debug/COMPILER/gcc8binutils/LABEL/centos7/build/projects/ROOT-6.18.00/src/ROOT/6.18.00/core/meta/src/TClass.cxx:6537
# #10 0x7fde3f8bf920 in TClass::Streamer(void*, TBuffer&, TClass const*) const /mnt/build/jenkins/workspace/lcg_release_tar/BUILDTYPE/Debug/COMPILER/gcc8binutils/LABEL/centos7/build/projects/ROOT-6.18.00/src/ROOT-6.18.00-build/include/TClass.h:570
# #11 0x7fde3f8bbdb3 in TBufferFile::ReadObjectAny(TClass const*) /mnt/build/jenkins/workspace/lcg_release_tar/BUILDTYPE/Debug/COMPILER/gcc8binutils/LABEL/centos7/build/projects/ROOT-6.18.00/src/ROOT/6.18.00/io/io/src/TBufferFile.cxx:2471
# #12 0x7fde41c3e813 in TBuffer& operator>><TObject>(TBuffer&, TObject*&) /mnt/build/jenkins/workspace/lcg_release_tar/BUILDTYPE/Debug/COMPILER/gcc8binutils/LABEL/centos7/build/projects/ROOT-6.18.00/src/ROOT-6.18.00-build/include/TBuffer.h:394
# #13 0x7fde41cdaaea in TList::Streamer(TBuffer&) /mnt/build/jenkins/workspace/lcg_release_tar/BUILDTYPE/Debug/COMPILER/gcc8binutils/LABEL/centos7/build/projects/ROOT-6.18.00/src/ROOT/6.18.00/core/cont/src/TList.cxx:1209
# #14 0x7fde41d294c7 in TClass::StreamerTObjectInitialized(TClass const*, void*, TBuffer&, TClass const*) /mnt/build/jenkins/workspace/lcg_release_tar/BUILDTYPE/Debug/COMPILER/gcc8binutils/LABEL/centos7/build/projects/ROOT-6.18.00/src/ROOT/6.18.00/core/meta/src/TClass.cxx:6537
# #15 0x7fde3f8bf920 in TClass::Streamer(void*, TBuffer&, TClass const*) const /mnt/build/jenkins/workspace/lcg_release_tar/BUILDTYPE/Debug/COMPILER/gcc8binutils/LABEL/centos7/build/projects/ROOT-6.18.00/src/ROOT-6.18.00-build/include/TClass.h:570
# #16 0x7fde3f8bbdb3 in TBufferFile::ReadObjectAny(TClass const*) /mnt/build/jenkins/workspace/lcg_release_tar/BUILDTYPE/Debug/COMPILER/gcc8binutils/LABEL/centos7/build/projects/ROOT-6.18.00/src/ROOT/6.18.00/io/io/src/TBufferFile.cxx:2471
# #17 0x7fde41c3e813 in TBuffer& operator>><TObject>(TBuffer&, TObject*&) /mnt/build/jenkins/workspace/lcg_release_tar/BUILDTYPE/Debug/COMPILER/gcc8binutils/LABEL/centos7/build/projects/ROOT-6.18.00/src/ROOT-6.18.00-build/include/TBuffer.h:394
# #18 0x7fde41cdaaea in TList::Streamer(TBuffer&) /mnt/build/jenkins/workspace/lcg_release_tar/BUILDTYPE/Debug/COMPILER/gcc8binutils/LABEL/centos7/build/projects/ROOT-6.18.00/src/ROOT/6.18.00/core/cont/src/TList.cxx:1209
# #19 0x7fde3f965a72 in TKey::ReadObjWithBuffer(char*) /mnt/build/jenkins/workspace/lcg_release_tar/BUILDTYPE/Debug/COMPILER/gcc8binutils/LABEL/centos7/build/projects/ROOT-6.18.00/src/ROOT/6.18.00/io/io/src/TKey.cxx:936
# #20 0x7fde3f92ba2e in TFile::GetStreamerInfoListImpl(bool) /mnt/build/jenkins/workspace/lcg_release_tar/BUILDTYPE/Debug/COMPILER/gcc8binutils/LABEL/centos7/build/projects/ROOT-6.18.00/src/ROOT/6.18.00/io/io/src/TFile.cxx:1355
# #21 0x7fde3f92bc79 in TFile::GetStreamerInfoList() /mnt/build/jenkins/workspace/lcg_release_tar/BUILDTYPE/Debug/COMPILER/gcc8binutils/LABEL/centos7/build/projects/ROOT-6.18.00/src/ROOT/6.18.00/io/io/src/TFile.cxx:1392
# #22 0x7fde3f92b64a in TFile::GetStreamerInfoCache() /mnt/build/jenkins/workspace/lcg_release_tar/BUILDTYPE/Debug/COMPILER/gcc8binutils/LABEL/centos7/build/projects/ROOT-6.18.00/src/ROOT/6.18.00/io/io/src/TFile.cxx:1315
# #23 0x7fde3f3f4a78 in TBranchElement::FindOnfileInfo(TClass*, TObjArray const&) const /mnt/build/jenkins/workspace/lcg_release_tar/BUILDTYPE/Debug/COMPILER/gcc8binutils/LABEL/centos7/build/projects/ROOT-6.18.00/src/ROOT/6.18.00/tree/tree/src/TBranchElement.cxx:1929
# #24 0x7fde3f3f6b7d in TBranchElement::InitInfo() /mnt/build/jenkins/workspace/lcg_release_tar/BUILDTYPE/Debug/COMPILER/gcc8binutils/LABEL/centos7/build/projects/ROOT-6.18.00/src/ROOT/6.18.00/tree/tree/src/TBranchElement.cxx:2354
# #25 0x7fde3f4073ed in TBranchElement::GetInfoImp() const /mnt/build/jenkins/workspace/lcg_release_tar/BUILDTYPE/Debug/COMPILER/gcc8binutils/LABEL/centos7/build/projects/ROOT-6.18.00/src/ROOT/6.18.00/tree/tree/src/TBranchElement.cxx:1002
# #26 0x7fde3f3f9113 in TBranchElement::InitializeOffsets() /mnt/build/jenkins/workspace/lcg_release_tar/BUILDTYPE/Debug/COMPILER/gcc8binutils/LABEL/centos7/build/projects/ROOT-6.18.00/src/ROOT/6.18.00/tree/tree/src/TBranchElement.cxx:3123
# #27 0x7fde3f401e15 in TBranchElement::SetAddress(void*) /mnt/build/jenkins/workspace/lcg_release_tar/BUILDTYPE/Debug/COMPILER/gcc8binutils/LABEL/centos7/build/projects/ROOT-6.18.00/src/ROOT/6.18.00/tree/tree/src/TBranchElement.cxx:5323
# #28 0x7fde3f401edf in TBranchElement::SetAddress(void*) /mnt/build/jenkins/workspace/lcg_release_tar/BUILDTYPE/Debug/COMPILER/gcc8binutils/LABEL/centos7/build/projects/ROOT-6.18.00/src/ROOT/6.18.00/tree/tree/src/TBranchElement.cxx:5334
# #29 0x7fde3ae1fc5a in Gaudi::RootDataConnection::loadObj(std::basic_string_view<char, std::char_traits<char> >, std::basic_string_view<char, std::char_traits<char> >, unsigned long, DataObject*&) ../RootCnv/src/RootDataConnection.cpp:507
leak:Gaudi::RootDataConnection::loadObj
#Direct leak of 176 byte(s) in 1 object(s) allocated from:
# #0 0x7f56e2dc2da8 in operator new(unsigned long) /afs/cern.ch/cms/CAF/CMSCOMM/COMM_ECAL/dkonst/GCC/build/contrib/gcc-8.2.0/src/gcc/8.2.0/libsanitizer/lsan/lsan_interceptors.cc:229
# #1 0x7f56cb992ae4 in Gaudi::RootCnvSvc::createAddress(long, unsigned int const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const*, unsigned long const*, IOpaqueAddress*&) ../RootCnv/src/RootCnvSvc.cpp:349
# #2 0x7f56cb993530 in Gaudi::RootCnvSvc::connectDatabase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, Gaudi::RootDataConnection**) ../RootCnv/src/RootCnvSvc.cpp:242
# #3 0x7f56cb9b5230 in Gaudi::RootEvtSelector::next(IEvtSelector::Context&) const ../RootCnv/src/RootEvtSelector.cpp:168
leak:Gaudi::RootCnvSvc::connectDatabase
# PyROOT
leak:PyROOT::MethodProxy_New
leak:PyROOT::CreateConverter
......@@ -24,9 +113,22 @@ leak:^mp_new$
leak:^pp_new$
leak:^mp_setthreaded$
leak:TFormula::HandleParamRanges
leak:TDirectoryFile::GetDirectory
leak:TBuffer::TBuffer
leak:TObject::operator
leak:TStorage::Alloc
#leak:TBranch::Init
leak:TGenCollectionProxy::Allocate
leak:TStreamerInfoActions::TActionSequence::CreateReadMemberWiseActions
leak:TClass::New
leak:TTree::CreateBasket
leak:TNetXNGFile::TNetXNGFile
leak:cling::Interpreter::ShutDown
leak:TStreamerInfo::ReadBuffer<TVirtualCollectionProxy>
# XrootD
leak:XrdSys
#leak:XrdSys
leak:Xrd*
# Xerces
leak:xercesc_3_1::MemoryManagerImpl::allocate
......@@ -62,3 +164,13 @@ leak:std::vector<unsigned int, std::allocator<unsigned int> >::_M_fill_insert
# Suppresses *everything* that comes via the runtime interceptor.
leak:_interceptor_
#Direct leak of 48 byte(s) in 2 object(s) allocated from:
# #0 0x7f9fde9b458f in operator new(unsigned long, std::nothrow_t const&) /build/gcc/build/contrib/gcc-9.2.0/src/gcc/9.2.0/libsanitizer/lsan/lsan_interceptors.cc:227
# #1 0x7f9fdd3675bd in __cxa_thread_atexit /build/gcc/build/contrib/gcc-9.2.0/src/gcc/9.2.0/libstdc++-v3/libsupc++/atexit_thread.cc:146
leak:__cxa_thread_atexit
#Indirect leak of 2560 byte(s) in 10 object(s) allocated from:
# #0 0x7f7edaccf333 in operator new(unsigned long) /build/gcc/build/contrib/gcc-9.2.0/src/gcc/9.2.0/libsanitizer/lsan/lsan_interceptors.cc:222
# #1 0x7f7ecb4679ad in std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >::operator=(std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&) (/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_96b/ROOT/6.18.04/x86_64-centos7-gcc9-dbg/lib/libCling.so+0xacb9ad)
leak:std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >::operator=(std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&)
# --------------------------------------------------
# -----------------------------------------------------------
# Undefined Behaviour sanitizer suppressions
# 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/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
# /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
# #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)
# #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
# 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
vptr:bits/shared_ptr_base.h
# 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'
......@@ -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: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 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
# Author: Pere Mato (pere.mato@cern.ch)
"""
This module would scan all known Gaudi configurable modules for
'Configurable' classes and fill __all__ such that it can be imported
......@@ -9,18 +18,27 @@
from GaudiKernel.Configurable import Configurable
from GaudiKernel.ConfigurableMeta import ConfigurableMeta
__all__ = []
packages = ['GaudiCoreSvc', 'GaudiCommonSvc', 'GaudiSvc', 'GaudiAlg',
'GaudiAud', 'GaudiPoolDb', 'RootHistCnv', 'GaudiUtils',
'RootCnv']
packages = [
"GaudiCoreSvc",
"GaudiCommonSvc",
"GaudiSvc",
"GaudiAud",
"GaudiPoolDb",
"RootHistCnv",
"GaudiUtils",
"RootCnv",
]
# --Loop open all listed packages and populate __all__ with the names and
# the local scope with the Configurable classes
for package in packages:
try:
mod = __import__('%s.%sConf' % (package, package),
globals(), locals(), ['%sConf' % package])
mod = __import__(
"%s.%sConf" % (package, package), globals(), locals(), ["%sConf" % package]
)
for nam in dir(mod):
cls = getattr(mod, nam)
if type(cls) is ConfigurableMeta and issubclass(cls, Configurable):
......@@ -32,29 +50,26 @@ for package in packages:
# --Fix some of the name idiosyncrasies in Gaudi
aliases = {
'EventDataSvc': 'EvtDataSvc',
'DetectorDataSvc': 'DetDataSvc',
'HistogramDataSvc': 'HistogramSvc',
'HbookHistSvc': 'HbookCnv__PersSvc',
'RootHistSvc': 'RootHistCnv__PersSvc',
'EventPersistencySvc': 'EvtPersistencySvc',
'DetectorPersistencySvc': 'DetPersistencySvc',
'HistogramPersistencySvc': 'HistogramPersistencySvc',
'FileRecordPersistencySvc': 'PersistencySvc',
'FileCatalog': 'Gaudi__MultiFileCatalog',
'IODataManager': 'Gaudi__IODataManager',
'RootCnvSvc': 'Gaudi__RootCnvSvc',
'RootEvtSelector': 'Gaudi__RootEvtSelector',
"EventDataSvc": "EvtDataSvc",
"DetectorDataSvc": "DetDataSvc",
"HistogramDataSvc": "HistogramSvc",
"HbookHistSvc": "HbookCnv__PersSvc",
"RootHistSvc": "RootHistCnv__PersSvc",
"EventPersistencySvc": "EvtPersistencySvc",
"DetectorPersistencySvc": "DetPersistencySvc",
"HistogramPersistencySvc": "HistogramPersistencySvc",
"FileRecordPersistencySvc": "PersistencySvc",
"FileCatalog": "Gaudi__MultiFileCatalog",
"IODataManager": "Gaudi__IODataManager",
"RootCnvSvc": "Gaudi__RootCnvSvc",
"RootEvtSelector": "Gaudi__RootEvtSelector",
}
_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
aliases = dict([(new, _gbl[old])
for new, old in aliases.items()
if old in _gbl]) # do the aliasing only if the original is available
# do the aliasing only if the original is available
aliases = {new: _gbl[old] for new, old in aliases.items() if old in _gbl}
# change the default name
for new in aliases:
aliases[new].DefaultedName = new
......@@ -62,4 +77,8 @@ for new in aliases:
_gbl.update(aliases)
__all__.extend(aliases)
# 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
# Author: Pere Mato (pere.mato@cern.ch)
from GaudiKernel.Constants import *
from GaudiKernel.Configurable import *
from GaudiKernel.ConfigurableDb import loadConfigurableDb, cfgDb
import logging
# 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 CommonGaudiConfigurables import *
from GaudiKernel.ProcessJobOptions import importOptions, importUnits
from GaudiKernel.ProcessJobOptions import InstallRootLoggingHandler as _InstallRootLoggingHandler
from GaudiKernel.Constants import * # noqa: F401 F403
from GaudiKernel.ProcessJobOptions import (
InstallRootLoggingHandler as _InstallRootLoggingHandler,
)
from GaudiKernel.ProcessJobOptions import importOptions, importUnits # noqa: F401
import logging
log = logging.getLogger(__name__)
# Ensure that a root logging handler is always present.
_InstallRootLoggingHandler()
......@@ -19,25 +34,33 @@ allConfigurables = Configurable.allConfigurables
def _fillConfDict():
nFiles = loadConfigurableDb()
log = logging.getLogger('PropertyProxy')
log.debug("Read module info for %d configurables from %d genConfDb files",
len(cfgDb), nFiles)
log = logging.getLogger("PropertyProxy")
log.debug(
"Read module info for %d configurables from %d genConfDb files",
len(cfgDb),
nFiles,
)
if len(cfgDb.duplicates()) > 0:
log.warning("Found %d duplicates among the %d genConfDb files :",
len(cfgDb.duplicates()), nFiles)
log.warning(
"Found %d duplicates among the %d genConfDb files :",
len(cfgDb.duplicates()),
nFiles,
)
log.warning("--------------------------------------------------")
log.warning(" -%s: %s - %s",
"<component name>", "<module>", "[ <duplicates> ]")
log.warning(
" -%s: %s - %s", "<component name>", "<module>", "[ <duplicates> ]"
)
log.warning("--------------------------------------------------")
dups = cfgDb.duplicates()
for cfgName in dups.keys():
log.warning(" -%s: %s - %s",
log.warning(
" -%s: %s - %s",
cfgName,
cfgDb[cfgName]['module'],
str([d['module'] for d in dups[cfgName]]))
cfgDb[cfgName]["module"],
str([d["module"] for d in dups[cfgName]]),
)
pass
del dups
log.warning("Fix your cmt/requirements file !!")
pass
else:
log.debug("No duplicates have been found: that's good !")
......@@ -48,9 +71,6 @@ def _fillConfDict():
# fill the configurable dictionary at module load
_fillConfDict()
import os
import sys
def importConfiguration(conf, local=locals()):
local[conf] = confDbGetConfigurable(conf)
......@@ -82,10 +102,11 @@ def configurationDict(all=False):
conf_dict[n][p] = v
# purge empty configurables
keys = conf_dict.keys()
ret_dict = {}
for n in keys:
if not conf_dict[n]:
del conf_dict[n]
return conf_dict
if conf_dict[n]:
ret_dict[n] = conf_dict[n]
return ret_dict
def getConfigurable(name, defaultType=None):
......@@ -100,7 +121,7 @@ def getConfigurable(name, defaultType=None):
if defaultType is None:
# try to use the name of the configurable as default type
defaultType = name
if type(defaultType) is str:
if isinstance(defaultType, str):
# we need to convert from string to actual class
if defaultType in globals():
# We the type is defined in the global namespace
......@@ -108,47 +129,6 @@ def getConfigurable(name, defaultType=None):
else:
# otherwise we try to get it from the Configurables database
import Configurables
defaultType = getattr(Configurables, defaultType)
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.