star-fst-l AT lists.bnl.gov
Subject: Star-fst-l mailing list
List archive
- From: videbaek <videbaek AT bnl.gov>
- To: Star-fst L <star-fst-l AT lists.bnl.gov>
- Subject: [Star-fst-l] FstClusterMaker
- Date: Sun, 01 Oct 2023 10:53:24 -0400
Hi
I took a brief look at the code in FstClustermaker and found somecode that could cause a
memory leak.
The newcluster object is only added conditionally to the clustervec,
and thus is not deleted if this condition is not full filled.
The statement if(nToSeedHit>0)
could be moved up ahead of creating the newCluster object
line 137 + in StFstClusterMaker/StFstScanRadiusClusterAlgo.cxx
totCharge = tempSumCharge;
totChargeErr = sqrt(tempSumChargeErrSquare / nToMerge);
newCluster = new StFstCluster((int)wedge * 10000 + clusterLabel, disk, wedge, sensor, apv, meanRStrip, meanPhiStrip, totCharge, totChargeErr, clusterType);
newCluster->setNRawHits(clusterSize);
newCluster->setNRawHitsR(clusterSizeR);
newCluster->setNRawHitsPhi(clusterSizePhi);
newCluster->setMaxTimeBin(maxTb);
newCluster->setIdTruth(idTruth);
if(nToSeedhit>0) {
clustersVec[sensorIdx][phiIdx].push_back(newCluster);
clusterLabel++;
}
--
Flemming Videbaek
senior scientist, emeritus
videbaek @ bnl.gov
Brookhaven National Lab
Physics Department
Bldg 510D
Upton, NY 11973
phone: 631-344-4106
cell : 631-681-1596
-
[Star-fst-l] FstClusterMaker,
videbaek, 10/01/2023
- Re: [Star-fst-l] FstClusterMaker, Te-Chuan Huang, 10/01/2023
-
Re: [Star-fst-l] FstClusterMaker,
Te-Chuan Huang, 10/01/2023
-
Re: [Star-fst-l] FstClusterMaker,
Brandenburg, Daniel, 10/01/2023
- Re: [Star-fst-l] FstClusterMaker, Te-Chuan Huang, 10/01/2023
-
Re: [Star-fst-l] FstClusterMaker,
Brandenburg, Daniel, 10/01/2023
Archive powered by MHonArc 2.6.24.