I see indeed, this is quite simillar to a map ! I will try to implement this idea.
What do you mean by performance figure a plot where I compare methods ? If yes, no I don’t have.
I will use this script in the context of PROOF environment. Basically everything will be parallelized.
Maybe I can share an example. (I took it from a previous thread and I modified it.)
Actually to be more precise, I will know the number of spill/run after reading the tree once.
Then I thing there are multiple methods to access it. I just wanted to know if someone has an idea of how to access it and if my method is not too bad…
In all case, thank you for your answers!
I’m looking forward to hearing from you
[code]void testv1() {
int n = 3;
Int_t run, spill, N, timeinspill;
TTree *tree = new TTree("tree", "Just a tree");
tree->Branch("run", &run, "run/i");
tree->Branch("spill", &spill, "spill/i");
tree->Branch("timeinspill", &timeinspill, "timeinspill/i");
cout << "prepare" << endl;
for (run = 0 ; run < n ; run++) for(spill = 1; spill < 201; spill++) {
if(spill%10 == 1) timeinspill = 1;
else if(spill%10 == 2) timeinspill = 2;
else if(spill%10 == 3) timeinspill = 3;
else timeinspill = 4;
cout << timeinspill << endl;
tree->Fill();
}
cout << "draw" << endl;
tree->SetEstimate(tree->GetEntries());
tree->Draw("run:spill", "", "goff");
Double_t *runlist = tree->GetV1();
Double_t *slist = tree->GetV2();
for(i = 0, N = tree->GetSelectedRows(); i < N; i++) {
TString selection = "run==" + TString::Itoa(runlist[i],10) + " && spill==" + TString::Itoa(slist[i],10);
cout << selection << endl;
tree->Draw("timeinspill", selection.Data(), "goff");
Double_t *timelist = tree->GetV1();
cout << TMath::MinElement(N,timelist) << " " << TMath::MaxElement(N,timelist) << endl;
}
}[/code]