void AliL3Histogram::Draw(Char_t *option)
{
#ifdef use_root
- fRootHisto = new TH2F(fName,"",fNxbins,fXmin,fXmax,fNybins,fYmin,fYmax);
+ if(!fRootHisto)
+ CreateRootHisto();
for(Int_t bin=0; bin<fNcells; bin++)
{
fRootHisto->AddBinContent(bin,GetBinContent(bin));
cerr<<"AliL3Histogram::Draw : You need to compile with ROOT in order to draw histogram"<<endl;
}
+
+void AliL3Histogram::CreateRootHisto()
+{
+#ifdef use_root
+ fRootHisto = new TH2F(fName,"",fNxbins,fXmin,fXmax,fNybins,fYmin,fYmax);
+ return;
+#endif
+ cerr<<"AliL3Histogram::CreateRootHisto : You need to compile with ROOT in order to create ROOT histogram"<<endl;
+}
void Add(AliL3Histogram *h1,Double_t weight=1);
void SetThreshold(Int_t i) {fThreshold = i;}
void Draw(Char_t *option="hist");
+ void CreateRootHisto();
#ifdef use_root
TH2F *GetRootHisto();