{ gSystem->Load("../libData.so"); const Long64_t kFirstEvent = 128; TFile fr("../data/dataDSR4/Neurad_7_08_NEW.root"); // TFile fr("../data/dataDSR4/analysis_07_8.root"); // TFile fr("../data/dataDSR4/Neurad_081216_2NEW.root"); // TFile fr("../data/dataTektronix/exp18.root"); // TFile fr("../data/dataTektronix/analysisExp7.root"); TTree *tr = (TTree*)fr.Get("atree"); AEvent *event = new AEvent(); tr->SetBranchAddress("Ach0.",&event); TCanvas *c1 = new TCanvas("c1","test",10,10,1000,600); c1->Divide(2,2); Double_t Noise[500]; TH1F *histNoise[4]; TString var,con,histName; //TH1F *h1 = new TH1F("h1", "h1 title", 100, 0, 4.4); for (Int_t i=0;i<4;i++) { histName.Form("histNoise%d",i); histNoise[i] = new TH1F(histName.Data(),"Noise distribution",500,-0.003,0.003); tr->GetEntry(i+kFirstEvent); for(Int_t j = 100;j<600; j++) { // filling array with AmpPos Noise[j-100] = event->GetOnefAmpPos(j); histNoise[i]->Fill(Noise[j-100]); } c1->cd(i+1); histNoise[i]->Draw(); c1->Update(); } }