Skip to content

Commit

Permalink
fix link, fix missing determiners, remove paragraph of algortihms/ser…
Browse files Browse the repository at this point in the history
…vice coupled with legacy io

Co-authored-by: jmcarcell <[email protected]>
  • Loading branch information
m-fila and jmcarcell committed Dec 19, 2024
1 parent fe93da5 commit 2ccd907
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# k4FWCore (key4hep FrameWork Core)

k4FWCore is a Gaudi package that provides the IOSvc, which allows to
use podio-based event data models like EDM4hep in Gaudi workflows.
use EDM4hep in Gaudi workflows.

k4FWCore also provides the `k4run` script used to run Gaudi steering files. See the [documentation](doc/k4run-args.md) for more information.

Expand All @@ -26,7 +26,7 @@ Algorithm merging multiple collections of the same type into a single collection

### EventHeaderCreator

Algorithm creating new `edm4hep::EventHeaderCollection` data object.
Algorithm creating a new `edm4hep::EventHeaderCollection` data object.

### EventCounter

Expand Down
4 changes: 2 additions & 2 deletions doc/LegacyPodioInputOutput.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
# Legacy reading and writing EDM4hep files in Gaudi with the legacy k4DataSvc
# Legacy reading and writing EDM4hep files in Gaudi with the 4DataSvc

:::{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).
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](PodioInputOutput.md).
:::

This page will describe the usage of legacy [k4FWCore](https://github.com/key4hep/k4FWCore)
Expand Down
12 changes: 4 additions & 8 deletions doc/PodioInputOutput.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The facilities to read and write EDM4hep (or in general event data models based

## Accessing event data

`IOSvc` is an external Gaudi service for reading and writing EDM4hep and other PODIO-based data models. The service should be imported from `k4FWCore` and named "IOSvc" as other components may look for it under this name.
`IOSvc` is an external Gaudi service for reading and writing EDM4hep files. The service should be imported from `k4FWCore` and named "IOSvc" as other components may look for it under this name.

```python
from k4FWCore import IOSvc
Expand All @@ -46,7 +46,7 @@ ApplicationMgr(

### Reading events

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 EDM4hep ROOT files. Both files written with the ROOT TTree or RNTuple backend are supported with the backend inferred automatically from the files themselves.

The `Input` property can be used to specify the input. The `IOSvc` will not read any files unless the `Input` property is specified.

Expand Down Expand Up @@ -117,7 +117,7 @@ k4run <steering-file> --IOSvc.CollectionNames "MCParticles" "SimTrackerHits"

### Writing events

The `IOSvc` supports writing PODIO-based data-models such as EDM4hep to the ROOT output. The `Output` property can be used to specify the output. The `IOSvc` will not write any files unless the `Output` property is specified.
The `IOSvc` supports writing EDM4hep to the ROOT output. The `Output` property can be used to specify the output. The `IOSvc` will not write any files unless the `Output` property is specified.

::::{tab-set}
:::{tab-item} Python
Expand Down Expand Up @@ -179,7 +179,7 @@ k4run <steering-file> --IOSvc.outputCommands \

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.
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.

Unlike event data, metadata is not exposed to users through the Gaudi TES and cannot be accessed directly by algorithms in the same way. Instead, handling metadata is encapsulated within the algorithm implementation itself. For more details on how this is managed, refer to the developer documentation.

Expand Down Expand Up @@ -229,7 +229,3 @@ ApplicationMgr(
```

Both functional algorithms and classic algorithms are compatible with either `IOSvc` or `PodioDataSvc`.

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.

If you encounter an algorithm or service that seems to be incompatible `IOSvc`, please open an issue in the bugtracker to report it for further investigation.

0 comments on commit 2ccd907

Please sign in to comment.