When I compile (.L MyTree.C++) and run this code:
void MyTree::Plots(){
TCanvas* c1 = new TCanvas("A","A");
fChain->Draw("A");
TCanvas* c2 = new TCanvas("B","B");
c2->Divide(4,1);
c2->cd(1);fChain->Draw("b[0]);
c2->cd(2);fChain->Draw("b[1]);
c2->cd(3);fChain->Draw("b[2]);
c2->cd(4);fChain->Draw("b[3]);
TCanvas* c3 = new TCanvas("C","C");
fChain->Draw("C");
}
the first thing that happens is that the canvas are created. Now I wonder how Draw() works behind the scenes. Is the tree/chain passed through for each call to TTree::Draw()? If yes, what is the best way to pass through the tree only once (without changing the code too much)?