root [ ] TFile *f = new TFile("lem02_0067.root");
root [ ] f->ls(); // lists the contents
root [ ] h401->Draw(); // plot the histogram h401
root [ ] h1->Dump(); // dumps information about Root Tree h1
root [ ] h1->GetEntries(); // shows the number of entries in h1
root [ ] TH1F *h401_root = new TH1F("h401_root", "lem02_0067", 1000, 0.5, 1000.5);
// creates histogram h401_root with title lem02_0067, 1000 channels, ranging from
// 0.5 to 1000.5
root [ ] h1->Show(11); // shows event 11
root [ ] h1->Draw("Tdc3[0]"); // draws the first entry of Tdc3[8] array
root [ ] h1->Draw("Tdc3[0]>>h401_root", "300<Tdc3[0] && Tdc3[0]<800", "lego", 1000, 100);
// plots Tdc3[0] data in user defined histogram h401_root, applies cuts 300<Tdc3[0]<800,
// do a lego plot, scan 1000 events and start at event 100.
root [ ] h1->Draw("Tdc3[0]:Tdc3[1]"); // 2D plot of Tdc3[0] versus Tdc3[1]
root [ ] h1->StartViewer(); // starts Tree viewer
root [ ] h1->MakeClass("lem02_0067_class"); // very useful to create macros for complex analysis
root [ ] h1->MakeSelector("lem02_0067_sel"); // very useful to create macros for complex analysis
// have a look on contents of lem02_0067_class.C and lem02_0067_sel.C
Directory stuff: if you have more than one file open then:
root [ ] gDirectory->pwd(); // prints current working directory
Rint:/
root [ ] TFile *f = new TFile("lem02_0067.root");
root [ ] gDirectory->pwd(); // prints current working directory
lem02_0067.root:/
root [ ] TFile *f1 = new TFile("lem03_0033.root");
root [ ] gDirectory->pwd(); // prints current working directory
lem03_0033.root:/
root [ ] f->cd(); // changes directory to lem02_0067.root
root [ ] gROOT->cd(); // returns to home directory