Min$(formula),Max$(formula):
return the minimun/maximum (within one TTree entry) of the value of the
elements of the formula given as a parameter.MinIf$(formula,condition),MaxIf$(formula,condition):
return the minimum (maximum) (within one TTree entry)
of the value of the elements of the formula given as a parameter
if they match the condition. If not element match the condition, the result is zero. To avoid the
the result is zero. To avoid the consequent peak a zero, use the
pattern:
tree->Draw("MinIf$(formula,condition)","condition");
which will avoid calculation MinIf$ for the entries that have no match
for the condition.if (tree->SetBranchAddress(mybranch,&myvar) < 0) {
cerr << "Something went wrong\n";
return;
}
The possible return values are:This function may be called after having filled some entries in a Tree using the information in the existing branch buffers, it will reassign new branch buffer sizes to optimize time and memory. The function computes the best values for branch buffer sizes such that the total buffer sizes is less than maxMemory and nearby entries written at the same time. In case the branch compression factor for the data written so far is less than compMin, the compression is disabled. if option ="d" an analysis report is printed.
This function may also be called on an existing Tree to figure out the best values given the information in the Tree header
TFile f("myfile.root"); TTree *T = (TTree*)f.Get("mytreename"); T->Print(); //show the branch buffer sizes before optimization T->OptimizeBaskets(10000000,1,"d"); T->Print(); //show the branch buffer sizes after optimization