Coder Social home page Coder Social logo

Comments (2)

tmadlener avatar tmadlener commented on July 23, 2024

Thanks for reporting this. Given that the ROOTReader and the EventStore are deprecated now, we will probably not fix these. However, a similar issue exists in the new Frame based readers as well, where the only check that exists with a "nice" exception is whether the file exists.

This doesn't fix anything for you, but the python bindings deal with this slightly better as we have implemented some functionality there for detecting this:

from podio.reading import get_reader
reader = get_reader("<filename>")
# ...

def get_reader(filename):
"""Get an appropriate reader for the passed file.
Args:
filename (str): The input file
Returns:
root_io.[Legacy]Reader, sio_io.[Legacy]Reader: an initialized reader that
is able to process the input file.
Raises:
ValueError: If the file cannot be recognized, or if podio has not been
built with the necessary backend I/O support
"""
if filename.endswith('.sio'):
if _is_frame_sio_file(filename):
return sio_io.Reader(filename)
return sio_io.LegacyReader(filename)
if filename.endswith('.root'):
if _is_frame_root_file(filename):
return root_io.Reader(filename)
return root_io.LegacyReader(filename)
raise ValueError('file must end on .root or .sio')

from podio.

tmadlener avatar tmadlener commented on July 23, 2024

Closing this since the EventStore based Readers and Writers have been removed in #485

from podio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.