Skip to content

DPL: allow CallbacksPolicy to have access to command line options#7534

Merged
ktf merged 4 commits into
AliceO2Group:devfrom
ktf:cmd-line-in-policy
Nov 6, 2021
Merged

DPL: allow CallbacksPolicy to have access to command line options#7534
ktf merged 4 commits into
AliceO2Group:devfrom
ktf:cmd-line-in-policy

Conversation

@ktf

@ktf ktf commented Nov 5, 2021

Copy link
Copy Markdown
Member

No description provided.

@ktf ktf requested review from a team, bovulpes, iouribelikov and rpezzi as code owners November 5, 2021 11:09
@ktf

ktf commented Nov 5, 2021

Copy link
Copy Markdown
Member Author

@shahor02 this still requires some adjustments to the tests, but it should be all we need.

@ktf ktf force-pushed the cmd-line-in-policy branch from 78e1e76 to 361c54f Compare November 5, 2021 12:36
@ktf

ktf commented Nov 5, 2021

Copy link
Copy Markdown
Member Author

@shahor02 @davidrohr this is now compiling also the tests. Testing on hyperloop to make sure it does not break stuff.

Comment thread Detectors/ITSMFT/ITS/workflow/src/its-reco-workflow.cxx Outdated
@ktf ktf merged commit 3f2ac97 into AliceO2Group:dev Nov 6, 2021
@ktf ktf deleted the cmd-line-in-policy branch November 6, 2021 07:14
// auto filename = context.options().get<std::string>("filename");
return false;
},
[](CallbackService& service, InitContext& context) {

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.

Hi @ktf
seems to work as expected except 1 problem: the filename for the tf-info vector comes via workflow global options, i.e. ConfigContext, as you correctly have it in the 1st lambda. Can the second lambda also have ConfigContext supplied (InitContext does not hurt but useless in this particular case).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I thought InitContext actually had also the workflow option. I will try to fix that.

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.

let me check, did not know it is supposed to pass the global options.

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.

@ktf I've checked, global options are not accessible via InitContext.options()

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It's supposed to pass all the options which apply to a given DataProcessorSpec. I do not remember if workflow options are considered "global".

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.

well, in the o2-global-track-cluster-reader --track-types ITS --cluster-types ITS --hbfutils-config o2_tfidinfo.root
the particular reader devices don't see the option --hbfutils-config.

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.

@ktf Looks like there is more serious problem: the customize(std::vector<o2::framework::CallbacksPolicy>& policies) defined for particular workflow, checks all devices of the global merged workflow. So, to make it work currently I need to pass the option (filename with TF header infos) to all these workflows. I.e. since both o2-global-track-cluster-reader and o2-its-reco-workflow have this customize, I need to call the workflow as

o2-global-track-cluster-reader --track-types ITS --cluster-types ITS --hbfutils-config o2_tfidinfo.root ... | \
o2-its-reco-workflow --clusters-from-upstream  --hbfutils-config o2_tfidinfo.root ...

otherwise the o2-its-reco-workflow checks the devices of the o2-global-track-cluster-reader against its own hbfutils-config option (by default pointing to `o2simdigitizerworkflow_configuration.ini).

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