-
Notifications
You must be signed in to change notification settings - Fork 100
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
Propagate run Parameters from input to output #1147
Conversation
As far as I understand, this will only work with HepMC3 >= 3.2.6 https://gitlab.cern.ch/hepmc/HepMC3/-/issues/44 |
@andresailer This issue is highly connectedd to: PR #1140
|
Hi Markus, this is related to #1114 I don't understand what you mean though about the 4 tuples. |
The 4 tuples are:
|
So it probably also works with hepmc before 3.2.6, but the ReaderAscii only parses the run_info when actually reading events, so we skip(-1), which is otherwise a no-op, I hope also for all the other readers (it is for the Root Reader). |
I think the skip(-1) is not working. I am confused. |
Negative skips can only work for direct access files (root etc.) |
I thought the reader would parse all the text until it hits an event but not the event, but I misread the code and the (-1) was exiting even earlier. Now I read an event and then create a new reader with the same file. How bad can this be 🤔 |
No. Look. This cannot be. If we made a design error we should correct it. |
It is a problem with the hepmc reader, not in dd4hep. |
Apparently, segfault is how bad this can be, so back to the drawing board. |
The segfault was due to moving the reader creation to the beginRun only. But the tests were directly calling readparticles, without there being beginRun. Now a reader is created either at begin run, or in readParticles (as before). Added also a HepMC Version check so that the code should compile... |
…eader because the ASCII reader does not parse the run info when not reading a full event, we open the file, skip an event (which makes it read the run info), and then close and open again
… the run info at this point for example
As far as I am concerned, this is as good as it gets for the moment. |
BEGINRELEASENOTES
ENDRELEASENOTES
TODO:
Re-use EventParameters for RunParameter storage?Cannot do that, cannot specialize the ingestParameters function more than once