Gate icon indicating copy to clipboard operation
Gate copied to clipboard

jobsplitter with integer time values multiplies them by 10

Open villekf opened this issue 2 years ago • 1 comments

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?

villekf avatar Jun 17 '22 11:06 villekf

I believe, for example,

if (temp != '.') timeStart_str=timeStart_str+"0";

should be

if (temp != '.') timeStart_str=timeStart_str+".";

instead.

villekf avatar Jun 17 '22 11:06 villekf