Skip to content

Commit 97c4d46

Browse files
authored
Merge branch 'AliceO2Group:dev' into addth1l
2 parents cb47932 + 3c38c31 commit 97c4d46

File tree

1,821 files changed

+93449
-69606
lines changed

Some content is hidden

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

1,821 files changed

+93449
-69606
lines changed

.cmake-format.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,6 @@
6666
"HEADERS": '*',
6767
}
6868
},
69-
"o2_target_man_page": {
70-
"kwargs": {
71-
"NAME": '+',
72-
"SECTION": '*',
73-
}
74-
},
7569
"add_root_dictionary": {
7670
"kwargs": {
7771
"LINKDEF": '+',

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
# Dependabot configuration
3+
# Reference: https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
4+
5+
version: 2
6+
updates:
7+
- package-ecosystem: "github-actions" # See documentation for possible values
8+
directory: "/" # Location of package manifests
9+
schedule:
10+
interval: "weekly"

.github/workflows/clean-test.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ name: Clean PR checks
1919
# Warning: the check_* keys are magic and must consist of the string
2020
# "check_" followed by the applicable check name exactly. The
2121
# "description" field is only the human-readable label for the input.
22-
'check_build/O2/o2':
23-
description: build/O2/o2
24-
type: boolean
25-
default: true
2622
'check_build/AliceO2/O2/o2/macOS':
2723
description: build/AliceO2/O2/o2/macOS
2824
type: boolean
@@ -31,18 +27,23 @@ name: Clean PR checks
3127
description: build/AliceO2/O2/o2/macOS-arm
3228
type: boolean
3329
default: true
34-
'check_build/O2/fullCI':
30+
'check_build/O2/fullCI_slc9':
3531
description: build/O2/fullCI
3632
type: boolean
3733
default: true
38-
'check_build/O2/o2-cs8':
39-
description: build/O2/o2-cs8
40-
type: boolean
41-
default: true
4234
'check_build/O2/o2-dataflow-cs8':
4335
description: build/O2/o2-dataflow-cs8
4436
type: boolean
4537
default: true
38+
'check_build/O2/o2/aarch64':
39+
description: build/O2/o2/aarch64
40+
type: boolean
41+
default: true
42+
'check_build/O2/o2_slc9':
43+
description: build/O2/o2_slc9
44+
type: boolean
45+
default: true
46+
4647

4748
permissions: {}
4849

.github/workflows/datamodel-doc.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ jobs:
4848
run: |
4949
python3 -m pip install --user -U numpy nltk
5050
python3 -m nltk.downloader -d ~/nltk_data punkt
51+
python3 -m nltk.downloader -d ~/nltk_data punkt_tab
5152
5253
- name: Generate documentation
5354
run: exec bash -exo pipefail O2/scripts/datamodel-doc/update-datamodel.sh
@@ -59,6 +60,7 @@ jobs:
5960
run: |
6061
# git diff --quiet exits with 1 if any tracked files have changed, and
6162
# with 0 otherwise.
63+
set -e
6264
if git diff --quiet; then
6365
exit # Nothing has changed, so no need to send a PR.
6466
fi
@@ -70,8 +72,7 @@ jobs:
7072
# Send pull request
7173
# We need to use "gh" ourselves because alisw/pull-request gets
7274
# confused when multiple repos are checked out.
73-
GH_TOKEN=${{ secrets.GITHUB_TOKEN }} gh pr create -B \
74-
AliceO2Group:master -H alibuild:auto-datamodel-doc \
75+
GH_TOKEN="$GITHUB_TOKEN" gh pr create -R AliceO2Group/analysis-framework -B master \
7576
--no-maintainer-edit -t 'Automatic data model update' -b "This update \
7677
to the data model documentation was automatically created from \
7778
tonight's O2 dev branch." || true

.github/workflows/reports.yml

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

1919
steps:
20-
- uses: actions/checkout@v3
20+
- uses: actions/checkout@v4
2121
- name: Set up Python 3.10
2222
uses: actions/setup-python@v5
2323
with:
2424
python-version: '3.10'
25-
- uses: actions/cache@v2
25+
- uses: actions/cache@v4
2626
name: Configure pip caching
2727
with:
2828
path: ~/.cache/pip

Algorithm/CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@
1111

1212
o2_add_header_only_library(Algorithm INTERFACE_LINK_LIBRARIES O2::Headers)
1313

14-
o2_target_man_page(Algorithm NAME Algorithm SECTION 3)
15-
o2_target_man_page(Algorithm NAME algorithm_parser SECTION 3)
16-
1714
o2_add_test(o2formatparser
1815
SOURCES test/o2formatparser.cxx
1916
COMPONENT_NAME Algorithm

Algorithm/doc/Algorithm.3.in

Lines changed: 0 additions & 12 deletions
This file was deleted.

Algorithm/doc/algorithm_parser.3.in

Lines changed: 0 additions & 135 deletions
This file was deleted.

CCDB/include/CCDB/BasicCCDBManager.h

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ class CCDBManagerInstance
102102
template <typename T>
103103
T* getForTimeStamp(std::string const& path, long timestamp);
104104

105+
/// retrieve an object of type T from CCDB as stored under path and using the timestamp in the middle of the run
106+
template <typename T>
107+
T* getForRun(std::string const& path, int runNumber, bool setRunMetadata = false);
108+
105109
/// retrieve an object of type T from CCDB as stored under path, timestamp and metaData
106110
template <typename T>
107111
T* getSpecific(std::string const& path, long timestamp = -1, MD metaData = MD())
@@ -111,6 +115,10 @@ class CCDBManagerInstance
111115
return getForTimeStamp<T>(path, timestamp);
112116
}
113117

118+
/// 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)
119+
template <typename T>
120+
T* getSpecificForRun(std::string const& path, int runNumber, MD metaData = MD());
121+
114122
/// detect online processing modes (i.e. CCDB objects may be updated in the lifetime of the manager)
115123
bool isOnline() const { return mDeplMode == o2::framework::DeploymentMode::OnlineAUX || mDeplMode == o2::framework::DeploymentMode::OnlineDDS || mDeplMode == o2::framework::DeploymentMode::OnlineECS; }
116124

@@ -186,7 +194,7 @@ class CCDBManagerInstance
186194
/// On error it fatals (if fatal == true) or else returns the pair -1, -1.
187195
std::pair<int64_t, int64_t> getRunDuration(int runnumber, bool fatal = true);
188196
static std::pair<int64_t, int64_t> getRunDuration(o2::ccdb::CcdbApi const& api, int runnumber, bool fatal = true);
189-
197+
static std::pair<int64_t, int64_t> getRunDuration(const MD& headers);
190198
std::string getSummaryString() const;
191199

192200
size_t getFetchedSize() const { return mFetchedSize; }
@@ -311,6 +319,27 @@ T* CCDBManagerInstance::getForTimeStamp(std::string const& path, long timestamp)
311319
return ptr;
312320
}
313321

322+
template <typename T>
323+
T* CCDBManagerInstance::getForRun(std::string const& path, int runNumber, bool setRunMetadata)
324+
{
325+
auto metaData = setRunMetadata ? MD{{"runNumber", std::to_string(runNumber)}} : MD{};
326+
mMetaData = metaData;
327+
return getSpecificForRun<T>(path, runNumber, metaData);
328+
}
329+
330+
template <typename T>
331+
T* CCDBManagerInstance::getSpecificForRun(std::string const& path, int runNumber, MD metaData)
332+
{
333+
auto [start, stop] = getRunDuration(runNumber, mFatalWhenNull);
334+
if (start < 0 || stop < 0) {
335+
if (mFatalWhenNull) {
336+
reportFatal(std::string("Failed to get run duration for run ") + std::to_string(runNumber) + std::string(" from CCDB"));
337+
}
338+
return nullptr;
339+
}
340+
return getSpecific<T>(path, start / 2 + stop / 2, metaData);
341+
}
342+
314343
class BasicCCDBManager : public CCDBManagerInstance
315344
{
316345
public:

CCDB/include/CCDB/CCDBDownloader.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ struct HeaderObjectPair_t {
4747

4848
typedef struct DownloaderRequestData {
4949
std::vector<std::string> hosts;
50+
std::vector<std::string> locations;
5051
std::string path;
5152
long timestamp;
5253
HeaderObjectPair_t hoPair;
@@ -231,12 +232,13 @@ class CCDBDownloader
231232
std::string prepareRedirectedURL(std::string address, std::string potentialHost) const;
232233

233234
/**
234-
* Returns a vector of possible content locations based on the redirect headers.
235+
* Updates the locations vector with the the locations.
235236
*
236-
* @param baseUrl Content path.
237237
* @param headerMap Map containing response headers.
238+
* @param locations Location list to be updated.
239+
* @param locIndex Index of the next locaiton to be tried.
238240
*/
239-
std::vector<std::string> getLocations(std::multimap<std::string, std::string>* headerMap) const;
241+
void updateLocations(std::multimap<std::string, std::string>* headerMap, std::vector<std::string>* locations, int* locIndex) const;
240242

241243
std::string mUserAgentId = "CCDBDownloader";
242244
/**

0 commit comments

Comments
 (0)