+ c->SetGrid();
+ h->Draw();
+ c->SaveAs(Form("%s%s.png",c->GetName(),textleg.Data()));
+ }
+
+ TCanvas* cst=new TCanvas("cst","Stat");
+ cst->SetGridy();
+ cst->cd();
+ hstat->Draw("htext0");
+ cst->SaveAs(Form("%s%s.png",hstat->GetName(),textleg.Data()));
+
+ listname="countersCentrality";
+
+ isRead=ReadFile(list,hstat,listname,partname,path);
+ if(!isRead) return;
+ if(!list || !hstat){
+ cout<<":-( null pointers..."<<endl;
+ return;
+ }
+ for(Int_t i=0;i<list->GetEntries();i++){
+ AliCounterCollection* coll=(AliCounterCollection*)list->At(i);
+
+ coll->SortRubric("run");//sort by run number
+ //coll->PrintKeyWords();
+ Int_t ncentr=10;//check this
+ TH1F* h020=0x0;
+ TH1F* h2080=0x0;
+ TCanvas *ccent=new TCanvas(Form("ccent%s",coll->GetName()),Form("Centrality vs Run (%s)",coll->GetName()),1400,800);
+ ccent->Divide(5,3);
+
+ for(Int_t ic=0;ic<ncentr;ic++){
+
+ TH1F* h=(TH1F*)coll->Get("run",Form("centralityclass:%d_%d",ic*10,ic*10+10));
+ h->SetName(Form("h%d%d",i,ic));
+ if(ic>=0 && ic<=1){ //0-20
+ if(!h020) {
+ h020=(TH1F*)h->Clone(Form("h020%s",coll->GetName()));
+ h020->SetTitle(Form("Centrality 0-20 %s",coll->GetName()));
+ }
+ else h020->Add(h);
+ }
+ if(ic>=2 && ic<=7){ //20-80
+ if(!h2080) {
+ h2080=(TH1F*)h->Clone(Form("h2080%s",coll->GetName()));
+ h2080->SetTitle(Form("Centrality 20-80 %s",coll->GetName()));
+ }
+ else h2080->Add(h);
+ }
+
+ ccent->cd(ic+1);
+ h->DrawClone();
+ // ccent->cd(1);
+ // h->SetLineColor(ic+1);
+ // if(ic==0)h->DrawClone();
+ // else h->DrawClone("sames");
+ }
+
+ ccent->cd(ncentr+1);
+ h020->DrawClone();
+
+ ccent->cd(ncentr+2);
+ h2080->DrawClone();
+
+ ccent->SaveAs(Form("%s%s.png",ccent->GetName(),textleg.Data()));