CERN/ROOT tips
Compiling with GCC
I could compile "foo.cxx" with GCC in online:
$ gcc $(root-config --cflags --libs) -o foo foo.cxx
EventList to make faster reading from TTree
This is original site: Masuoka's web site "To make tree wit gating by TEventlist".
TTree *tr = (load some tree);
tr->Draw(">> _good", TCut("some cut"));
TEventList *evlist = gDirectory->Get("_good");
tr->SetEventList(evlist);
tr->Draw("var0");
tr->Draw("var1");
This is same with:
TTree *tr = (load some tree);
tr->Draw("var0", TCut("some cut"));
tr->Draw("var1", TCut("some cut"));