From abad76ae10eaa5d0ff78b1d94286b3de321b698d Mon Sep 17 00:00:00 2001 From: gconesab Date: Wed, 5 Nov 2008 18:32:34 +0000 Subject: [PATCH] corrected warnings with gcc 4.3 --- EMCAL/AliCaloCalibPedestal.h | 4 ++-- EMCAL/AliEMCALGeometry.h | 2 +- EMCAL/AliEMCALHistoUtilities.cxx | 8 ++++---- EMCAL/AliEMCALShishKebabModule.cxx | 2 +- EMCAL/Calib/AliEMCALCalibCoefs.cxx | 2 +- EMCAL/Calib/AliEMCALFolder.cxx | 3 ++- EMCAL/Calib/AliEMCALPi0Calibration.cxx | 12 ++++++------ PWG4/PartCorr/AliAnalysisTaskPHOSExample.h | 2 +- 8 files changed, 18 insertions(+), 17 deletions(-) diff --git a/EMCAL/AliCaloCalibPedestal.h b/EMCAL/AliCaloCalibPedestal.h index 8329314c83f..ff12c92ea72 100644 --- a/EMCAL/AliCaloCalibPedestal.h +++ b/EMCAL/AliCaloCalibPedestal.h @@ -46,8 +46,8 @@ class AliCaloCalibPedestal : public TObject { AliCaloCalibPedestal& operator = (const AliCaloCalibPedestal &source); //Functions to ask for the constants (in case a GUI needs them, for an example - static const int GetSampleMax() {return fgkSampleMax;}; - static const int GetSampleMin() {return fgkSampleMin;}; + int GetSampleMax() const {return fgkSampleMax;}; + int GetSampleMin() const {return fgkSampleMin;}; // Event processing methods: Bool_t ProcessEvent(AliRawReader *rawReader); diff --git a/EMCAL/AliEMCALGeometry.h b/EMCAL/AliEMCALGeometry.h index 05df484fecc..decc5a0274f 100644 --- a/EMCAL/AliEMCALGeometry.h +++ b/EMCAL/AliEMCALGeometry.h @@ -87,7 +87,7 @@ public: ////////////////////////////////////// // Return EMCAL geometrical parameters // - Char_t* GetNameOfEMCALEnvelope() const {return "XEN1";} + Char_t* GetNameOfEMCALEnvelope() const { Char_t* env = "XEN1"; return env ;} Float_t GetArm1PhiMin() const { return fArm1PhiMin ; } Float_t GetArm1PhiMax() const { return fArm1PhiMax ; } Float_t GetArm1EtaMin() const { return fArm1EtaMin;} diff --git a/EMCAL/AliEMCALHistoUtilities.cxx b/EMCAL/AliEMCALHistoUtilities.cxx index 176b9bf342f..fb49798bbdc 100644 --- a/EMCAL/AliEMCALHistoUtilities.cxx +++ b/EMCAL/AliEMCALHistoUtilities.cxx @@ -362,16 +362,16 @@ AliRunLoader* AliEMCALHistoUtilities::InitKinematics(const Int_t nev, const char static AliRunLoader *rl = 0; if((rl == 0 || nev==0) && galiceName) { - printf(" AliEMCALHistoUtilities::InitKinematics() : nev %i : rl %p : %s (IN)\n", - nev, rl, galiceName); + //printf(" AliEMCALHistoUtilities::InitKinematics() : nev %i : rl %p : %s (IN)\n", + // nev, rl, galiceName); if(rl) { rl->UnloadgAlice(); delete rl; } rl = AliRunLoader::Open(galiceName,AliConfig::GetDefaultEventFolderName(),"read"); rl->LoadgAlice(); // obligatory - printf(" AliEMCALHistoUtilities::InitKinematics() : nev %i : rl %p : %s (OUT)\n", - nev, rl, galiceName); + //printf(" AliEMCALHistoUtilities::InitKinematics() : nev %i : rl %p : %s (OUT)\n", + //nev, rl, galiceName); } if(rl) { rl->GetEvent(nev); diff --git a/EMCAL/AliEMCALShishKebabModule.cxx b/EMCAL/AliEMCALShishKebabModule.cxx index 46813b06072..563f7a929d3 100644 --- a/EMCAL/AliEMCALShishKebabModule.cxx +++ b/EMCAL/AliEMCALShishKebabModule.cxx @@ -161,7 +161,7 @@ Double_t xmin, Double_t xmax, Int_t npar, Double_t *par, Double_t eps, Int_t max Double_t AliEMCALShishKebabModule::Y2(Double_t *x, Double_t *par) { // For position calulation of second module - if(par); + //if(par);//For what is this?, commented due to compilation warnings Double_t theta = x[0]; Double_t cos = TMath::Cos(theta); Double_t sin = TMath::Sin(theta); diff --git a/EMCAL/Calib/AliEMCALCalibCoefs.cxx b/EMCAL/Calib/AliEMCALCalibCoefs.cxx index d8faa7876fe..6c2e5f14377 100644 --- a/EMCAL/Calib/AliEMCALCalibCoefs.cxx +++ b/EMCAL/Calib/AliEMCALCalibCoefs.cxx @@ -220,7 +220,7 @@ const char* coment) if(man == 0) { printf(" AliEMCALCalibCoefs::GetCalibTableForDb : define AliCDBManager, NO saving !! \n"); } else { - printf(" AliCDBManager %p \n", man); + //printf(" AliCDBManager %p \n", man); AliCDBId id("EMCAL/Calib/Data",firstRun,lastRun); // create in EMCAL/Calib/Data DBFolder TString dBFolder(dbLocation); AliCDBStorage* loc = man->GetStorage(dBFolder.Data()); diff --git a/EMCAL/Calib/AliEMCALFolder.cxx b/EMCAL/Calib/AliEMCALFolder.cxx index 94ecf249663..53beb3c1ed2 100644 --- a/EMCAL/Calib/AliEMCALFolder.cxx +++ b/EMCAL/Calib/AliEMCALFolder.cxx @@ -438,7 +438,8 @@ void AliEMCALFolder::Save(const char *fn, const char *opt) f.NextEventPut(this, eventNum, runNumber); printf(" Save %s to file %s\n", GetName(), FN.Data()); */ - if(fn || opt); + //if(fn || opt);//For what is this?, commented due to compilation warnings + } //_____________________________________________________________ diff --git a/EMCAL/Calib/AliEMCALPi0Calibration.cxx b/EMCAL/Calib/AliEMCALPi0Calibration.cxx index 2823ae0d770..ce50a7df83f 100644 --- a/EMCAL/Calib/AliEMCALPi0Calibration.cxx +++ b/EMCAL/Calib/AliEMCALPi0Calibration.cxx @@ -180,15 +180,15 @@ AliEMCALPi0Calibration::AliEMCALPi0Calibration(const AliAnalysisTaskSE& obj) : fArrOpts(0), fKeyOpts(0) { - if(&obj); // Copy constructor - unused +// if(&obj); //FOR WHAT IS THIS, commented due to warnings } AliEMCALPi0Calibration& AliEMCALPi0Calibration::operator=(const AliAnalysisTaskSE& other) { - if(&other); - return *this; // Assignment +// if(&other); //FOR WHAT IS THIS, commented due to warnings + return *this; } AliEMCALPi0Calibration::~AliEMCALPi0Calibration() @@ -1170,7 +1170,7 @@ TCanvas *AliEMCALPi0Calibration::Linearity(TList *l, int ifun) line = new TLine(0.0,0.0, 101.,0.0); line->Draw(); TLatex *lat = u::Lat("linearity better 0.2% after correction",20., 0.15, 12, 0.06, 1); - if(lat); + //if(lat); //For what is this?, commented due to compilation warnings } if(1) { TString latexName; @@ -1191,7 +1191,7 @@ TCanvas *AliEMCALPi0Calibration::Linearity(TList *l, int ifun) gr3->SetMarkerSize(1.5); TLatex *lat = u::Lat(latexName.Data(),82., 11., 12, 0.06, 1); - if(lat); + if(lat); //For what is this?, commented due to compilation warnings // Exp. data TF1 *fexp = new TF1(*f); fexp->SetName("fexp"); @@ -1361,7 +1361,7 @@ TCanvas* AliEMCALPi0Calibration::DrawDeffVsEnergy() Int_t markerColor=1; c->cd(1); TF1 *fdeff= new TF1("fdeff","[0]+[1]*log(x)",0.4, 100.4); - if(fdeff); + if(fdeff); //For what is this?, commented due to compilation warnings TGraphErrors *gr = u::DrawGraphErrors(np, p,deff, ep, edeff, markerColor,21+markerColor,"AP"," D_{eff} vs E_{#gamma} ","E_{#gamma} "," D_{eff} in cm ", -1, "", 0); diff --git a/PWG4/PartCorr/AliAnalysisTaskPHOSExample.h b/PWG4/PartCorr/AliAnalysisTaskPHOSExample.h index 25ed2f06700..77fe48c5513 100644 --- a/PWG4/PartCorr/AliAnalysisTaskPHOSExample.h +++ b/PWG4/PartCorr/AliAnalysisTaskPHOSExample.h @@ -33,7 +33,7 @@ public: virtual void Init() ; virtual void LocalInit() { Init() ; } virtual void UserExec(Option_t * opt = "") ; - const Float_t GetPhotonId() const { return fPhotonId ; } + Float_t GetPhotonId() const { return fPhotonId ; } void SetDebugLevel(Int_t level) { fDebug = level ; } void SetPhotonId(Float_t threshold) { fPhotonId = threshold ; } virtual void Terminate(Option_t * opt = "") ; -- 2.43.0