Drawing a TTree entry multiple times?

Hi,

Is it possible to draw an entry in a TTree multiple times, increasing the Iteration$ variable each
time? The application of that is that I would like to draw a number of quantities for each entry that depend on the same tree variable, so something like

TTree t;
Int_t a;
t.Branch(“a”,&a,“a/I”);

t.Fill();

t.Draw(“myFunction(a,Iteration$)”);

where Iteration should run between 0 and, say, 1000 on the same entry.

Obviously in the above example there will only be 1 iteration. A solution would be to
make a an array and fill all 1000 elements of the array with the same value but that would be
very inefficient in terms of CPU time and memory.
Is there a more efficient way of doing this?

Thank you,

Martin

Hi,

The most efficient would be to write a sample script:// Start of file myfunction.C void myfunction() { for(int i=0; i<1000;++i) htemp->Fill(a); } // End of file myfunction.Cand dot.Draw("myfunction.C");
Cheers,
Philippe