-
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
Always convert EventHeader to lcio #162
Conversation
Unfortunately, I cannot reproduce the ci failure locally, for me all tests pass :/ |
Is the
|
I guess so, lets see. Still puzzled why I don't get an error locally :D |
Maybe the better solution in this case would be to make sure that the |
hmpf yes I found why it does not error locally for me... the tests also need the install beforehand so if I click on run tests in my editor like a lazy person they run against the k4marlinwrapper from the environment e.g. nightlies |
I agree |
Waiting for
|
540602e
to
3cb3583
Compare
@@ -38,7 +38,7 @@ | |||
) | |||
|
|||
podioInput = PodioInput("InputReader") | |||
podioInput.collections = ["MCParticles"] | |||
podioInput.collections = ["MCParticles", "EventHeader"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need the EventHeader
after merging key4hep/k4FWCore#160 ? If no, then I think we should remove it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should be able to remove it and that was my plan for today :)
It seems we still need it: https://github.com/key4hep/k4MarlinWrapper/actions/runs/6887433198/job/18734625662?pr=162#step:6:2428 I am not entirely sure why though, we pick up the latest version of k4FWCore. |
I think I know why, I thought I tested it but as we set the collections to read after calling the constructor we just overwrite the list that has the EventHeaderName in it :( |
6947282
to
a668aa8
Compare
so appending the collections works, not sure if this is really an improvement :/ |
a668aa8
to
e823a3a
Compare
I changed the steering files for the tests back again as key4hep/k4FWCore#161 made the change unnecessary. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would still like to have tests for this, but the "simplest" I can think of is to write a Marlin processor that we then run wrapped and check whether the contents of the EventHeader are as expected (first filling them with the EventHeaderCreator
algorithm). The processor is almost trivial, but it introduces quite a bit of boiler plate...
cout << "///////////////////////////////////" << endl;
cout << "EVENT: " << evt->getEventNumber() << endl
<< "RUN: " << evt->getRunNumber() << endl
<< "DETECTOR: " << evt->getDetectorName() << endl
<< "COLLECTIONS: (see below)" << endl;
cout << "///////////////////////////////////" << endl << endl; |
Ah yes, we could do something like eventHeaderCreator = EventHeaderCreator("eventHeaderCreator", runNumber = 42)
output = MarlinProcessorWrapper("output")
output.ProcessorType = "LCIOOutputProcessor"
output.Parameters({"LCIOOutputFile": ["output.slcio"]}) (plus the usual gaudi boiler plate) and then run this for one event and do |
76ec6e7
to
d35fee9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice. Thanks.
Head branch was pushed to by a user without write access
@jmcarcell looks like the doctests are failing because |
Yeah, see key4hep/key4hep-spack#547 |
As discussed today during the EDM4hep meeting we merge this now without the doctests until we have figured out how to address them properly. |
db37afc
to
028f1a9
Compare
… previous commit: Always convert EventHeader to lcio (#162)
BEGINRELEASENOTES
EventHeader
to have event number etc. available in lcio.ENDRELEASENOTES
Does anyone have a good idea for a test?
Resolves: #153