-
Notifications
You must be signed in to change notification settings - Fork 19
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
convertAll ignored after changes for IOSvc compatibility? #219
Comments
Thanks for the report (and for testing this in the real world). This sounds like a bug to me, but I am wondering a bit why it didn't already show up in our tests, as we do in principle run a converter from EDM4hep to LCIO with I will have a look. |
Hi @tmadlener |
apologies this slipped through last week on my end. Following your steps exactly, I am running into the following issue, where it looks like the
I should however be able to try and come up with a reproducer for the actual problem myself probably. |
OK. I have adapted one of our tests slightly and toggled k4MarlinWrapper/test/gaudi_opts/test_global_converter_maps.py Lines 74 to 80 in f17eec6
and here k4MarlinWrapper/test/gaudi_opts/test_global_converter_maps.py Lines 92 to 95 in f17eec6
and for me this works with the I am not entirely sure yet why it doesn't work in your case, maybe putting the |
as you can see the converter is not converting my digitised CaloHit collections like ECalBarrelModuleThetaMergedPositioned Note that these digitised hit collections are not in the input sim file, but are created during this reconstruction step - so maybe the "problem" is there (i.e. it's not a bug but a feature, the converter only converts what's in the input), and I have to declare to the converter explicitly all the collections that are being created in memory that I want to translate? Anyway, this problem did not arise when I was using the legacy IO .. |
I can't seem to reproduce that either. The test case I used above, also has the I have also checked the implementation again and the when used with the
So in principle, if the collection has been read or produced, it should be converted. I am a bit puzzled since you wrote that this worked with the PodioInput and also that it works if you place the name into the |
OK. I think I found the problem. When using the If I try to run the same test using that, I can see that the test starts to fail for me as well. And it's the same reason as for you, the converter doesn't see collections that haven't been read from file. I am not entirely sure how to fix it at the moment, as the interactions between these two ways of doing things have become quite complex in the meantime. @jmcarcell could the approach of simply asking the TES for collections also work for the |
Hi @tmadlener I still observe the issue I initially reported. Recipe is still the same:
inside run_ALLEGRO_reco.py, in L17, there is a useIOSvc flag. With IOSvc False, all collections are converted, including the "XXXXPositioned" collections that contained the digitised cells, as you can see from the debug messages of the converted. |
I seem to still be missing something on my end, I get
|
Hi @tmadlener I cleaned up the test a lot so that it should be easier for you to debug (and also to run the code successfully just do in a fresh shell:
The script will download the steering file for k4run, the input sim file, setup today's nightly (where things are not broken) and run with and without IOSvc and compare the logs to show that with IOSvc the collections in the transient store not added explicitly to the mapping of the converter are not converted even if convertAll is True Thanks! |
Hi @giovannimarchiori, sorry for the delay on my side. Thanks a lot for very nice reproducer, worked like a charm :) I have now understood why we don't see the failure in our tests but why it is clearly there for you. The k4MarlinWrapper/k4MarlinWrapper/src/components/StoreUtils.cpp Lines 78 to 81 in 00ac363
In the end that is why it is missing from "all collections". @jmcarcell is this something that we can just fix easily here in the |
With the fix in #225, the logs are the same. |
Check duplicate issues.
Goal
I have a code that runs DDMarlinPandora on edm4hep files, via the edm4hep2LCIO converters:
https://gitlab.cern.ch/gmarchio/FCC-scripts/-/blob/main/run_ALLEGRO_reco.py?ref_type=heads#L972
Until today I was using for the input the legacy services (k4DataSvc, PodioInput) because the code would not run otherwise, but I was told yesterday that with
#216
key4hep/k4FWCore#280
I would be able to go back to the IOSvc input.
However, when I tried this today, I get multiple warnings in output that I didn't have before, one for each hit collection that I am trying to read in DDMarlinPandora, such as:
[ MESSAGE "DDMarlinPandora"] Failed to extract hcal calo hit collection: HCalBarrelReadoutPositioned, lcio::DataNotAvailableException: LCEventImpl::getCollection: collection not in event:HCalBarrelReadoutPositioned
These warnings only disappear if I modify the EDM4hepTool configuration of my code, which was:
to include in the collNameMapping all the hits collections, for instance
"HCalBarrelReadoutPositioned": "HCalBarrelReadoutPositioned",
Before, this didn't seem to be necessary - it seemed to be handled automatically when convertAll = True as in my case. Is that a bug or a feature of the new changes?
Tagging @jmcarcell and @tmadlener
Cheers,
Giovanni
Operating System and Version
Rocky Linux 9
compiler
GCC 14.2.0 (Spack GCC)
The version of the key4hep stack
today's nightly
Package Version
main
Reproducer
Additional context
No response
The text was updated successfully, but these errors were encountered: