-
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
Update documentation on I/O #267
base: main
Are you sure you want to change the base?
Conversation
doc/PodioInputOutput.md
Outdated
|
||
evtSvc = k4DataSvc("EventDataSvc") | ||
io_svc = IOSvc("IOSvc") |
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 don't know if we need / want to mention this explicitly in the documentation but I think "IOSvc"
is pretty much required as name for the IOSvc
, right? At least some of the CLI examples below will only work with that. Can we create an empty IOSvc()
and rely on a default name?
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.
There is a mention:
The service should be imported from
k4FWCore
and named "IOSvc" as other components may look for it under this name.
Yes, naming it differently might be a problem. Relaying on the default name works fine.
Added a comment
Algorithm to write data to an output file on disk. | ||
### EventHeaderCreator | ||
|
||
Algorithm creating new `edm4hep::EventHeaderCollection` data object. |
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.
Algorithm creating new `edm4hep::EventHeaderCollection` data object. | |
Algorithm creating a new `edm4hep::EventHeaderCollection` data object. |
:::{caution} | ||
`k4DataSvc` is a legacy service previously used in K4FWCore for reading and writing data in EDM4hep or other data models based on PODIO. | ||
|
||
The currently used service is `IOSvc`, which offers improved streamlined functionality and better support for modern workflows. For detailed documentation on `IOSvc`, refer to [this documentation](IO.md). |
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.
But there isn't an IO.md?
|
||
The k4FWCore provides the `MetadataSvc` that allows accessing user metadata in PODIO-based data-models. There is no need to instantiate the `MetadataSvc` explicitly when using `IOSvc` as `IOSvc` can instantiate it on its own if needed. | ||
|
||
When both `Input` and `Output` properties of `IOSvc` are defined, all the metadata originally present in the input will be propagated to the output, possibly adding also any user metadata created during processing. |
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.
When both `Input` and `Output` properties of `IOSvc` are defined, all the metadata originally present in the input will be propagated to the output, possibly adding also any user metadata created during processing. | |
When both the `Input` and `Output` properties of `IOSvc` are defined, all the metadata originally present in the input will be propagated to the output, possibly adding also any user metadata created during processing. |
@@ -1,25 +1,40 @@ | |||
# k4FWCore (key4hep FrameWork Core) | |||
|
|||
k4FWCore is a Gaudi package that provides the PodioDataService, which allows to | |||
k4FWCore is a Gaudi package that provides the IOSvc, which allows to | |||
use podio-based event data models like EDM4hep in Gaudi workflows. |
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.
In several places this line is used "podio-based ... like EDM4hep". We should probably just say EDM4hep; I'm not sure stuff will work with any other podio-based EDM.
|
||
```python | ||
from Configurables import PodioInput, k4DataSvc | ||
The `IOSvc` supports reading ROOT files containing PODIO-based data-models such as EDM4hep. Both files written with ROOT TTree or RNTuple backend are supported with the backend inferred automatically from the files themselves. |
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.
The `IOSvc` supports reading ROOT files containing PODIO-based data-models such as EDM4hep. Both files written with ROOT TTree or RNTuple backend are supported with the backend inferred automatically from the files themselves. | |
The `IOSvc` supports reading ROOT files containing PODIO-based data-models such as EDM4hep. Both files written with the ROOT TTree or RNTuple backend are supported with the backend inferred automatically from the files themselves. |
The biggest challenge for the transition are the algorithms and services that explicitly request and operate on `PodioDataSvc`. These components are not compatible with `IOSvc` and their internals have to be adapted for the usage with `IOSvc` case by case. | ||
|
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 had a look and it's only used in k4SimDelphes
and k4MarlinWrapper
. I'm not sure if this paragraph is useful in general.
BEGINRELEASENOTES
IOSvc
k4DataSvc
to legacy pageENDRELEASENOTES
Some extensions (namely
sphinx-design
and from myst_parsercolon_fence
) are used to render the pages more nicely in sphinx-based documentation with admonitions and tabs (setting properties either in steering file or from command line):Closes #212