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

Hack to make "Output Module Inserter" support plugin-type names with : #88

Merged
merged 1 commit into from
Mar 11, 2024

Conversation

missirol
Copy link
Contributor

@missirol missirol commented Mar 6, 2024

This PR is a follow-up to #85, in light of the discussion in #86.

The production HLT menus need to include plugin types with : in their name (e.g. alpaka_serial_sync::*), and the "Output Module Inserter" currently does not support adding this kind of modules via the GUI (parsing of these modules directly from python works without issue).

This PR introduces a workaround to fix this GUI issue. More details are given in the comment in the source code.

This PR is only a GUI improvement. It is not strictly needed to release a new version of the GUI with this right away, and it is a "minor" update (meaning, it does not trigger a "major" release update for the next release of this package).

// "pluginType", "pluginType:moduleLabel", or "copy:pluginType:moduleLabel".
// Unfortunately, this convention does not take into account the fact that
// pluginType itself can contain the substring "::" (e.g. plugin types with namespace specification,
// or Alpaka plugins with explicit backend selection).
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// or Alpaka plugins with explicit backend selection).
// likw Alpaka plugins with explicit backend selection).

Comment on lines 3076 to 3077
// The hack below consists in replacing "::" in "name" with
// a very unlikely string without colons, before "name" is split by ":".
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// The hack below consists in replacing "::" in "name" with
// a very unlikely string without colons, before "name" is split by ":".
// The hack below consists in replacing "::" in "name" with "##",
// before "name" is split by ":".

// a very unlikely string without colons, before "name" is split by ":".
// After that, the replacement of "::" with this unlikely string is undone in "templateName".
// NOTE.
// This hack assumes that plugin types in CMSSW will never have "##" in their name.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// This hack assumes that plugin types in CMSSW will never have "##" in their name.
// This hack assumes that plugin types in CMSSW will never have "##" in their name,
// since that would be invalid in C++.

@mmusich
Copy link
Contributor

mmusich commented Mar 11, 2024

Is there anything outstanding in this PR or can we merge it (and create a new tag)?

@missirol
Copy link
Contributor Author

From my side, I think we can go ahead. (I think I implemented the comments, and I did some manual tests of this PR editing and saving a config in the GUI)

@Martin-Grunewald
Copy link
Contributor

Yes.

@mmusich mmusich merged commit 5e6b4fd into cms-sw:confdbv3 Mar 11, 2024
mmusich added a commit that referenced this pull request Mar 11, 2024
mmusich added a commit that referenced this pull request Mar 11, 2024
mmusich added a commit that referenced this pull request Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants