I am trying to get display histograms from a root file in the following manner, but I get an error
[color=red]Warning in TClass::TClass: no dictionary for class TPaletteAxis is available[/color]
Googling for help hasn´t yielded any clues!!!
BUT as a script it works!!(removing int main())
[color=green]#include
//gROOT->Resest();
#include
#include <stdio.h>
#include <string.h>
#include <TH2.h>
#include <TH1.h>
#include <TStyle.h>
#include <TROOT.h>
#include <TCanvas.h>
#include <TKey.h>
#include <TFile.h>
#include <TF1.h>
#include <TLatex.h>
#include <TColor.h>
#include <TPaveLabel.h>
#include <TApplication.h>
void analyse_out();
int main()
{
analyse_out();
return 0;
}
void analyse_out() {
//TFile *outfile = gROOT->FindObject(“outfile.root”); if (outfile) outfile->Close();
TFile *file=new TFile("outfile.root");
TH2F *Histo_2Db = (TH2F*)file->Get("Histo_2Db");
TCanvas *MyCanvas1 = new TCanvas("MyCanvas1","Peak Reflectivity Map",10,10,700,500);
gPad->SetRightMargin(0.15);
gPad->SetLeftMargin(0.1);
gPad->SetTopMargin(0.1);
gPad->SetBottomMargin(0.1);
Histo_2Db->SetContour(100);
gStyle->SetPalette(1);
Histo_2Db->SetStats(kFALSE); // suppress statistics box
Histo_2Db->Draw("colz");
MyCanvas1->Draw();
MyCanvas1->Update();
}[/color]