+
+ for(Int_t chip=0; chip<kNChip; chip++) {
+
+ nevent = (Int_t)histXchip[chip]->GetEntries();
+ if(nevent!=kNHisto)
+ {AliWarning("ReadHistosFromFile: trying to read too many or too few histos!"); return kFALSE;}
+ histXchip[chip]->SetAddress(&h);
+ for(Int_t j=0;j<kNHisto;j++){
+ histXchip[chip]->GetEntry(j);
+ fHisResXchip[j][chip]->Add(h);
+ }
+
+ nevent = (Int_t)histZchip[chip]->GetEntries();
+ if(nevent!=kNHisto)
+ {AliWarning("ReadHistosFromFile: trying to read too many or too few histos!"); return kFALSE;}
+ histZchip[chip]->SetAddress(&h);
+ for(Int_t j=0;j<kNHisto;j++){
+ histZchip[chip]->GetEntry(j);
+ fHisResZchip[j][chip]->Add(h);
+ }
+ }
+
+ nevent = (Int_t)histTrErrX->GetEntries();
+ if(nevent!=kNHisto)
+ {AliWarning("ReadHistosFromFile: trying to read too many or too few histos!"); return kFALSE;}
+ histTrErrX->SetAddress(&h);
+ for(Int_t j=0;j<kNHisto;j++){
+ histTrErrX->GetEntry(j);
+ fHisTrackErrX[j]->Add(h);
+ }
+
+ nevent = (Int_t)histTrErrZ->GetEntries();
+ if(nevent!=kNHisto)
+ {AliWarning("ReadHistosFromFile: trying to read too many or too few histos!"); return kFALSE;}
+ histTrErrZ->SetAddress(&h);
+ for(Int_t j=0;j<kNHisto;j++){
+ histTrErrZ->GetEntry(j);
+ fHisTrackErrZ[j]->Add(h);
+ }
+
+ nevent = (Int_t)histClErrX->GetEntries();
+ if(nevent!=kNHisto)
+ {AliWarning("ReadHistosFromFile: trying to read too many or too few histos!"); return kFALSE;}
+ histClErrX->SetAddress(&h);
+ for(Int_t j=0;j<kNHisto;j++){
+ histClErrX->GetEntry(j);
+ fHisClusErrX[j]->Add(h);
+ }
+
+ nevent = (Int_t)histClErrZ->GetEntries();
+ if(nevent!=kNHisto)
+ {AliWarning("ReadHistosFromFile: trying to read too many or too few histos!"); return kFALSE;}
+ histClErrZ->SetAddress(&h);
+ for(Int_t j=0;j<kNHisto;j++){
+ histClErrZ->GetEntry(j);
+ fHisClusErrZ[j]->Add(h);
+ }
+
+ nevent = (Int_t)profXvsPhi->GetEntries();
+ if(nevent!=kNHisto)
+ {AliWarning("ReadHistosFromFile: trying to read too many or too few histos!"); return kFALSE;}
+ profXvsPhi->SetAddress(&p);
+ for(Int_t j=0;j<kNHisto;j++){
+ profXvsPhi->GetEntry(j);
+ fProfResXvsPhi[j]->Add(p);
+ }
+
+ nevent = (Int_t)profZvsDip->GetEntries();
+ if(nevent!=kNHisto)
+ {AliWarning("ReadHistosFromFile: trying to read too many or too few histos!"); return kFALSE;}
+ profZvsDip->SetAddress(&p);
+ for(Int_t j=0;j<kNHisto;j++){
+ profZvsDip->GetEntry(j);
+ fProfResZvsDip[j]->Add(p);
+ }
+
+ for(Int_t clu=0; clu<kNclu; clu++) {
+
+ nevent = (Int_t)profXvsPhiclu[clu]->GetEntries();
+ if(nevent!=kNHisto)
+ {AliWarning("ReadHistosFromFile: trying to read too many or too few histos!"); return kFALSE;}
+ profXvsPhiclu[clu]->SetAddress(&p);
+ for(Int_t j=0;j<kNHisto;j++){
+ profXvsPhiclu[clu]->GetEntry(j);
+ fProfResXvsPhiclu[j][clu]->Add(p);
+ }
+
+ nevent = (Int_t)profZvsDipclu[clu]->GetEntries();
+ if(nevent!=kNHisto)
+ {AliWarning("ReadHistosFromFile: trying to read too many or too few histos!"); return kFALSE;}
+ profZvsDipclu[clu]->SetAddress(&p);
+ for(Int_t j=0;j<kNHisto;j++){
+ profZvsDipclu[clu]->GetEntry(j);
+ fProfResZvsDipclu[j][clu]->Add(p);
+ }
+ }
+
+
+ delete h;
+ delete h2;
+ delete h2i;
+ delete p;