I am trying to write a couple of histograms to a file using a macro similar to the one below but it doesnt seem to work… the following error message appears -
Error in TFile::TFile: file name is not specified
Warning in TFile::Write: file not opened in write mode
but i thought i have already specified the file name??
void ATP1() {
char *m_output_ntuple;
TFile *m_f = m_output_ntuple;
m_f = new TFile(m_output_ntuple,“NEW”);
TF1 *Fcn4 = new TF1(“Fcn4”,func1,0,3,1);
Fcn4->SetNpx(1000);
Double_t x, y;
y=Fcn4->GetMaximum(0.5,1.0);
x=Fcn4->GetMaximumX(0.5,1.0);
cout<<x;
cout<<" ";
cout<<y;
Fcn4->SetLineWidth(2);
Fcn4->SetLineColor(kMagenta);
m_f->Write();
m_f->Close();
}
thanks for all your help
Maki