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

Add support for running with IOSvc #216

Merged
merged 30 commits into from
Feb 5, 2025
Merged

Add support for running with IOSvc #216

merged 30 commits into from
Feb 5, 2025

Conversation

jmcarcell
Copy link
Member

@jmcarcell jmcarcell commented Jan 14, 2025

BEGINRELEASENOTES

  • Add support for running the wrapper with IOSvc with a few tests:
    • Run the CLIC reconstruction with IOSvc (proves processors run under IOSvc, producing the same output).
    • Run global_converter_maps with IOSvc, where a functional algorithm produces output that is used by a Marlin processor and the output of the two is used either by a Gaudi::Algorithm or a functional algorithm (proves processors can take input from functional algorithms and functional algorithms can take input from processors).
    • Run test_link_conversion_edm4hep with IOSvc, where links produced by functional algorithms are checked by Marlin processors.

ENDRELEASENOTES

Fix #202

k4MarlinWrapper/src/components/Lcio2EDM4hep.cpp Outdated Show resolved Hide resolved
k4MarlinWrapper/src/components/Lcio2EDM4hep.cpp Outdated Show resolved Hide resolved
k4MarlinWrapper/src/components/EDM4hep2Lcio.cpp Outdated Show resolved Hide resolved
k4MarlinWrapper/src/components/EDM4hep2Lcio.cpp Outdated Show resolved Hide resolved
for (const auto& pidCollMeta : pidCollections) {
const auto algoId = attachParticleIDMetaData(lcio_event, edmEvent, pidCollMeta);
auto algoId = attachParticleIDMetaData(lcio_event, edmEvent.value(), pidCollMeta);
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe this also needs a similar treatment as convertObjectParameters in k4EDM4hep2LcioConv? That would make it possible to simplify the code below a bit, but I am not sure if it's worth the effort.

@andresailer andresailer self-requested a review January 28, 2025 08:50
k4MarlinWrapper/CMakeLists.txt Show resolved Hide resolved
k4MarlinWrapper/k4MarlinWrapper/converters/EDM4hep2Lcio.h Outdated Show resolved Hide resolved
@@ -64,6 +67,9 @@ class EDM4hep2LcioTool : public AlgTool, virtual public IEDMConverter {

PodioDataSvc* m_podioDataSvc;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could we have a one line description for each service under what circumstances which service is used?

Copy link
Member Author

Choose a reason for hiding this comment

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

Like the ones I added?

@jmcarcell
Copy link
Member Author

I just realised I made a mistake and key4hep/k4EDM4hep2LcioConv#102 is not needed, so it can be reverted. key4hep/k4EDM4hep2LcioConv#102 was needed before because I was incorrectly writing the event parameters to the metadata frame. I discovered a limitation (added in a warning) of the current implementation: when running Marlin processors with IOSvc without any input file, it's not possible to convert event parameters to EDM4hep as the frame that will be written doesn't exist yet; it will be created later by the Writer: https://github.com/key4hep/k4FWCore/blob/main/k4FWCore/components/Writer.cpp#L200.

@tmadlener
Copy link
Contributor

when running Marlin processors with IOSvc without any input file, it's not possible to convert event parameters to EDM4hep as the frame that will be written doesn't exist yet; it will be created later by the Writer:

This is mainly (only?) relevant for the LCIO to EDM4hep direction, right? As far as I can tell, the tests are unchanged apart from the additional infrastructure to switch between IOSvc and PodioDataSvc. In that case I would say this is OK for now and we check again in the future if someone runs into problems with this.

@jmcarcell
Copy link
Member Author

I have edited the first post with information about all the tests. I think after key4hep/k4FWCore#280 functional algorithms and IOSvc should play well with the Marlin wrapper unless I'm missing any situation that is not in the tests...

@jmcarcell
Copy link
Member Author

jmcarcell commented Feb 5, 2025

This is finally passing the CI (nightiles) so it's ready from my side.

Copy link
Contributor

@tmadlener tmadlener left a comment

Choose a reason for hiding this comment

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

I have just one minor question, but since CI is passing, I think it's just me missing something.

k4MarlinWrapper/src/components/Lcio2EDM4hep.cpp Outdated Show resolved Hide resolved
@tmadlener
Copy link
Contributor

We should also bump (or add in the first place) the minimum required version for k4FWCore in the top level CMakeLists.txt. But we need a new tag for that first for k4FWCore.

@jmcarcell jmcarcell merged commit d2e9fc5 into main Feb 5, 2025
3 of 11 checks passed
@jmcarcell jmcarcell deleted the iosvc-support branch February 5, 2025 15:27
@jmcarcell
Copy link
Member Author

CI passed in the previous run. The nightlies don't have all the tags to make it pass until tomorrow.

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.

Converters do not work with IOSvc
3 participants