48 T->Branch(
"Run",&Run,
"Run/I");
49 T->Branch(
"Event",&
Event,
"Event/I");
50 T->Branch(
"x",&
x,
"x/F");
51 T->Branch(
"y",&
y,
"y/F");
52 T->Branch(
"z",&z,
"z/F");
54 for (
Int_t i=0;i<10000;i++) {
55 if (i < 5000) Run = 1;
77 TTree *
TF = T->CopyTree(
"z<10");
79 TF->BuildIndex(
"Run",
"Event");
96 T->SetBranchAddress(
"Run",&Run);
97 T->SetBranchAddress(
"Event",&
Event);
98 T->SetBranchAddress(
"x",&
x);
99 T->SetBranchAddress(
"y",&
y);
100 T->SetBranchAddress(
"z",&z);
101 TF->SetBranchAddress(
"Run",&
fRun);
102 TF->SetBranchAddress(
"Event",&fEvent);
103 TF->SetBranchAddress(
"x",&
fx);
104 TF->SetBranchAddress(
"y",&
fy);
105 TF->SetBranchAddress(
"z",&
fz);
115 if (
TF->GetEntryWithIndex(Run,
Event) > 0) {
116 if (i <100)
printf(
"i=%lld, Run=%d, Event=%d, x=%g, y=%g, z=%g, : fRun=%d, fEvent=%d, fx=%g, fy=%g, fz=%g\n",i,Run,
Event,
x,
y,z,
fRun,fEvent,
fx,
fy,
fz);
120 printf(
"nok = %d, fentries=%lld\n",
nok,
TF->GetEntries());
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
A ROOT file is an on-disk file, usually with extension .root, that stores objects in a file-system-li...
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)
Create / open a file.
This is the base class for the ROOT Random number generators.
A TTree represents a columnar dataset.
virtual TFriendElement * AddFriend(const char *treename, const char *filename="")
Add a TFriendElement to the list of friends.