From: hristov Date: Tue, 15 Jul 2003 14:44:02 +0000 (+0000) Subject: Correcting some trivial warnings on Alpha X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=0798b21e1d3e0f71a35ea6f22f8a32fffe7b40ad;p=u%2Fmrichter%2FAliRoot.git Correcting some trivial warnings on Alpha --- diff --git a/EMCAL/AliEMCALJetFinder.cxx b/EMCAL/AliEMCALJetFinder.cxx index b9c04fd5d4e..c391d8f13d5 100644 --- a/EMCAL/AliEMCALJetFinder.cxx +++ b/EMCAL/AliEMCALJetFinder.cxx @@ -1037,7 +1037,7 @@ void AliEMCALJetFinder::FillFromDigits(Int_t flag) if (!fLego) BookLego(); if (flag == 0) fLego->Reset(); - Int_t nbytes; + Int_t nbytes=0; // diff --git a/EMCAL/AliEMCALRecParticle.cxx b/EMCAL/AliEMCALRecParticle.cxx index bb7aa8f7316..c101bad46b9 100644 --- a/EMCAL/AliEMCALRecParticle.cxx +++ b/EMCAL/AliEMCALRecParticle.cxx @@ -93,14 +93,11 @@ const TParticle * AliEMCALRecParticle::GetPrimary(Int_t index) const index, GetNPrimaries()) ; return 0 ; } - else { - Int_t dummy ; - AliEMCALGetter * gime = AliEMCALGetter::Instance() ; + Int_t dummy ; + AliEMCALGetter * gime = AliEMCALGetter::Instance() ; - Int_t ecaRPindex = dynamic_cast(gime->TrackSegments()->At(GetEMCALTSIndex()))->GetECAIndex(); - Int_t primaryindex = dynamic_cast(gime->ECARecPoints()->At(ecaRPindex))->GetPrimaries(dummy)[index] ; - return gime->Primary(primaryindex) ; - } - return 0 ; + Int_t ecaRPindex = dynamic_cast(gime->TrackSegments()->At(GetEMCALTSIndex()))->GetECAIndex(); + Int_t primaryindex = dynamic_cast(gime->ECARecPoints()->At(ecaRPindex))->GetPrimaries(dummy)[index] ; + return gime->Primary(primaryindex) ; } diff --git a/HBTAN/AliHBTFunction.cxx b/HBTAN/AliHBTFunction.cxx index 110a1737cbc..b93d5142bc0 100644 --- a/HBTAN/AliHBTFunction.cxx +++ b/HBTAN/AliHBTFunction.cxx @@ -293,8 +293,8 @@ Double_t AliHBTFunction1D::Scale(TH1D* num,TH1D* den) if(fNBinsToScale < 1) { - return 0.0; Error("Scale","Number of bins for scaling is smaller thnan 1"); + return 0.0; } UInt_t nbins = num->GetNbinsX(); if (fNBinsToScale > nbins) @@ -463,8 +463,8 @@ Double_t AliHBTFunction2D::Scale() if( (fNBinsToScaleX < 1) || (fNBinsToScaleY < 1) ) { - return 0.0; Error("Scale","Number of bins for scaling is smaller thnan 1"); + return 0.0; } UInt_t nbinsX = fNumerator->GetNbinsX(); if (fNBinsToScaleX > nbinsX) @@ -654,8 +654,8 @@ Double_t AliHBTFunction3D::Scale() if( (fNBinsToScaleX < 1) || (fNBinsToScaleY < 1) || (fNBinsToScaleZ < 1)) { - return 0.0; Error("Scale","Number of bins for scaling is smaller thnan 1"); + return 0.0; } UInt_t nbinsX = fNumerator->GetNbinsX(); if (fNBinsToScaleX > nbinsX) diff --git a/PHOS/AliPHOSPIDv1.cxx b/PHOS/AliPHOSPIDv1.cxx index ca775fc2f3b..2c554e3fcfb 100644 --- a/PHOS/AliPHOSPIDv1.cxx +++ b/PHOS/AliPHOSPIDv1.cxx @@ -408,7 +408,7 @@ const Float_t AliPHOSPIDv1::GetDistance(AliPHOSEmcRecPoint * emc,AliPHOSRecPoin return 100000000 ; } //____________________________________________________________________________ -const Int_t AliPHOSPIDv1::GetCPVBit(AliPHOSEmcRecPoint * emc,AliPHOSRecPoint * cpv,const Int_t effPur, const Float_t e) const +const Int_t AliPHOSPIDv1::GetCPVBit(AliPHOSEmcRecPoint * emc,AliPHOSRecPoint * cpv,const Int_t effPur, Float_t e) const { if(effPur>2 || effPur<0) Error("GetCPVBit","Invalid Efficiency-Purity choice %d",effPur); @@ -426,7 +426,7 @@ const Int_t AliPHOSPIDv1::GetCPVBit(AliPHOSEmcRecPoint * emc,AliPHOSRecPoint * } //____________________________________________________________________________ -const Int_t AliPHOSPIDv1::GetPrincipalBit(TString particle, const Double_t* p,const Int_t effPur, const Float_t e)const +const Int_t AliPHOSPIDv1::GetPrincipalBit(TString particle, const Double_t* p,const Int_t effPur, Float_t e)const { //Is the particle inside de PCA ellipse? diff --git a/STEER/AliConfig.cxx b/STEER/AliConfig.cxx index 63331ca6a0f..3f2c2ffcf83 100644 --- a/STEER/AliConfig.cxx +++ b/STEER/AliConfig.cxx @@ -738,21 +738,15 @@ Int_t AliConfig::AddSubFolder(TFolder* topfolder, const char* infoler, } else return 0;//success } - else - {//such an object already exists - TFolder* fol = dynamic_cast(obj); - if (fol == 0x0) - { - Error("AddSubFodler(TFolder*, ....", - "Object named %s already exists in folder %s AND IT IS NOT A FOLDER",newfoldname,infoler); - return 3; - } - else - { - Warning("AddSubFodler(TFolder*, ....", - "Folder named %s already exists in folder %s",newfoldname,infoler); - return 0; - } - } - return 0; //never reached + //such an object already exists + TFolder* fol = dynamic_cast(obj); + if (fol == 0x0) + { + Error("AddSubFodler(TFolder*, ....", + "Object named %s already exists in folder %s AND IT IS NOT A FOLDER",newfoldname,infoler); + return 3; + } + Warning("AddSubFodler(TFolder*, ....", + "Folder named %s already exists in folder %s",newfoldname,infoler); + return 0; } diff --git a/STEER/AliLoader.h b/STEER/AliLoader.h index 29a6dc5b054..43c927f6eaa 100644 --- a/STEER/AliLoader.h +++ b/STEER/AliLoader.h @@ -114,9 +114,9 @@ class AliLoader: public TNamed TTree* TreeT(){return GetTracksDataLoader()->Tree();} //returns the tree from folder; shortcut method TTree* TreeP(){return GetRecParticlesDataLoader()->Tree();} //returns the tree from folder; shortcut method - Int_t LoadHits(Option_t* opt=""){return GetHitsDataLoader()->Load(opt);SetTAddrInDet();} - Int_t LoadSDigits(Option_t* opt=""){return GetSDigitsDataLoader()->Load(opt);SetTAddrInDet();} - Int_t LoadDigits(Option_t* opt=""){return GetDigitsDataLoader()->Load(opt);SetTAddrInDet();} + Int_t LoadHits(Option_t* opt=""){Int_t status = GetHitsDataLoader()->Load(opt);SetTAddrInDet();return status;} + Int_t LoadSDigits(Option_t* opt=""){Int_t status = GetSDigitsDataLoader()->Load(opt);SetTAddrInDet(); return status;} + Int_t LoadDigits(Option_t* opt=""){Int_t status = GetDigitsDataLoader()->Load(opt);SetTAddrInDet();return status;} Int_t LoadRecPoints(Option_t* opt=""){return GetRecPointsDataLoader()->Load(opt);} Int_t LoadTracks(Option_t* opt=""){return GetTracksDataLoader()->Load(opt);} Int_t LoadRecParticles(Option_t* opt=""){return GetRecParticlesDataLoader()->Load(opt);} diff --git a/THbtp/AliGenHBTprocessor.cxx b/THbtp/AliGenHBTprocessor.cxx index 2ee260d3966..fe8257a3289 100644 --- a/THbtp/AliGenHBTprocessor.cxx +++ b/THbtp/AliGenHBTprocessor.cxx @@ -352,9 +352,8 @@ Int_t AliGenHBTprocessor::GetHbtPStatusCode(Int_t part) const Error("GetHbtPStatusCode","GetTrackEventIndex returned error"); return 0; } - else return fHbtPStatCodes[ev][idx]; + return fHbtPStatCodes[ev][idx]; - return 0; } /*******************************************************************/ @@ -923,12 +922,8 @@ TParticle* AliGenHBTprocessor::GetTrack(Int_t n) Error("GetTrack","GetTrackEventIndex returned error"); return 0x0; } - else - { - if (fgDebug > 5) Info("GetTrack","Number of Tracks in Event(%d) = %d",ev,cab->GetStack(ev)->GetNprimary()); - return cab->GetStack(ev)->Particle(idx); //safe - in case stack does not exist - } //GetTrackEventIndex would have returned error - return 0x0; + if (fgDebug > 5) Info("GetTrack","Number of Tracks in Event(%d) = %d",ev,cab->GetStack(ev)->GetNprimary()); + return cab->GetStack(ev)->Particle(idx);//safe - in case stack does not exist } /*******************************************************************/ diff --git a/TOF/AliTOFReconstructionerV2.cxx b/TOF/AliTOFReconstructionerV2.cxx index 33e6093949f..8bfaca3a17f 100644 --- a/TOF/AliTOFReconstructionerV2.cxx +++ b/TOF/AliTOFReconstructionerV2.cxx @@ -924,9 +924,9 @@ Int_t AliTOFReconstructionerV2::SaveTracks(const Char_t *outname, const Int_t sp T.Write(); savedir->cd(); out->Close(); - return 0; gBenchmark->Stop(name); gBenchmark->Show(name); + return 0; } //__________________________________________________________________ diff --git a/TPC/AliTPCPRF2D.cxx b/TPC/AliTPCPRF2D.cxx index 7ec8a358f5c..0331fbba7dd 100644 --- a/TPC/AliTPCPRF2D.cxx +++ b/TPC/AliTPCPRF2D.cxx @@ -177,42 +177,39 @@ Float_t AliTPCPRF2D::GetPRF(Float_t xin, Float_t yin) fcharge = &(fChargeArray[i*fNPRF]); return GetPRFActiv(xin); } - else{ - //make interpolation from more fore lines - Int_t i= Int_t(y); - Float_t res; - if ((i<0) || (i>=fNYdiv) ) return 0; - Float_t z0=0; - Float_t z1=0; - Float_t z2=0; - Float_t z3=0; - if (i>0) { - fcharge =&(fChargeArray[(i-1)*fNPRF]); - z0 = GetPRFActiv(xin); - } - fcharge =&(fChargeArray[i*fNPRF]); - z1=GetPRFActiv(xin); - if ((i+1)=fNYdiv) ) return 0; + Float_t z0=0; + Float_t z1=0; + Float_t z2=0; + Float_t z3=0; + if (i>0) { + fcharge =&(fChargeArray[(i-1)*fNPRF]); + z0 = GetPRFActiv(xin); + } + fcharge =&(fChargeArray[i*fNPRF]); + z1=GetPRFActiv(xin); + if ((i+1)