You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On MacOSX, I get the following warnings and errors when trying to compile hcana with the new raster classes:
g++ -o src/THcRaster.os -c -O -Wall -Woverloaded-virtual -pthread -pthread -m64 -stdlib=libc++ -fPIC -fPIC -DNDEBUG -DMACVERS -DHAS_SSTREAM -DHALLC_MODS -Isrc -Ipodd/src -Ipodd/hana_decode -Ipodd/hana_scaler -I/Users/brash/Dropbox/root/include src/THcRaster.cxx
In file included from src/THcRaster.cxx:14:
src/THcRaster.h:30:42: warning: array index 2 is past the end of the array (which contains 2 elements) [-Warray-bounds]
TVector3 GetPosition() const { return fPosition[2]; }
^ ~
src/THcRaster.h:52:3: note: array 'fPosition' declared here
TVector3 fPosition[2]; // Beam position at 1st, 2nd BPM or at the target (meters)
^
src/THcRaster.cxx:61:3: error: cannot delete expression of type 'Double_t [2]'
delete [] fPedADC;
^ ~~~~~~~
src/THcRaster.cxx:62:3: error: cannot delete expression of type 'Double_t [2]'
delete [] fAvgPedADC;
^ ~~~~~~~~~~
1 warning and 2 errors generated.
scons: *** [src/THcRaster.os] Error 1
scons: building terminated because of errors.
The error traces to the THcRaster destructor ... commenting out the two delete statements allows hcana to compile, but may cause runtime errors I suppose. I wonder why fPedADC and fAvgPedADC are defined at Double_t types in the first place ...
I also note that the warning appears to be a serious one ... fPosition is indeed defined to be an array of size 2, and so in principle only fPosition[0] and fPosition[1] are meaningful.
As I don't really understand at this point any of the raster code, I won't attempt a fix ... just raising this issue for Buddhini's benefit.
The text was updated successfully, but these errors were encountered:
On MacOSX, I get the following warnings and errors when trying to compile hcana with the new raster classes:
g++ -o src/THcRaster.os -c -O -Wall -Woverloaded-virtual -pthread -pthread -m64 -stdlib=libc++ -fPIC -fPIC -DNDEBUG -DMACVERS -DHAS_SSTREAM -DHALLC_MODS -Isrc -Ipodd/src -Ipodd/hana_decode -Ipodd/hana_scaler -I/Users/brash/Dropbox/root/include src/THcRaster.cxx
In file included from src/THcRaster.cxx:14:
src/THcRaster.h:30:42: warning: array index 2 is past the end of the array (which contains 2 elements) [-Warray-bounds]
TVector3 GetPosition() const { return fPosition[2]; }
^ ~
src/THcRaster.h:52:3: note: array 'fPosition' declared here
TVector3 fPosition[2]; // Beam position at 1st, 2nd BPM or at the target (meters)
^
src/THcRaster.cxx:61:3: error: cannot delete expression of type 'Double_t [2]'
delete [] fPedADC;
^ ~~~~~~~
src/THcRaster.cxx:62:3: error: cannot delete expression of type 'Double_t [2]'
delete [] fAvgPedADC;
^ ~~~~~~~~~~
1 warning and 2 errors generated.
scons: *** [src/THcRaster.os] Error 1
scons: building terminated because of errors.
The error traces to the THcRaster destructor ... commenting out the two delete statements allows hcana to compile, but may cause runtime errors I suppose. I wonder why fPedADC and fAvgPedADC are defined at Double_t types in the first place ...
I also note that the warning appears to be a serious one ... fPosition is indeed defined to be an array of size 2, and so in principle only fPosition[0] and fPosition[1] are meaningful.
As I don't really understand at this point any of the raster code, I won't attempt a fix ... just raising this issue for Buddhini's benefit.
The text was updated successfully, but these errors were encountered: