Troubles with TTree::Draw and piping into histograms

Hi all,

The actual question is:
Is there a way to tell TTree::Draw not to create a canvas and draw the ntuple variable, but only to pipe the variable into a histo.

For more info please read on:
I am trying to pipe ntuple variables into a histogram and drawing the histo by using

myTree1->Draw(variable>>histo(100, -50, 50));
myHisto1->(TTree*)myTree1->Get(“CBNT/t3333”)
myHisto1->Draw()

The problem is the TTree::Draw command always opens a canvas to draw the histo (which it mostly should do), however if I want to access another variable and put it into another histo and I want to work on with these histos (normalize them, aso.) I cannot manage to draw them on top of each other.

The only way is to create a second canvas and use this one for the histos. This means that I always have two canvas pop up (one default from the TTree::Draw commands and the one for the histos).

Thanks
Andi

Sorry, the second line of my example is of course
myHisto = (TH1F*)gDirectory->Get(“histo”);

In TTree::Draw use drawing option "goff"
see doc of this function

Rene

… you are right, it is explained in the doc.

Thanks
Andi