grand-mother / grand

Core package for GRAND aka GrandLib
https://grand-mother.github.io/grand-docs
GNU Lesser General Public License v3.0
4 stars 13 forks source link

Problem with negative values in sim2root #69

Closed jelenakhlr closed 7 months ago

jelenakhlr commented 1 year ago

sim2root seems to dislike negative values, but it needs to be able to handle them


Traceback (most recent call last): File "/home/grand/sim2root/CoREASRawRoot/../Common/sim2root.py", line 383, in main() File "/home/grand/sim2root/CoREASRawRoot/../Common/sim2root.py", line 75, in main rawefield2grandroot(trawefield, gt) File "/home/grand/sim2root/CoREASRawRoot/../Common/sim2root.py", line 361, in rawefield2grandroot gt.tefield.du_seconds=tempseconds File "/home/grand/grand/dataio/root_trees.py", line 186, in set inst += value File "/home/grand/grand/dataio/root_trees.py", line 133, in iadd if self.ndim == 1: value = array.array(cpp_to_array_typecodes[self.basic_vec_type], value) OverflowError: can't convert negative value to unsigned int Traceback (most recent call last): File "/home/grand/sim2root/CoREASRawRoot/coreas_pipeline.py", line 70, in subprocess.run(sim2root, check=True) File "/usr/lib64/python3.10/subprocess.py", line 526, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['python3', '../Common/sim2root.py', 'Coreas_006100.root']' returned non-zero exit status 1.

jelenakhlr commented 1 year ago

See commit b417c59 on dev_io_root - I might have fixed the issue, but it would be good if someone could double check @mjtueros @lwpiotr

mjtueros commented 7 months ago

this looks to be working now