How to Write Histogram in Root file with colz and log option:
This is how i’m trying
but my root file does not have the histo in colz and log option
it is just a simple 2D histogram
void point()
{
TString file = “out.root”;
TFile myfile = TFile::Open(file.Data());
TFile ou = new TFile(“qahist.root”,“recreate”);
ou->cd();
myfile->ls();
TH2F *f=(TH2F *)myfile->Get(“hNBTOFvsGRM”);
TCanvas *c1= new TCanvas();
c1->cd();
c1->SetLogz();
f->GetXaxis()->SetRange(0,200);
f->GetYaxis()->SetRange(0,400);
f->Draw(“colz”);
f->Write();
ou->Close();
}
Cheers
Please read tips for efficient and successful posting and posting code
ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided