bug in photon finder and memory leak corrected

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorCalibration@19 113b152e-814d-439b-b186-022a431db7b5
This commit is contained in:
bergamaschi
2014-01-20 13:47:10 +00:00
parent 0d0b1fd389
commit df64805059
2 changed files with 45 additions and 28 deletions

View File

@ -232,20 +232,20 @@ class singlePhotonDetector {
} else if (eventMask[iy][ix]==PHOTON) {
if (cluster->get_data(0,0)>=max) {
for (int ir=-(clusterSizeY/2); ir<(clusterSizeY/2)+1; ir++) {
for (int ic=-(clusterSize/2); ic<(clusterSize/2)+1; ic++) {
eventMask[iy][ix]=PHOTON_MAX;
/* for (int ir=-(clusterSizeY/2); ir<(clusterSizeY/2)+1; ir++) { */
/* for (int ic=-(clusterSize/2); ic<(clusterSize/2)+1; ic++) { */
if ((iy+ir)>=0 && (iy+ir)<ny && (ix+ic)>=0 && (ix+ic)<nx) {
if (eventMask[iy+ir][ix+ic]==UNDEFINED)
if (ir==0 && ic==0) eventMask[iy+ir][ix+ic]=PHOTON_MAX;
else eventMask[iy+ir][ix+ic]=NEIGHBOUR;
}
/* if ((iy+ir)>=0 && (iy+ir)<ny && (ix+ic)>=0 && (ix+ic)<nx) { */
/* if (eventMask[iy+ir][ix+ic]==UNDEFINED) */
/* eventMask[iy+ir][ix+ic]=NEIGHBOUR; */
/* } */
}
}
/* } */
/* } */
}
}
} else if (eventMask[iy][ix]==PEDESTAL) {
if (cm==0)
addToPedestal(det->getValue(data, ix, iy),ix,iy);