Skip to content

Conversation

@Barthelemy
Copy link
Collaborator

No description provided.

@Barthelemy Barthelemy requested a review from knopers8 as a code owner November 21, 2023 07:31
@knopers8
Copy link
Collaborator

knopers8 commented Dec 1, 2023

Communist Party for Perpetual Prosperity?

@Barthelemy
Copy link
Collaborator Author

:-D Custom Parameters for Post-Processing

@Barthelemy Barthelemy changed the title [WIP] [QC-1020] CP for PP [WIP] [QC-1020] Custom Parameters for Post-Processing Dec 5, 2023
@Barthelemy Barthelemy changed the title [WIP] [QC-1020] Custom Parameters for Post-Processing [QC-1020] Custom Parameters for Post-Processing Dec 5, 2023
Copy link
Collaborator

@knopers8 knopers8 left a comment

Choose a reason for hiding this comment

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

Thanks, it seems OK, please address my few suggestions though.

CustomParameters::CustomParameters()
{
mCustomParameters["default"]["default"] = {};
mCustomParameters["null"]["null"] = {};
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

because we need to differentiate between the case when we have the defaults coming from a config file and this case

Comment on lines 54 to 64
auto ppTree = config.get_child("qc.postprocessing." + id);
if (ppTree.count("extendedTaskParameters")) {
for (const auto& [runtype, subTreeRunType] : ppTree.get_child("extendedTaskParameters")) {
for (const auto& [beamtype, subTreeBeamType] : subTreeRunType) {
for (const auto& [key, value] : subTreeBeamType) {
customParameters.set(key, value.get_value<std::string>(), runtype, beamtype);
}
}
}
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am wondering if it's a good idea that code outside of CustomParameters is aware of the tree structure which is expected there. It might make any changes more prone to generating new bugs.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

indeed, I have extracted it and put it in CustomParameters

@Barthelemy Barthelemy enabled auto-merge (squash) December 20, 2023 14:07
@Barthelemy Barthelemy merged commit 650bc5d into AliceO2Group:master Dec 20, 2023
@Barthelemy Barthelemy deleted the pp-custom-parameters branch December 20, 2023 16:30
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