I want to calculate sig_TST for each event. But when I running the macro I have got the following error :
Error: Non-static-const variable in array dimension macro.c:67:
(cint allows this only in interactive command and special form macro which
is special extension. It is not allowed in source code. Please ignore
subsequent errors.)
Please could you help me how I can to fix this issue.
BTW. When you post “source code” or “output” here, do remember to enclose them into two lines which contain just three characters ``` (see how your post has been edited above).
Thank for your reply,
I changed Double_t sig_TST[nentries] with Double_t *sig_TST = new Double_t[nentries]. but when I running I have got the following error messages:
libGL error: failed to open drm device: No such file or directory
libGL error: failed to load driver: i965
Info in TCanvas::MakeDefCanvas: created default TCanvas with name c1
And also I have got a plot for sigma, but when I compared by ratio of TST_N and TST_V I noticed that there are some points are equal (TST_N = TST_V) so I expect Sigma= zero.
but the Sigma is not zero
Could you please explain me why I have this issue,
The statement “Double_t TST_Ntest, TST_Vtest;” defines ordinary variables, not tables / arrays. So, you must not use “TST_Ntest[i]” nor “TST_Vtest[i]”.
Always try to pre-compile your source code using ACLiC (the compiler will find many possible source code bugs) … root [0] .L MySourceCode.cxx++
root [0] root-config --cxx --cflags -O2 -Wall -Wextra -c MySourceCode.cxx
Error: Symbol root is not defined in current scope (tmpfile):1: Error: Symbol config is not defined in current scope (tmpfile):1: Error: Symbol cxx is not defined in current scope (tmpfile):1: Error: Symbol cflags is not defined in current scope (tmpfile):1:
Error: Symbol O2 is not defined in current scope (tmpfile):1:
Error: Symbol Wall is not defined in current scope (tmpfile):1:
Error: Symbol Wextra is not defined in current scope (tmpfile):1:
Error: Invalid type ‘c’ in declaration of ‘MySourceCode’ (tmpfile):1:
Error: Invalid type ‘c’ in declaration of ‘MySourceCode’ (tmpfile):1:
Error: Symbol c MySourceCode is not defined in current scope (tmpfile):1:
Error: Failed to evaluate c MySourceCode.cxx
(const int)0
*** Interpreter error recovered ***