-
Notifications
You must be signed in to change notification settings - Fork 27
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 a metadata service and a test #215
Conversation
test/k4FWCoreTest/src/components/ExampleFunctionalMetadataConsumer.cpp
Outdated
Show resolved
Hide resolved
} | ||
|
||
edm4hep::MCParticleCollection operator()() const override { | ||
k4FWCore::putParameter("EventMetadataInt", 5, this); |
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.
Where do these parameters go? To the event frame or to the metadata frame? If the latter, I think this should be impossible. At least with the MetaDataHandle
we went to some length to make this fail (at runtime), because if something is "true metadata" then it should be constant at file level. Hence, there should be no need to make it possible to even set this during event processing. If we can make this call go to the event frame, then it would be OK, I suppose, but it might be a bit confusing to have only one interface for doing both.
The notable exception for setting metadata during event processing is obviously the MarlinWrapper, but I don't think we should make this easily possible here, just because it's needed there.
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.
Now changed to prevent from putting parameters in the metadata frame as it was being done for the handle-based algorithms, it's literally the same mechanism so I think it should work for MarlinWrapper
.
4ae46c7
to
b7641c8
Compare
test/k4FWCoreTest/src/components/ExampleFunctionalMetadataConsumer.cpp
Outdated
Show resolved
Hide resolved
ab40bd4
to
5ba499a
Compare
d0573b8
to
6f5d88d
Compare
This should now be ready and when using IOSvc it also works fine with DataHandle algorithms. I didn't bother with making it work when using |
BEGINRELEASENOTES
IOSvc
fromk4FWCore
, if no metadata is added then the service won't do anything. If metadata is added, the metadata service will hold apodio::Frame
with the metadata that theWriter
will write. The metadata service only works when there is an output file.MetadaHandle
to make it possible to save and read metadata from DataHandle-based algorithms, so that when switching toIOSvc
metadata for existing DataHandle algorithms will keep working. Add a test using IOSvc with DataHandle algorithms that write and read metadata.ENDRELEASENOTES