Skip to content

AggregatedRunInfo can be requested via GRPGeomHelper + related fixes#13586

Merged
shahor02 merged 4 commits intoAliceO2Group:devfrom
shahor02:pr_aggRIdpl
Oct 12, 2024
Merged

AggregatedRunInfo can be requested via GRPGeomHelper + related fixes#13586
shahor02 merged 4 commits intoAliceO2Group:devfrom
shahor02:pr_aggRIdpl

Conversation

@shahor02
Copy link
Copy Markdown
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.

@github-actions
Copy link
Copy Markdown
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

Comment thread Detectors/Base/src/GRPGeomHelper.cxx Outdated
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
@shahor02 shahor02 deleted the pr_aggRIdpl branch October 12, 2024 19:17
@alcaliva alcaliva added the async-2024-pp-apass1 Request porting to async-2024-pp-apass1 label Feb 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

async-2024-pp-apass1 Request porting to async-2024-pp-apass1

Development

Successfully merging this pull request may close these issues.

3 participants