TString dir = gSystem->UnixPathName(gInterpreter->GetCurrentMacroName());
dir.ReplaceAll(“basic2.C”,"");
dir.ReplaceAll("/./","/");
TFile *f = new TFile(“data.root”,“RECREATE”); //create file data.root
TTree *T = new TTree(“tree”,“data from ascii file”);
Double_t nlines = T->ReadFile(Form("%soutampl.txt",dir.Data()),“cal:channel:amplitude:rms”);//create tree with cal:channel:amplitude:rms
printf(" found %lld points\n",nlines); //not needed so
//make graphs
tree->Draw(“amplitude:cal”,“channel==1”);
TGraph gr = new TGraph(tree->GetSelectedRows(),tree->GetV2(), tree->GetV1());
gr->SetName(“myGraph”);
gr->SetMarkerStyle(2);
gr->Draw("AC");
gr->Write();
T->Write();
}[/code]
In this line “tree->Draw(“amplitude:cal”,“channel==1”);” in cycle, i need to switch number of channel from 0 to 127
how can i to do it or i should make different way?
Thanks
Mikhail.