Skip to content

Commit d30c00b

Browse files
committed
Merge branch 'dev' at epn-20251017 into stable-sync
2 parents 3230d97 + 171586d commit d30c00b

File tree

770 files changed

+25925
-12877
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

770 files changed

+25925
-12877
lines changed

.github/workflows/code-transformations.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@v5
1515
with:
1616
ref: ${{ github.event.pull_request.head.sha }}
1717
persist-credentials: false

.github/workflows/datamodel-doc.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,20 @@ jobs:
1010
steps:
1111

1212
- name: Checkout O2
13-
uses: actions/checkout@v3
13+
uses: actions/checkout@v5
1414
with:
1515
path: O2
1616
persist-credentials: false
1717

1818
- name: Checkout O2Physics
19-
uses: actions/checkout@v3
19+
uses: actions/checkout@v5
2020
with:
2121
repository: AliceO2Group/O2Physics
2222
path: O2Physics
2323
persist-credentials: false
2424

2525
- name: Checkout documentation
26-
uses: actions/checkout@v3
26+
uses: actions/checkout@v5
2727
with:
2828
repository: AliceO2Group/analysis-framework
2929
path: analysis-framework
@@ -40,7 +40,7 @@ jobs:
4040
git checkout -B auto-datamodel-doc
4141
4242
- name: Set up Python
43-
uses: actions/setup-python@v2
43+
uses: actions/setup-python@v6
4444
with:
4545
python-version: 3.x
4646

.github/workflows/doxygen.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
run: |
1414
sudo apt-get update -y
1515
sudo apt-get install -y doxygen doxygen-doc doxygen-latex doxygen-gui graphviz cmake
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v5
1717
with:
1818
ref: "dev"
1919
persist-credentials: false

.github/workflows/first-timer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
nag_first_timer:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/first-interaction@v1
11+
- uses: actions/first-interaction@v3
1212
with:
1313
repo-token: ${{ secrets.GITHUB_TOKEN }}
1414
pr-message: 'This seems to be your first PR. You will need a positive review in order for tests to start.'

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
branch=$(echo ${{ github.event.inputs.tag }}-patches | tr . - | sed -e's/-[0-9]*-patches$/-patches/')
1919
EOF
2020
id: decide_release_branch
21-
- uses: actions/checkout@v3
21+
- uses: actions/checkout@v5
2222
with:
2323
ref: "dev"
2424
- name: Tag branch (or create one before tagging if does not exists)

.github/workflows/reports.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ jobs:
1717
if: github.repository == 'AliceO2Group/AliceO2'
1818

1919
steps:
20-
- uses: actions/checkout@v4
20+
- uses: actions/checkout@v5
2121
- name: Set up Python 3.10
22-
uses: actions/setup-python@v5
22+
uses: actions/setup-python@v6
2323
with:
2424
python-version: '3.10'
2525
- uses: actions/cache@v4

.github/workflows/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
stale:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/stale@v1
10+
- uses: actions/stale@v10
1111
with:
1212
repo-token: ${{ secrets.GITHUB_TOKEN }}
1313
stale-pr-message: 'This PR did not have any update in the last 30 days. Is it still needed? Unless further action in will be closed in 5 days.'

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ bazel-*
8282
# direnv
8383
.envrc
8484

85+
# git wrappers
86+
.sl
87+
8588
# LSP support on macOS with vim
8689
.clangd
8790
DataFormats/Detectors/CTP/include/DataFormatsCTP/Scalers.h

CCDB/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ If you access the CCDB with a web browser, add `/browse` at the end of the URL t
3131
```c++
3232
// init
3333
CcdbApi api;
34-
map<string, string> metadata; // can be empty
34+
std::map<std::string, std::string> metadata; // can be empty
3535
api.init("http://ccdb-test.cern.ch:8080"); // or http://localhost:8080 for a local installation
3636
// store abitrary user object in strongly typed manner
3737
auto deadpixels = new o2::FOO::DeadPixelMap();
3838
api.storeAsTFileAny(deadpixels, "FOO/DeadPixels", metadata);
3939
// read like this (you have to specify the type)
4040
auto deadpixelsback = api.retrieveFromTFileAny<o2::FOO::DeadPixelMap>("FOO/DeadPixels", metadata);
4141
// read like this to get the headers as well, and thus the metadata attached to the object
42-
map<string, string> headers;
42+
std::map<std::string, std::string> headers;
4343
auto deadpixelsback = api.retrieveFromTFileAny<o2::FOO::DeadPixelMap>("FOO/DeadPixels", metadata /* constraint the objects retrieved to those matching the metadata */, -1 /* timestamp */, &headers /* the headers attached to the returned object */);
4444
// finally, use this method to retrieve only the headers (and thus the metadata)
4545
std::map<std::string, std::string> headers = f.api.retrieveHeaders("FOO/DeadPixels", f.metadata);
@@ -50,7 +50,7 @@ std::map<std::string, std::string> headers = f.api.retrieveHeaders("FOO/DeadPixe
5050
```c++
5151
// init
5252
CcdbApi api;
53-
map<string, string> metadata; // can be empty
53+
std::map<std::string, std::string> metadata; // can be empty
5454
api.init("http://ccdb-test.cern.ch:8080"); // or http://localhost:8080 for a local installation
5555
// create a local snapshot of everthing in or below the FOO folder valid for timestamp 12345
5656
api.snapshot("FOO", "/tmp/CCDBSnapshot/", 12345);

