Commit 738d209a authored by dino's avatar dino
Browse files

Check length of ancillary raw buffer in TrackingFilter.cpp

git-svn-id: svn://gal-serv.lnl.infn.it/agata/trunk/narval_emulator@1114 170316e4-aea8-4b27-aad4-0380ec0519c9
parent b106f140
......@@ -747,6 +747,14 @@
RelativePath="..\..\agaprodep\adf\DataHandling.h"
>
</File>
<File
RelativePath="..\..\agaprodep\adf\DefaultFrameFactory.cpp"
>
</File>
<File
RelativePath="..\..\agaprodep\adf\DefaultFrameFactory.h"
>
</File>
<File
RelativePath="..\..\agaprodep\adf\DefaultKeyFactory.cpp"
>
......
......@@ -1132,7 +1132,7 @@ void TrackingFilter::GetDataRaw()
}
else {
// decoding of other formats
numRawItems = 6; // the 6 extra values present in data:ranc1
numRawItems = 0; // the 6 extra values present in data:ranc1
len_rawBuf = 0; // used for the root tree
has_rawBuf = 0; // used for the root tree
}
......@@ -1236,23 +1236,25 @@ int TrackingFilter::PreProcessEvent()
return 1;
if(fAncillary && hasAncillary) {
if(fRecoiling) {
rVx = rawBuf[numRawItems-3 + 0];
rVy = rawBuf[numRawItems-3 + 1];
rVz = rawBuf[numRawItems-3 + 2];
rVc = rVx*rVx+rVy*rVy+rVz*rVz;
if(rVc) {
rVc = (float)sqrt(rVc);
rVx /= rVc;
rVy /= rVc;
rVz /= rVc;
if(numRawItems>=6) {
if(fRecoiling) {
rVx = rawBuf[numRawItems-3 + 0];
rVy = rawBuf[numRawItems-3 + 1];
rVz = rawBuf[numRawItems-3 + 2];
rVc = rVx*rVx+rVy*rVy+rVz*rVz;
if(rVc) {
rVc = (float)sqrt(rVc);
rVx /= rVc;
rVy /= rVc;
rVz /= rVc;
}
}
aPx = rawBuf[numRawItems-6 + 0];
aPy = rawBuf[numRawItems-6 + 1];
aPz = rawBuf[numRawItems-6 + 2];
if( !AnalysisGeAncillary() )
return 1;
}
aPx = rawBuf[numRawItems-6 + 0];
aPy = rawBuf[numRawItems-6 + 1];
aPz = rawBuf[numRawItems-6 + 2];
if( !AnalysisGeAncillary() )
return 1;
}
#ifdef TFR_WRITE_HITS_MGT
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment