Hi
I have a root file with a collection of root histograms.
The file is result of merge of several files with histograms
and I want to do some manupilation on te histograms and write the result
to a new root file. When I write the TH1 histograms to file I first set the “G” Draw option
but this doesn work. When I view the resulting root file with TBrowser
the scales are still linear.
The code looks somethng like this
TFile *inHistoFile = new TFile(inFileName);
TFile *outHistoFile = new TFile(outFileName);
for (all histograms in file)
{
.... make tmpFilename and do
hist = (TH1F *)inHistoFile->Get(tmpHistoName);
hist->SetDrawOption("G");
list->Add(hist);
outHistoFile->cd()
hist->Write();
inHistoFile->cd();
}
}
The root macro I use is attached, and the file I try to read can be found here
folk.uio.no/perthi/alice/doc/output.root
Does anybody know how to view histograms in TBrowser with logarithmic scales ?
inspect.C (2.32 KB)