Closed pietro14 closed 9 months ago
Ciao! One line was enough to make it work? I am also confused on how an h5 file can be downloaded by functions which look for .root ones. Do you have any idea why this is possible?
Yes, I was able to make it work with just that line.
By the way, this commit was not related to the issue we discussed on Discord a few days ago. I solved that problem by fetching the code.
Also note that that part of the code doesn't download any h5 file. The pedestal is always a root file.
Without this change, the error I was getting was this (during the computation of the pedestal map):
Traceback (most recent call last):
File "reconstruction.py", line 632, in <module>
ana = analysis(options)
File "reconstruction.py", line 46, in __init__
self.calcPedestal(options,1)
File "reconstruction.py", line 177, in calcPedestal
sigrun,tmpdir,tag = self.tmpname
ValueError: too many values to unpack (expected 3)
No ok but how the swiftlib functions which look for root data download h5 ones? Are you just using them locally?
Yes, I am just using h5 files in local
Ok, the error was connected to the fact that the midas and root/h5 have different ways to get tmpname. In general though the code does not absolutely work for h5. only when the file is already in a local folder. So for a PR with this name all the rest should be adapted. If you are not interested in doing it, I suggest to close the PR and at a certain point someone will do it. I will implement this small fix you added as a minor bug correction.
I've expanded the condition to also include the case where
options.rawdata_tier
is equal to 'h5'. Everything runs smoothly.