Skip to content

feat: add generic EVIO+HIPO reader service#1256

Open
baltzell wants to merge 3 commits into
developmentfrom
clas12reader
Open

feat: add generic EVIO+HIPO reader service#1256
baltzell wants to merge 3 commits into
developmentfrom
clas12reader

Conversation

@baltzell
Copy link
Copy Markdown
Collaborator

@baltzell baltzell commented May 12, 2026

This Clas12Reader is EvioToEvioReader + HipoToHipoReader, currently chosen at runtime based on .hipo file suffix. This will become useful with the (multi-threaded) DecoderEngine in #1229.

The previous Clas12Reader was DecoderReader + HipoToHipoReader. That was a bit confusing and could be restored with a different name, probably Clas12Decoder fits.

@baltzell baltzell changed the title feat: add EVIO/HIPO reader service, no decoding feat: add generic EVIO/HIPO reader service May 12, 2026
@baltzell baltzell marked this pull request as ready for review May 12, 2026 15:20
@baltzell baltzell added the speed label May 12, 2026
@baltzell baltzell changed the title feat: add generic EVIO/HIPO reader service feat: add generic EVIO+HIPO reader service May 12, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new CLARA I/O service (Clas12Reader) intended to read either EVIO or HIPO files and forward events unchanged, selecting the backend reader based on the input filename suffix. This is positioned as a simpler replacement for the prior “DecoderReader + HipoToHipoReader” behavior and a building block for the upcoming multi-threaded decoding work (see #1229).

Changes:

  • Introduces org.jlab.io.clara.Clas12Reader to read EVIO via EvioSource or HIPO via HipoReader and expose the corresponding EngineDataType.
  • Adds a CLARA service descriptor Clas12Reader.yaml.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
common-tools/clara-io/src/main/java/org/jlab/io/clara/Clas12Reader.java New generic EVIO/HIPO reader service with suffix-based backend selection and event passthrough.
common-tools/clara-io/src/main/resources/org/jlab/io/clara/Clas12Reader.yaml Registers the new Clas12Reader service for CLARA deployment.
Comments suppressed due to low confidence (1)

common-tools/clara-io/src/main/java/org/jlab/io/clara/Clas12Reader.java:70

  • There is dead/commented-out code returning an EvioDataEvent, and the EvioDataEvent import becomes unused. Please remove the commented line (and the unused import) to avoid confusion about the intended EVIO payload type.
                return ((EvioSource)reader).getEventBuffer(eventNumber, true);
                //return new EvioDataEvent(b.array(), readByteOrder());
            }

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread common-tools/clara-io/src/main/java/org/jlab/io/clara/Clas12Reader.java Outdated
Comment thread common-tools/clara-io/src/main/java/org/jlab/io/clara/Clas12Reader.java Outdated
baltzell and others added 2 commits May 12, 2026 19:11
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants