- Small fixes to histogram memory software
- Added simulation directories and instruments
This commit is contained in:
@@ -841,13 +841,13 @@
|
||||
yPos = (yPos - 2048)/psdYFactor;
|
||||
|
||||
|
||||
if(xPos < 0 || xPos > psdXSize)
|
||||
if(xPos < 0 || xPos >= psdXSize)
|
||||
{
|
||||
printf("X position out of range: %d, alllowed 0 - %d\n",
|
||||
xPos, psdXSize);
|
||||
continue;
|
||||
}
|
||||
if(yPos < 0 || yPos > psdYSize)
|
||||
if(yPos < 0 || yPos >= psdYSize)
|
||||
{
|
||||
printf("Y position out of range: %d, alllowed 0 - %d\n",
|
||||
yPos, psdYSize);
|
||||
@@ -893,6 +893,11 @@
|
||||
printf("Matched time stamp %d into bin %d\n", iTime,middl);
|
||||
}
|
||||
|
||||
if(middl >= Tof_edges[0]->n_bins){
|
||||
middl = Tof_edges[0]->n_bins-1;
|
||||
printf("WARNING: Fixed bad time bin!\n");
|
||||
}
|
||||
|
||||
/*
|
||||
calculate histogram position to update
|
||||
*/
|
||||
@@ -959,12 +964,10 @@
|
||||
counting at 1, and ANSI-C at 0
|
||||
*/
|
||||
edNum = edData.ui2[1] - 1;
|
||||
/*
|
||||
if(edNum < 0 || edNum >= MAX_PSD_ED){
|
||||
printf("Got invalid detector number %d\n",edNum);
|
||||
printf("Got invalid single detector number %d\n",edNum);
|
||||
continue;
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
Extract time stamp and match to the appropriate time bin.
|
||||
@@ -1005,6 +1008,11 @@
|
||||
printf("Matched time stamp %d into bin %d\n", iTime,middl);
|
||||
}
|
||||
|
||||
if(middl >= Tof_edges[0]->n_bins){
|
||||
middl = Tof_edges[0]->n_bins-1;
|
||||
printf("WARNING: Fixed bad time bin for single detector!\n");
|
||||
}
|
||||
|
||||
/*
|
||||
calculate histogram position to update
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user