// read data from BLMLHC_M Class post mortem data file // modified: // 16.11.2006 // Authors: M. Stockner, D. Kramer { gROOT->Reset(); gROOT->SetStyle("Plain"); gStyle->SetPalette(1); gROOT->ForceStyle(); TString folder = "./"; //TString filename = "PMData-20061116240802"; //Test period //TString filename = "PMData-20061116241132"; //TString filename = "PMData-20061116241230"; //TString filename = "PMData-20061116241245"; //TString filename = "PMData-20061116241300"; //Some data from here //TString filename = "PMData-20061116241323"; //TString filename = "PMData-20061116241334"; //TString filename = "PMData-20061116241348"; // Big losses //TString filename = "PMData-20061116241434"; //TString filename = "PMData-20061116241435"; //TString filename = "PMData-20061116241449"; //TString filename = "PMData-20061116241503"; //TString filename = "PMData-20061116241540"; //TString filename = "PMData-20061116241549"; //TString filename = "PMData-20061116241558"; //TString filename = "PMData-20061116241605"; //TString filename = "PMData-20061116241631"; //TString filename = "PMData-20061116241640"; //TString filename = "PMData-20061116241649"; //TString filename = "PMData-20061116241656"; //TString filename = "PMData-20061116241731"; //TString filename = "PMData-20061116241740"; //TString filename = "PMData-20061116241749"; //TString filename = "PMData-20061116241758"; //TString filename = "PMData-20061116241805"; //TString filename = "PMData-20061116241814"; //TString filename = "PMData-20061116241823"; //TString filename = "PMData-20061116241824"; //TString filename = "PMData-20061116241851"; //TString filename = "PMData-20061116241951"; //TString filename = "PMData-20061116242016"; //TString filename = "PMData-20061116242018"; //TString filename = "PMData-20061116242029"; //TString filename = "PMData-20061116242059"; //TString filename = "PMData-20061116242108"; //TString filename = "PMData-20061116242117"; //TString filename = "PMData-20061116242124"; //TString filename = "PMData-20061116242135"; //TString filename = "PMData-20061116242142"; //TString filename = "PMData-20061116242151"; //TString filename = "PMData-20061116242155"; //TString filename = "PMData-20061116242232"; //TString filename = "PMData-20061116242241"; //TString filename = "PMData-20061116242250"; //TString filename = "PMData-20061116242256"; //TString filename = "PMData-20061116242403"; //TString filename = "PMData-20061116242523"; //TString filename = "PMData-20061116242543"; //TString filename = "PMData-20061116242555"; //TString filename = "PMData-20061116242636"; //TString filename = "PMData-20061116242641"; //TString filename = "PMData-20061116242659"; //TString filename = "PMData-20061116242801"; cout << folder+filename <16) cout << "too many rows:" << x << endl; // else myarray[x][y] = atoi(next);// / 1024.; next = strtok (NULL, splitter); x++; } y++; //if(y>1000) break; } printf ("x: %d y: %d \n",x,y); // end of read ascii file into 2 dim matrix // results: // x ... ROWS, int // y ... LINES, int // myarray ... all data from file, double // for(int a=0;aSetFillColor(0); // myc->SetLogx(); // myc->SetLogy(); // myc->SetTickx(); // myc->SetTicky(); TMultiGraph *mg1 = new TMultiGraph(); // mg1->SetTitle("sensitivity of SPS ionization chamber"); TLegend *leg1 = new TLegend(0.906609,0.216102,0.978448,0.900424); leg1->SetFillColor(0); // double *tmparray = new double[y]; int markernb[] = {2,3,4,5,7,23,24,25,26,27,29}; int colornb[] = {2,3,4,6,7,8,9,22,28,29,36,42,45,46,}; double tmparray[y]; for(int i=0;iSetLineColor(a); gr->SetMarkerColor(a); // gr->SetMarkerStyle(markernb[a]); mg1->Add(gr); TString grname = Form("det%i",a); leg1->AddEntry(gr,grname,"lp"); } // mg1->SetMinimum(1e-6); // mg1->SetMaximum(2e-3); mg1->Draw("ALP"); mg1->SetTitle(filename); mg1->GetXaxis()->SetTitle("time [ms]"); // mg1->GetXaxis()->SetTitle("Sample"); mg1->GetXaxis()->SetRangeUser(0.,tmparray[y-2]); mg1->GetXaxis()->SetTitleOffset(1.1); mg1->GetYaxis()->SetTitle("counts + ADC"); mg1->GetYaxis()->SetTitleOffset(1.5); leg1->Draw(); }