I’m having issues getting ROOT to plot a simple histogram for this one piece of code. I can create the histogram, fit functions to it, save it and view it later, but for the life of me i can’t get it to plot when I run it using
root edge.C. It will only pop up an empty canvas.
The code at its most basic looks like:
void edge(){
gROOT->Reset();
TFile f("spectrums/windows_208Tl_part1__total.root");
TH1F *Compton=new TH1F("Compton","",9000,0,9000);
for(Int_t x=0;x<=9000;x++){
Compton->SetBinContent(x,NumPE_big->GetBinContent(x));
}
Compton->Draw();
}
I’m running on version 5.24 and this code did seem to be working before. Am I doing anything obviously wrong?