Skip to content

TPC VDrift: make VDriftHelper usable outside DPL (e.g. O2Physics) - #15749

Open
matthias-kleiner wants to merge 1 commit into
AliceO2Group:devfrom
matthias-kleiner:vdccdb
Open

TPC VDrift: make VDriftHelper usable outside DPL (e.g. O2Physics)#15749
matthias-kleiner wants to merge 1 commit into
AliceO2Group:devfrom
matthias-kleiner:vdccdb

Conversation

@matthias-kleiner

Copy link
Copy Markdown
Contributor

Split VDriftHelper::extractCCDBInputs into the CCDB-fetching part and a framework-independent updateVDrift() and add BasicCCDBManager-based overloads to VDriftHelper/PressureTemperatureHelper so O2Physics can call these directly instead of reimplementing the T/P-scaling logic (see AliceO2Group/O2Physics#17656). Calling these every event is cheap: laser/TGL/pressure/temperature are only re-accounted when the underlying CCDB object actually changed and logging is throttled to avoid stdout spam in trains.

Split VDriftHelper::extractCCDBInputs into the CCDB-fetching part and a
framework-independent updateVDrift() and add BasicCCDBManager-based
overloads to VDriftHelper/PressureTemperatureHelper so O2Physics can
call these directly instead of reimplementing the T/P-scaling logic
(see AliceO2Group/O2Physics#17656). Calling these every event is cheap:
laser/TGL/pressure/temperature are only re-accounted when the
underlying CCDB object actually changed and logging is throttled to
avoid stdout spam in trains.

@shahor02 shahor02 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @matthias-kleiner !

@f3sch with this you just need to create a VDriftHelper instance and simply do

mVDHelper.extractCCDBInputs(*mCCDB, timestamp);
return mVDHelper.getVDriftObject().getVDrift();

either directly from the analysis task of from your TPCVDriftManager.

bool extractTPForVDrift(VDriftCorrFact& vdrift, int64_t tsStepMS = 100 * 1000);

/// Combine the previously accounted laser/ITS-TPC-Tgl inputs, applying T/P scaling if possible, into mVD.
void updateVDrift(long currentTimeMS);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The timestamps in O2Physics that we get from the table are unsigned long (uint64_t). Might be good to change this so there isn't a problem where some values go to overflow of signed longs and switch sign.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The type used by the CCDB API is anyway long (signed), there is no point in correcting intermediate types.
But we will not have an overflow till February 2106.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh okay, then it's a bit weird, that the timestamp table return unsigned long, but okay.

@alibuild

alibuild commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Error while checking build/O2/fullCI_slc9 for 489d19f at 2026-09-02 14:29:

## sw/BUILD/O2Physics-latest/log
c++: fatal error: Killed signal terminated program cc1plus
ninja: build stopped: subcommand failed.


## sw/BUILD/o2checkcode-latest/log
--
========== List of errors found ==========
++ GRERR=0
++ grep -v clang-diagnostic-error error-log.txt
++ grep ' error:'
grep: error-log.txt: binary file matches
++ GRERR=1
++ [[ 1 == 0 ]]
++ mkdir -p /sw/INSTALLROOT/3c43d855ae27ce0a69b509b6822803a71f271c72/slc9_x86-64/o2checkcode/1.0-local94/etc/modulefiles
++ alibuild-generate-module
+ HAS_BIN=
+ HAS_LIB=
+ HAS_CMAKE=
+ HAS_ROOT=
+ '[' 0 '!=' 0 ']'
+ cat
+ printf 'if ![ is-loaded '\''BASE/1.0'\'' ] {\n module load BASE/1.0\n}'
+ echo 'BUILD_REQUIRES=CMake alibuild-recipe-tools defaults-release'
BUILD_REQUIRES=CMake alibuild-recipe-tools defaults-release
+ FULL_BUILD_REQUIRES='defaults-release bz2 pytorch_cpuinfo Python-modules-list UUID safe_int Alice-GRID-Utils json-c date MPFR CMake O2-customization googlebenchmark FairCMakeModules double-conversion alibuild-recipe-tools ninja-fortran ninja'
+ echo 'FULL_BUILD_REQUIRES=defaults-release bz2 pytorch_cpuinfo Python-modules-list UUID safe_int Alice-GRID-Utils json-c date MPFR CMake O2-customization googlebenchmark FairCMakeModules double-conversion alibuild-recipe-tools ninja-fortran ninja'
FULL_BUILD_REQUIRES=defaults-release bz2 pytorch_cpuinfo Python-modules-list UUID safe_int Alice-GRID-Utils json-c date MPFR CMake O2-customization googlebenchmark FairCMakeModules double-conversion alibuild-recipe-tools ninja-fortran ninja
++ env
++ cut -f1 -d=
++ grep -v '^DEFAULT_'
++ grep -v PKGREVISION
++ grep -v ALIBUILD_RECIPE_TOOLS
++ grep REVISION
++ sed -e s/_REVISION//
+ for x in $(env | cut -f1 -d= | grep -v "^DEFAULT_" | grep -v PKGREVISION | grep -v ALIBUILD_RECIPE_TOOLS | grep REVISION | sed -e 's/_REVISION//')
++ eval 'echo $LIBFFI_REVISION'
+++ echo 14
+ REVISION_VALUE=14
++ eval 'echo $LIBFFI_VERSION'
+++ echo v3.2.1-alice1
+ VERSION_VALUE=v3.2.1-alice1
++ eval 'echo $LIBFFI_ROOT'
+++ echo /sw/slc9_x86-64/libffi/v3.2.1-alice1-14
+ ROOT_PATH_VALUE=/sw/slc9_x86-64/libffi/v3.2.1-alice1-14
+ '[' -z 14 ']'
+ echo 'defaults-release bz2 pytorch_cpuinfo Python-modules-list UUID safe_int Alice-GRID-Utils json-c date MPFR CMake O2-customization googlebenchmark FairCMakeModules double-conversion alibuild-recipe-tools ninja-fortran ninja'
+ tr '[:lower:]' '[:upper:]'
+ tr - _
[0 more errors; see full log]

Full log here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants