Gate
Gate copied to clipboard
jobsplitter with integer time values multiplies them by 10
Currently jobsplitter seems to multiply integer time values set setTimeSlice, setTimeStart and setTimeStop by 10 in the virtual versions because of this line and the other similar ones later on. Commenting that and the subsequent same conditionals give correct virtual times.
Desktop:
- OS: Ubuntu 22.04
- Gate version or commit hash: aeee4a9c047d02d85c79da71edb5f9f681d63aeb
- Geant4 version: 11.0.1
- Root version: 6.26.02
- compiler version: gcc 11.2.0
Minimal example:
/gate/application/setTimeSlice 1800 s
/gate/application/setTimeStart 0 s
/gate/application/setTimeStop 1800 s
Expected behavior: The virtual startTime and stopTimes should be inside the specified setTimeStart and setTimeStop. Currently, with the above example and 18 nSplits, the .split-file has the following virtual times in the last one:
Timeslice is: 1800 s
Start time is: 0 s
Stop time is: 1800 s
Virtual startTime: 17000 s
Virtual stopTime: 18000 s
Additional context If the dot is added to the above commands, i.e.
/gate/application/setTimeSlice 1800. s
/gate/application/setTimeStart 0. s
/gate/application/setTimeStop 1800. s
the virtual times are as expected. Why is the zero added in case of missing dot?
I believe, for example,
if (temp != '.') timeStart_str=timeStart_str+"0";
should be
if (temp != '.') timeStart_str=timeStart_str+".";
instead.