Hi,
I’m writing a macro that uses a 2D array. But the program just stops when declaring the array. There’s no error or seg fault message. This is how I start the macro:
root -q ‘analysis/particleIDAnl/findLightSpread.C++(,,size)’
Here’s the relevant code:
[code]
// headers
void findLightSpread(const char* infile, const char* outfile, const int size) {
…
const int fiberNum = 768;
const int numOfVoxels = sizesizesize;
Double_t totalPE[fiberNum][numOfVoxels];
for(int i=0;i<numOfVoxels;i++)
for(int j=0; j<fiberNum;j++)
totalPE[i][j] = 0;
…
}[/code]
The macro stops at the line: Double_t totalPE[fiberNum][numOfVoxels];
Here’s the output. The warnings are due to the header files:
[quote]-bash-3.2$ root -q 'analysis/particleIDAnl/findLightSpread.C++(“scibathMC/output/Ialpha_1.root”,“analysis/particleIDAnl/spreadFun1.root”,16)'
Loading SciBath Root Utilities
include path: -I/usr/local/share/cern/root/5.27.02/include -I/nfs/festus/home/lorebeni/ScibathCode/scibathAnl/install/include
root [0]
Processing analysis/particleIDAnl/findLightSpread.C++(“scibathMC/output/Ialpha_1.root”,“analysis/particleIDAnl/spreadFun1.root”,16)…
Info in TUnixSystem::ACLiC: creating shared library /nfs/festus/home/lorebeni/ScibathCode/scibathAnl/./analysis/particleIDAnl/findLightSpread_C.so
/nfs/festus/home/lorebeni/ScibathCode/scibathAnl/install/include/SBHitInformation.h:40: warning: unused parameter ‘i’
/nfs/festus/home/lorebeni/ScibathCode/scibathAnl/install/include/SBClasses.h:55: warning: unused parameter ‘i’
-bash-3.2$
[/quote]
There’s supposed to be an output file, but that file is not created, so I know the program is stopping at that line. What would cause this?
reben