CCDB/include/CCDB/BasicCCDBManager.h

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,16 +108,20 @@ class CCDBManagerInstance
108108

109109
/// retrieve an object of type T from CCDB as stored under path, timestamp and metaData
110110
template <typename T>
111-
T* getSpecific(std::string const& path, long timestamp = -1, MD metaData = MD())
111+
T* getSpecific(std::string const& path, long timestamp = -1, MD metaData = MD(), std::map<std::string, std::string>* headers = nullptr)
112112
{
113113
// TODO: add some error info/handling when failing
114114
mMetaData = metaData;
115-
return getForTimeStamp<T>(path, timestamp);
115+
auto obj = getForTimeStamp<T>(path, timestamp);
116+
if (headers) {
117+
*headers = mHeaders;
118+
}
119+
return obj;
116120
}
117121

118122
/// retrieve an object of type T from CCDB as stored under path and using the timestamp in the middle of the run + metadata. The run number is provided separately to conform to typical analysis use (in which case metadata does not include runNumber)
119123
template <typename T>
120-
T* getSpecificForRun(std::string const& path, int runNumber, MD metaData = MD());
124+
T* getSpecificForRun(std::string const& path, int runNumber, MD const& metaData = MD());
121125

122126
/// detect online processing modes (i.e. CCDB objects may be updated in the lifetime of the manager)
123127
bool isOnline() const { return mDeplMode == o2::framework::DeploymentMode::OnlineAUX || mDeplMode == o2::framework::DeploymentMode::OnlineDDS || mDeplMode == o2::framework::DeploymentMode::OnlineECS; }
@@ -129,6 +133,9 @@ class CCDBManagerInstance
129133
return getForTimeStamp<T>(path, mTimestamp);
130134
}
131135

136+
// gain access to underlaying CCDB layer (to allow for more complex queries without need to reinit another API)
137+
CcdbApi& getCCDBAccessor() { return mCCDBAccessor; }
138+
132139
bool isHostReachable() const { return mCCDBAccessor.isHostReachable(); }
133140

134141
/// clear all entries in the cache
@@ -230,11 +237,12 @@ class CCDBManagerInstance
230237
template <typename T>
231238
T* CCDBManagerInstance::getForTimeStamp(std::string const& path, long timestamp)
232239
{
240+
mHeaders.clear(); // we clear at the beginning; to allow to retrieve the header information in a subsequent call
233241
T* ptr = nullptr;
234242
mQueries++;
235243
auto start = std::chrono::system_clock::now();
236244
if (!isCachingEnabled()) {
237-
ptr = mCCDBAccessor.retrieveFromTFileAny<T>(path, mMetaData, timestamp, nullptr, "",
245+
ptr = mCCDBAccessor.retrieveFromTFileAny<T>(path, mMetaData, timestamp, &mHeaders, "",
238246
mCreatedNotAfter ? std::to_string(mCreatedNotAfter) : "",
239247
mCreatedNotBefore ? std::to_string(mCreatedNotBefore) : "");
240248
if (!ptr) {
@@ -305,7 +313,6 @@ T* CCDBManagerInstance::getForTimeStamp(std::string const& path, long timestamp)
305313
} else {
306314
cached.cacheValidUntil = -1;
307315
}
308-
mHeaders.clear();
309316
mMetaData.clear();
310317
if (!ptr) {
311318
if (mFatalWhenNull) {
@@ -328,7 +335,7 @@ T* CCDBManagerInstance::getForRun(std::string const& path, int runNumber, bool s
328335
}
329336

330337
template <typename T>
331-
T* CCDBManagerInstance::getSpecificForRun(std::string const& path, int runNumber, MD metaData)
338+
T* CCDBManagerInstance::getSpecificForRun(std::string const& path, int runNumber, MD const& metaData)
332339
{
333340
auto [start, stop] = getRunDuration(runNumber, mFatalWhenNull);
334341
if (start < 0 || stop < 0) {

0 commit comments

Comments
 (0)