-
Notifications
You must be signed in to change notification settings - Fork 67
Open a custom ROOT object #168
Comments
Thanks for the sample file; I'll take a look as soon as I can (likely Monday). |
I looked into it. The serialization of I haven't been able to find any metadata in your file that says this byte should be missing— in fact, you even have the same TStreamerBasicPointer version as another file with the speed bumps. I can't change the logic universally because it would break all of those other cases, so the least I could do was offer a switch: you can explicitly turn off the speed bump byte, which lets you read your file. When PR #170 makes it through continuous integration and this fix is pushed to PyPI as uproot 3.2.6, you'll be able to do this: branch = t["MRawEvtData.fHiGainFadcSamples"]
samples = branch.array(branch.interpretation.speedbump(False)) That is, you're creating a new interpretation from the default The hint was that it's trying to read off the end of your data source by a single byte. It's starting one byte too far in. |
addresses issue #168: provide a way to skip speedbump bytes
Oh! And once you've read these objects in, you'll have to do samples[i]._fArray # for some index i to get at the array data. uproot doesn't know anything about the |
Amazing, this is actually working! |
The Oh! It could be the fact that these are private members of the C++ class, but the C++ class might hide some data in its public interface, especially if you normally get the data from a C++ method. Unfortunately, code isn't stored in the ROOT file for uproot to use in its interpretation. I'm glad it's working for you! |
I am trying to open a ROOT file (produced by MARS -- software to analyze data from the MAGIC telescopes) and then load a leaf into an array:
This produces the following error:
There should only be 2000 entries in this file for that leaf.
Do you have an idea, what the issue is? Thanks in advance for your time!
Link to the file:
https://nextcloud.e5.physik.tu-dortmund.de/index.php/s/zoiCwmmzWCxE9w3
The text was updated successfully, but these errors were encountered: