Error in <HandleInterpreterException>

Dear GATE users and developers,
I’m going to run the command below in ROOT, but it does give me some errors. What do you think will fix this problem?
Any suggestion would be highly appreciated!

root [0] Singles->Draw(“energy”);

input_line_9:2:3: error: use of undeclared identifier ‘Singles’

Error in : Error evaluating expression (Singles->Draw(“energy”)).

Execution of your code was aborted.

Best regards,

Dear @mirdoraghimohammad ,

This is really a generic problem, not specific to ROOT. The error is

input_line_9:2:3: error: use of undeclared identifier ‘Singles’

This means you have not declared a variable Singles in your program. it’s like doing

int main(){

Instead of

int main(){
    auto myVar = create_var();

So somewhere in your application you must create the Singles object in order to use it.


1 Like

Dear Vincenzo,

Thank you so much for your reply. Actually I used the command yesterday and it worked well, but it caused this error today! I’m actually amazed why it causes this error! I understand it says Singles has not been defined in the app! When I use TBrowser t, Singles and their drawings can be visualized! By the way, thank you very much!


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.