Hi Ilia,
Most of the time, one loops sequentially on the ntuple entries. However
a TNtuple, TTree allows direct access to any entry.
You can design an algorithm where you compute randomly the entry number to be
used or a set of random entries in your loop where you want to mix the entries.
Rene Brun
Ilia Ravinovich wrote:
>
> Hi experts,
>
> I have a created root N-tuple and and I have to calculate some variable
> using variables from mixed entries in the N-tuple. How I can do it in the
> following loop or using some different way ...
>
> Int_t nentries = (Int_t)ntuple_pair->GetEntries();
>
> cout << " Entries= " << nentries << endl;
>
> for (Int_t i=0;i<nentries;i++) {
> ntuple_pair->GetEntry(i);
> }
>
> Thanks,
>
> Ilia
>
> ************************************************************************
> * *
> * Ilia Ravinovich *
> * Department of Particle Physics PPE Division *
> * Weizmann Institute of Science Bld 892, 1D-015 *
> * Rehovot 76100 CERN, 1211 Geneva *
> * ISRAEL Switzerland *
> * *
> * PHONE : 972 8 9343187 41 22 7676437 *
> * FAX : 972 8 9466253 41 22 7677910 *
> * E-mail: Ilia.Ravinovich@weizmann.ac.il Ilia.Ravinovich@cern.ch *
> * *
> ************************************************************************
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:35 MET