Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AggregatedRunInfo can be requested via GRPGeomHelper + related fixes #13586

Merged
merged 4 commits into from
Oct 12, 2024

Conversation

shahor02
Copy link
Collaborator

  • Fix fetching CCDB metadata, extend ccdbRunDependent behaviour
    ccdbParamSpec run-dependence flag changed from bool to int. The new convension is:
    ccdbParamSpec(path) : not run-depndent
    ccdbParamSpec(path, 1) : run-dependent object with usual timestamp and runNumber requested via metadata
    ccdbParamSpec(path, 2) : run-dependent object with runNumber used instead of timestamp.
    So, the entry like "RCT/Info/RunInformation" should be requested by passing requesting input e.g.
    {"RCTRunInfo", "RCT", "RunInfo", 0, Lifetime::Condition, ccdbParamSpec("RCT/Info/RunInformation", 2)}

  • Add a separate method to extract run-duration from RCT info headers

  • AggregatedRunInfo can be requested via GRPGeomHelper
    To do this, request it after creating auto ggRequest = std::make_shared<o2::base::GRPGeomRequest>(...) as
    ggRequest->requireAggregateRunInfo(inputs);
    Then, in the task, once the GRPGeomHelper::checkUpdates was called, one can access the AggregatedRunInfo as
    const auto& rInfo = GGCCDBRequest.getAggregatedRunInfo()

TODO: filling of AggregatedRunInfo requires CTP/Calib/FirstRunOrbit which is populated only starting from 15 Aug 2023.
Need to retrofit it for all real runs and also for the special non-anchored MC range.

Copy link
Contributor

REQUEST FOR PRODUCTION RELEASES:
To request your PR to be included in production software, please add the corresponding labels called "async-" to your PR. Add the labels directly (if you have the permissions) or add a comment of the form (note that labels are separated by a ",")

+async-label <label1>, <label2>, !<label3> ...

This will add <label1> and <label2> and removes <label3>.

The following labels are available
async-2023-pbpb-apass4
async-2023-pp-apass4
async-2024-pp-apass1
async-2022-pp-apass7
async-2024-pp-cpass0

mAggregatedRunInfo.orbitEOR = (mAggregatedRunInfo.eor * 1000 - mOrbitResetTimeMUS) / o2::constants::lhc::LHCOrbitMUS;
// adjust to the nearest TF edge to satisfy condition (orbitSOR % nOrbitsPerTF == 0)
mAggregatedRunInfo.orbitSOR = (mAggregatedRunInfo.orbitSOR / mAggregatedRunInfo.orbitsPerTF + 1) * mAggregatedRunInfo.orbitsPerTF; // +1 to choose the safe boundary ... towards run middle
mAggregatedRunInfo.orbitEOR = mAggregatedRunInfo.orbitEOR / mAggregatedRunInfo.orbitsPerTF * mAggregatedRunInfo.orbitsPerTF;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I do not understand this part. It seems that the calculation of of AggregateRunInfo::buildAggregateRunInfo is repeated. Could this be avoided (by potentially refactoring methods in AggregatedRunInfo) ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure, it was a partial copy-paste from the previous AggregateRunInfo code, should be changed.

ccdbParamSpec run-dependence flag changed from bool to int. The new convension is:
ccdbParamSpec(path) : not run-depndent
ccdbParamSpec(path, 1) : run-dependent object with usual timestamp and runNumber requested via metadata
ccdbParamSpec(path, 2) : run-dependent object with runNumber used instead of timestamp.
So, the entry like RCT/Info/RunInformation should be requested by passing 2.
sawenzel
sawenzel previously approved these changes Oct 11, 2024
To do this, request it after creating auto ggRequest = std::make_shared<o2::base::GRPGeomRequest>(...)
as ggRequest->requireAggregateRunInfo(inputs);
Then, in the task, once the GRPGeomHelper::checkUpdates was called, one can access AggregatedRunInfo
as const auto& rInfo = GGCCDBRequest.getAggregatedRunInfo()

TODO: filling of AggregatedRunInfo requires CTP/Calib/FirstRunOrbit which is populated only starting from
15 Aug 2023. Need to retrofit it for all runs and also for special non-anchored MC range.
int64_t ctp_run_number = (*ctfFirstRunOrbitVec)[1];
int64_t ctp_orbitSOR = (*ctfFirstRunOrbitVec)[2];
if (creation_timeIGNORED == -1 && ctp_run_number == -1 && ctp_orbitSOR == -1) {
LOGP(warn, "Default dummy CTP/Calib/FirstRunOrbit was provide, ignoring");
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In case the of the CTP/Calib/FirstRunOrbit corresponds to the newly uploaded default object https://its.cern.ch/jira/browse/O2-5422 no error will be produced, just a warning.

@shahor02 shahor02 merged commit b4ffc31 into AliceO2Group:dev Oct 12, 2024
14 checks passed
@shahor02 shahor02 deleted the pr_aggRIdpl branch October 12, 2024 19:17
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.

2 participants