Log of /trunk/tree/treeplayer/src/TFriendProxyDescriptor.cxx
Parent Directory
Revision
9556 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Added
Tue Jul 20 09:40:19 2004 UTC (10 years, 6 months ago) by
brun
Original Path:
trunk/treeplayer/src/TFriendProxyDescriptor.cxx
File length: 3422 byte(s)
From Philippe:
This patch implements support for TTree Friend in the new TTree Proxy
mechanism (See releases notes of ROOT 4.00/08).
For example with the result of tutorials/treefriend.C and the macro print.C:
void print() {
cout << "Entry #" << fChain->GetReadEntry()
<< " and #" << TF.GetReadEntry() << " \t"
<< x << " "; // from the main tree
if (TF.GetReadEntry()>=0) cout << TF.x; // from the friend tree
else cout << "N/A";
cout << endl;
}
You can simply create a Proxy based TSelector with
T->MakeProxy("withfriend","print.C","","nohist");
Then use the resulting file (withfriend.h) as anyother
TSelector script. For example:
T->Process("withfriend.h+","",20);
Or you can generate a simple histogram 2 files fill.C and fillCut.C
root [5] .! cat fill.C
double fill() {
return x - TF.x;
}
root [6] .! cat fillCut.C
Bool_t fillCut() {
return TF.GetReadEntry()>=0;
}
and you can just do:
T->Draw("fill.C+","fillCut.C");
This form allows you to request diffs between any two revisions of this file.
For each of the two "sides" of the diff,
enter a numeric revision.