Hello
I posted a topic for how drawing a histogram for big file text
and i got this code
[code]{
TFile *f = TFile::Open(“MyData.root”, “RECREATE”);
TTree *t = new TTree(“t”, “My Data tree”);
t->ReadFile(“MyData.txt”, “tdc[10]/s:adc[10]/s”);
TH1F *h_tdc = new TH1F(“h_tdc”, “TDC histogram;tdc value;counts”,
4096, 0, 4096);
TH1F h_adc = new TH1F(“h_adc”, “ADC histogram;adc value;counts”,
4096, 0, 4096);
#if 1 / 0 or 1 /
t->Project(“h_tdc”, “tdc”);
t->Project(“h_adc”, “adc”);
#else / 0 or 1 /
t->Draw(“tdc >> h_tdc”, “”, “goff”);
t->Draw(“adc >> h_adc”, “”, “goff”);
#endif / 0 or 1 */
f->Write();
TCanvas *c = new TCanvas(“c”, “c”);
c->Divide(1, 2);
c->cd(1);
gPad->SetLogy(1);
h_tdc->Draw();
c->cd(2);
gPad->SetLogy(1);
h_adc->Draw();
c->cd(0);
}[/code]
Now i want to divide TDC to 5 in the right and 5 to the left and same for ADC
so i have to have 20 diagrams
Thanks
MyData.txt (674 KB)