I am using TPaveStats for getting more than one stat box. I wrote the program to plot histogram in compareQuantities.C (attached) and running this from another file Compare_Mad_Phantom.C (attached) but when I plot first histogram there was no error but as I am trying to get 2 histogram at once I am getting error saying:
Error: illegal pointer to class object statsbox1 0x0 2189 compareQuantities.C:56:
*** Interpreter error recovered ***
Also I am facing one more problem at the end of program compareQuantities.C, I am using Draw() function but instead of Draw() when I used DrawNormalized() then 2nd Stat box disappears.
Please suggest what I am doing wrong.