Dear ROOT Users
I am trying to get the functional form of a Germanium pulse from TH1::GetFuntion() method
in ROOT but some how it is not working and giving the error
TFile *f = new TFile(filename);
TH1 *hI = (TH1*)f->Get("gated_Tr_1_1");
TF1 *f1 = (TF1*)hI->GetFunction("func");
cout<<f1<<endl;
f1->Draw(); // this line giving error
It says
0
Error: illegal pointer to class object f1 0x0 2344 current.C:33:
can anyone please help me what should be done ???