Skip to content

Support RNTuple-based EDM4hep output from standalone executables - #159

Merged
jmcarcell merged 3 commits into
key4hep:mainfrom
kjvbrt:support-rntuple-output
Jul 26, 2026
Merged

Support RNTuple-based EDM4hep output from standalone executables#159
jmcarcell merged 3 commits into
key4hep:mainfrom
kjvbrt:support-rntuple-output

Conversation

@kjvbrt

@kjvbrt kjvbrt commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Switch the standalone Delphes-to-EDM4hep executables from a hardcoded podio::ROOTWriter to podio::makeWriter(), so any of them can write RNTuple-based files by setting PODIO_DEFAULT_WRITE_RNTUPLE=1 instead of the default TTree-based file, with no other usage change.

Link podio::podioIO instead of podio::podioRootIO since makeWriter() lives in libpodioIO.so, and document the new env var in each executable's --help text.

Switch the standalone Delphes-to-EDM4hep executables from a hardcoded
podio::ROOTWriter to podio::makeWriter(), which lets any of them write
RNTuple-based files by setting PODIO_DEFAULT_WRITE_RNTUPLE=1 instead of
a TTree-based file, without any other change in usage.
@jmcarcell

jmcarcell commented Jul 22, 2026

Copy link
Copy Markdown
Member

It would be better if an argument could be passed to the executables for choosing rntuple since makeWriter takes it (for example in https://github.com/AIDASoft/podio/blob/master/tests/root_io/write_interface_rntuple.cpp#L4). I say this because an env variable can a bit sneaky and one may not get the behaviour that one wants. Basically by passing "default" to makeWriter the env variable can be used but a switch to override whatever the value of the env variable may be good (then the command doesn't depend on the environment).

Addresses review feedback on PR key4hep#159: pass the writer type through to
podio::makeWriter() based on an optional --rntuple flag (checked anywhere
in argv and stripped before the reader's positional parsing), rather than
only relying on the PODIO_DEFAULT_WRITE_RNTUPLE environment variable.
@kjvbrt

kjvbrt commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

Good point, added a --rntuple flag that gets passed through to podio::makeWriter(); the env var still works as a fallback default.

@kjvbrt

kjvbrt commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

Note there's currently no --root flag to force TTree explicitly, so if PODIO_DEFAULT_WRITE_RNTUPLE is set globally, the only way to force TTree per-run right now is to unset that env var for the invocation. Maybe not really needed :)

@jmcarcell
jmcarcell merged commit e3d91bc into key4hep:main Jul 26, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants