effc++ warnings
authorfca <fca@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 4 Mar 2008 11:17:17 +0000 (11:17 +0000)
committerfca <fca@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 4 Mar 2008 11:17:17 +0000 (11:17 +0000)
THbtp/AliGenHBTprocessor.cxx
TMEVSIM/AliGenMevSim.cxx
TMEVSIM/AliMevSimConfig.cxx
TMEVSIM/AliMevSimParticle.cxx
TMEVSIM/AliMevSimParticle.h
TMEVSIM/TMevSim.cxx
TMEVSIM/TMevSimPartTypeParams.cxx

index d04dcff..dceace1 100644 (file)
@@ -93,7 +93,71 @@ AliGenHBTprocessor::AliGenHBTprocessor():
   AliGenerator(), 
   fHBTprocessor(0x0),
   fHbtPStatCodes(0x0),
-  fEventMerge(1)
+  fNPDGCodes(0),
+  fTrackRejectionFactor(0),
+  fReferenceControl(0),
+  fPrintFull(0),
+  fPrintSectorData(0),
+  fNPidTypes(0),
+  fNevents(0),
+  fSwitch1d(0),
+  fSwitch3d(0),
+  fSwitchType(0),
+  fSwitchCoherence(0),
+  fSwitchCoulomb(0),
+  fSwitchFermiBose(0),
+  fEventLineCounter(0),
+  fMaxit(0),
+  fIrand(0),
+  fLambda(0),
+  fR1d(0),
+  fRside(0),
+  fRout(0),
+  fRlong(0),
+  fRperp(0),
+  fRparallel(0),
+  fR0(0),
+  fQ0(0),
+  fDeltap(0),
+  fDelchi(0),
+  fNPtBins(0),
+  fNPhiBins(0),
+  fNEtaBins(0),
+  fN1dFine(0),
+  fN1dCoarse(0),
+  fN1dTotal(0),
+  fN3dFine(0),
+  fN3dCoarse(0),
+  fN3dTotal(0),
+  fN3dFineProject(0),
+  fNPxBins(0),
+  fNPyBins(0),
+  fNPzBins(0),
+  fNSectors(0),
+  fPtBinSize(0),
+  fPhiBinSize(0),
+  fEtaBinSize(0),
+  fEtaMin(0),
+  fEtaMax(0),
+  fBinsize1dFine(0),
+  fBinsize1dCoarse(0),
+  fQmid1d(0),
+  fQmax1d(0),
+  fBinsize3dFine(0),
+  fBinsize3dCoarse(0),
+  fQmid3d(0),
+  fQmax3d(0),
+  fPxMin(0),
+  fPxMax(0),
+  fDelpx(0),
+  fPyMin(0),
+  fPyMax(0),
+  fDelpy(0),
+  fPzMin(0),
+  fPzMax(0),
+  fDelpz(0),
+  fEventMerge(1),
+  fActiveStack(0)
 {
   //
   // Standard constructor
index a0b186c..bc04679 100644 (file)
@@ -38,24 +38,26 @@ static TRandom * gAliRandom;
 ClassImp(AliGenMevSim)
 
 //____________________________________________________________________________
-AliGenMevSim::AliGenMevSim() : AliGenerator(-1) 
+AliGenMevSim::AliGenMevSim() : 
+  AliGenerator(-1),
+  fMevSim(new TMevSim()),
+  fConfig(new AliMevSimConfig())
 {
   //
   // Default ctor
   //
-  fConfig = new AliMevSimConfig();
-  fMevSim = new TMevSim();
   gAliRandom = fRandom;
   
 }
 //____________________________________________________________________________
-AliGenMevSim::AliGenMevSim(AliMevSimConfig *config): AliGenerator(-1) 
+AliGenMevSim::AliGenMevSim(AliMevSimConfig *config): 
+  AliGenerator(-1),
+  fMevSim(new TMevSim()),
+  fConfig(config)
 {
   //
   // Standard ctor
   //
-  fConfig = config;
-  fMevSim = new TMevSim(); 
   gAliRandom = fRandom;
 }
 
index b305f77..738bc1b 100644 (file)
@@ -92,14 +92,46 @@ ClassImp(AliMevSimConfig)
 
 //////////////////////////////////////////////////////////////////////////////////////////////////
 
-AliMevSimConfig::AliMevSimConfig() {
+AliMevSimConfig::AliMevSimConfig() :
+  fModelType(0),
+  fReacPlaneCntrl(0),
+  fPsiRMean(0),
+  fPsiRStDev(0),
+  fMultFacMean(0),
+  fMultFacStDev(0),
+  fNStDevMult(0),
+  fNStDevTemp(0),
+  fNStDevSigma(0),
+  fNStDevExpVel(0),
+  fNStdDevPSIr(0),
+  fNStDevVn(0),
+  fNStDevMultFac(0),
+  fNIntegPts(0),
+  fNScanPts(0)
+{
 //def ctor
   Init();
 }
 
 //////////////////////////////////////////////////////////////////////////////////////////////////
 
-AliMevSimConfig::AliMevSimConfig(Int_t modelType) {
+AliMevSimConfig::AliMevSimConfig(Int_t modelType) :
+  fModelType(0),
+  fReacPlaneCntrl(0),
+  fPsiRMean(0),
+  fPsiRStDev(0),
+  fMultFacMean(0),
+  fMultFacStDev(0),
+  fNStDevMult(0),
+  fNStDevTemp(0),
+  fNStDevSigma(0),
+  fNStDevExpVel(0),
+  fNStdDevPSIr(0),
+  fNStDevVn(0),
+  fNStDevMultFac(0),
+  fNIntegPts(0),
+  fNScanPts(0)
+{
 //ctor
   Init();
   SetModelType(modelType);
index 9ea6c86..aba5160 100644 (file)
@@ -23,24 +23,29 @@ ClassImp(AliMevSimParticle)
    
 ///////////////////////////////////////////////////////////////////////////////////////
 
-AliMevSimParticle::AliMevSimParticle()
-  : TMevSimPartTypeParams() {
-  fConv = 0;
+AliMevSimParticle::AliMevSimParticle() : 
+  TMevSimPartTypeParams(),
+  fPdg(),
+  fConv(0)
+{
+
 }
 
 ///////////////////////////////////////////////////////////////////////////////////////
 
 AliMevSimParticle::AliMevSimParticle(PDG_t pdg, Int_t multmean, Int_t multvc, 
                  Float_t tempmean, Float_t tempstdev, Float_t sigmamean,
-                 Float_t sigmastdev, Float_t expvelmean, Float_t expvelstdev)
+                                    Float_t sigmastdev, Float_t expvelmean, Float_t expvelstdev) :
+
+  TMevSimPartTypeParams(0, multmean, multvc, tempmean, tempstdev, 
+                       sigmamean, sigmastdev, expvelmean, expvelstdev),
 
-  : TMevSimPartTypeParams(0, multmean, multvc, tempmean, tempstdev, 
-                         sigmamean, sigmastdev, expvelmean, expvelstdev)  {
+  fPdg(pdg),
+  fConv(new TMevSimConverter())
+{
 
 
   // Calculate geant ID from pdg
-  fConv = new TMevSimConverter();
-  fPdg = pdg;
   if (fConv) fGPid = fConv->IdFromPDG(pdg);  
 
 }
index 40dd522..8512fd6 100644 (file)
 
 class AliMevSimParticle :public TMevSimPartTypeParams {
 
- protected:
-  
-  PDG_t fPdg;
-  TMevSimConverter *fConv;
-
  public:
   
   ///////////////////////////////////////////////////////////////////////////////////////
@@ -37,6 +32,16 @@ class AliMevSimParticle :public TMevSimPartTypeParams {
   
   ///////////////////////////////////////////////////////////////////////////////////////
   
+ protected:
+  
+  PDG_t fPdg;
+  TMevSimConverter *fConv;
+
+ private:
+
+  AliMevSimParticle(const AliMevSimParticle&); // Not implemented
+  AliMevSimParticle& operator=(const AliMevSimParticle&); // Not implemented
+
   ClassDef(AliMevSimParticle,1)  
     
   ///////////////////////////////////////////////////////////////////////////////////////
index 787cc38..8c0a178 100644 (file)
@@ -418,7 +418,33 @@ extern "C" void type_of_call multgen();
 TMevSim::TMevSim(Int_t nEvents, Int_t modelType, Int_t reacPlaneCntrl,
           Float_t psiRMean, Float_t psiRStDev, Float_t multFacMean, Float_t multFacStDev,
           Float_t ptCutMin, Float_t ptCutMax, Float_t etaCutMin, Float_t etaCutMax, 
-          Float_t phiCutMin, Float_t phiCutMax, Int_t irand) : TGenerator("MevSim", "MevSim")
+          Float_t phiCutMin, Float_t phiCutMax, Int_t irand) : 
+  TGenerator("MevSim", "MevSim"),
+  fNEvents(nEvents),
+  fModelType(modelType),
+  fReacPlaneCntrl(reacPlaneCntrl),
+  fPsiRMean(psiRMean),
+  fPsiRStDev(psiRStDev),
+  fMultFacMean(multFacMean),
+  fMultFacStDev(multFacStDev),
+  fPtCutMin(ptCutMin),
+  fPtCutMax(ptCutMax),
+  fEtaCutMin(etaCutMin),
+  fEtaCutMax(etaCutMax),
+  fPhiCutMin(phiCutMin),
+  fPhiCutMax(phiCutMax),
+  fNStDevMult(3),
+  fNStDevTemp(3),
+  fNStDevSigma(3),
+  fNStDevExpVel(3),
+  fNStdDevPSIr(3),
+  fNStDevVn(3),
+  fNStDevMultFac(3),
+  fNIntegPts(100),
+  fNScanPts(100),
+  firand(irand),
+  fParticleTypeParameters(new TClonesArray("TMevSimPartTypeParams",10)),
+  fNPDGCodes(0)
 {
 // TMevSim constructor: initializes all the event-wide variables of MevSim with
 // user supplied values, or with the default ones (declared in the header file).
@@ -428,25 +454,6 @@ TMevSim::TMevSim(Int_t nEvents, Int_t modelType, Int_t reacPlaneCntrl,
 // event will be stored in POUT COMMON, and therefore only one event can be 
 // accessible at a time. 
  
-   fNEvents = nEvents;
-   fModelType = modelType;
-   fReacPlaneCntrl = reacPlaneCntrl;
-   fPsiRMean = psiRMean;
-   fPsiRStDev = psiRStDev;
-   fMultFacMean = multFacMean;
-   fMultFacStDev = multFacStDev;
-   fPtCutMin = ptCutMin;
-   fPtCutMax = ptCutMax;
-   fEtaCutMin = etaCutMin;
-   fEtaCutMax = etaCutMax;
-   fPhiCutMin = phiCutMin;
-   fPhiCutMax = phiCutMax;
-   fNStDevMult = fNStDevTemp = fNStDevSigma = fNStDevExpVel = fNStdDevPSIr = fNStDevVn = fNStDevMultFac = 3.0;
-   fNIntegPts = 100;
-   fNScanPts = 100;
-   firand = irand;
-   fParticleTypeParameters = new TClonesArray("TMevSimPartTypeParams",10);
-   fNPDGCodes = 0;
    DefineParticles();
 }
 //______________________________________________________________________________
@@ -462,10 +469,35 @@ TMevSim::~TMevSim()
   }
 }
 //______________________________________________________________________________
-TMevSim::TMevSim(TMevSim& mevsim) : TGenerator(mevsim) {
-// The copy constructor
-   
-   *this = mevsim;
+TMevSim::TMevSim(TMevSim& mevsim) : 
+  TGenerator(mevsim),
+  fNEvents(mevsim.fNEvents),
+  fModelType(mevsim.fModelType),
+  fReacPlaneCntrl(mevsim.fReacPlaneCntrl),
+  fPsiRMean(mevsim.fPsiRMean),
+  fPsiRStDev(mevsim.fPsiRStDev),
+  fMultFacMean(mevsim.fMultFacMean),
+  fMultFacStDev(mevsim.fMultFacStDev),
+  fPtCutMin(mevsim.fPtCutMin),
+  fPtCutMax(mevsim.fPtCutMax),
+  fEtaCutMin(mevsim.fEtaCutMin),
+  fEtaCutMax(mevsim.fEtaCutMax),
+  fPhiCutMin(mevsim.fPhiCutMin),
+  fPhiCutMax(mevsim.fPhiCutMax),
+  fNStDevMult(mevsim.fNStDevMult),
+  fNStDevTemp(mevsim.fNStDevTemp),
+  fNStDevSigma(mevsim.fNStDevSigma),
+  fNStDevExpVel(mevsim.fNStDevExpVel),
+  fNStdDevPSIr(mevsim.fNStdDevPSIr),
+  fNStDevVn(mevsim.fNStDevVn),
+  fNStDevMultFac(mevsim.fNStDevMultFac),
+  fNIntegPts(mevsim.fNIntegPts),
+  fNScanPts(mevsim.fNScanPts),
+  firand(mevsim.firand),
+  fParticleTypeParameters(mevsim.fParticleTypeParameters),
+  fNPDGCodes(mevsim.fNPDGCodes)
+{
+  // The copy constructor
 }
 //______________________________________________________________________________
 
@@ -473,38 +505,41 @@ TMevSim& TMevSim::operator=(const TMevSim& mevsim) {
 // An assignment operator: initializes all the event-wide variables of MevSim with
 // the ones from a copied object. It also copies the parameters specific to
 // each particle species.
-   
-   fNEvents = mevsim.GetNEvents();
-   fModelType = mevsim.GetModelType();
-   fReacPlaneCntrl = mevsim.GetReacPlaneCntrl();
-   fPsiRMean = mevsim.GetPsiRMean();
-   fPsiRStDev = mevsim.GetPsiRStDev();
-   fMultFacMean = mevsim.GetMultFacMean();
-   fMultFacStDev = mevsim.GetMultFacStDev();
-   fPtCutMin = mevsim.GetPtCutMin();
-   fPtCutMax = mevsim.GetPtCutMax();
-   fEtaCutMin = mevsim.GetEtaCutMin();
-   fEtaCutMax = mevsim.GetEtaCutMax();
-   fPhiCutMin = mevsim.GetPhiCutMin();
-   fPhiCutMax = mevsim.GetPhiCutMax();
-   fNStDevMult = mevsim.GetNStDevMult();
-   fNStDevTemp = mevsim.GetNStDevTemp();
-   fNStDevSigma =GetNStDevSigma();
-   fNStDevExpVel = mevsim.GetNStDevExpVel();
-   fNStdDevPSIr = mevsim.GetNStDevPSIr(); 
-   fNStDevVn =  mevsim.GetNStDevVn();
-   fNStDevMultFac =  mevsim.GetNStDevMultFac();
-   fNIntegPts = mevsim.GetNintegPts();
-   fNScanPts = mevsim.GetNScanPts();
-   firand = mevsim.firand;
-   fParticleTypeParameters = new TClonesArray("TMevSimPartTypeParams",mevsim.GetNPidTypes());
-   for (int i=0; i< mevsim.GetNPidTypes(); i++) 
-     { 
-       TMevSimPartTypeParams *temp = 0;
-       mevsim.GetPartTypeParamsByIndex(i,temp);
-       fParticleTypeParameters->AddLast(temp);
-     }
-   DefineParticles();
+  
+   if(this != &mevsim) {
+     TGenerator::operator=(mevsim);
+     fNEvents = mevsim.GetNEvents();
+     fModelType = mevsim.GetModelType();
+     fReacPlaneCntrl = mevsim.GetReacPlaneCntrl();
+     fPsiRMean = mevsim.GetPsiRMean();
+     fPsiRStDev = mevsim.GetPsiRStDev();
+     fMultFacMean = mevsim.GetMultFacMean();
+     fMultFacStDev = mevsim.GetMultFacStDev();
+     fPtCutMin = mevsim.GetPtCutMin();
+     fPtCutMax = mevsim.GetPtCutMax();
+     fEtaCutMin = mevsim.GetEtaCutMin();
+     fEtaCutMax = mevsim.GetEtaCutMax();
+     fPhiCutMin = mevsim.GetPhiCutMin();
+     fPhiCutMax = mevsim.GetPhiCutMax();
+     fNStDevMult = mevsim.GetNStDevMult();
+     fNStDevTemp = mevsim.GetNStDevTemp();
+     fNStDevSigma =GetNStDevSigma();
+     fNStDevExpVel = mevsim.GetNStDevExpVel();
+     fNStdDevPSIr = mevsim.GetNStDevPSIr(); 
+     fNStDevVn =  mevsim.GetNStDevVn();
+     fNStDevMultFac =  mevsim.GetNStDevMultFac();
+     fNIntegPts = mevsim.GetNintegPts();
+     fNScanPts = mevsim.GetNScanPts();
+     firand = mevsim.firand;
+     fParticleTypeParameters = new TClonesArray("TMevSimPartTypeParams",mevsim.GetNPidTypes());
+     for (int i=0; i< mevsim.GetNPidTypes(); i++) 
+       {       
+        TMevSimPartTypeParams *temp = 0;
+        mevsim.GetPartTypeParamsByIndex(i,temp);
+        fParticleTypeParameters->AddLast(temp);
+       }
+     DefineParticles();
+   }
    return (*this);
 }
 //______________________________________________________________________________
index 0ae4775..0fd01e5 100644 (file)
@@ -21,7 +21,16 @@ ClassImp(TMevSimPartTypeParams)
 
   
 //______________________________________________________________________________
-  TMevSimPartTypeParams::TMevSimPartTypeParams() 
+TMevSimPartTypeParams::TMevSimPartTypeParams() :
+   fGPid(0),
+   fMultMean(0),
+   fMultVarianceControl(0),
+   fTempMean(0),
+   fTempStDev(0),
+   fSigmaMean(0),
+   fSigmaStDev(0),
+   fExpVelMean(0),
+   fExpVelStDev(0)
 { 
 // Default constructor
   
@@ -35,21 +44,21 @@ ClassImp(TMevSimPartTypeParams)
 //__________________________________________________________________________
 TMevSimPartTypeParams::TMevSimPartTypeParams(Int_t agpid, Int_t amultmean, Int_t amultvc, 
                                              Float_t atempmean, Float_t atempstdev, Float_t asigmamean,
-                                             Float_t asigmastdev, Float_t aexpvelmean, Float_t aexpvelstdev) 
+                                             Float_t asigmastdev, Float_t aexpvelmean, Float_t aexpvelstdev) :
+   fGPid(agpid),
+   fMultMean(amultmean),
+   fMultVarianceControl(amultvc),
+   fTempMean(atempmean),
+   fTempStDev(atempstdev),
+   fSigmaMean(asigmamean),
+   fSigmaStDev(asigmastdev),
+   fExpVelMean(aexpvelmean),
+   fExpVelStDev(aexpvelstdev)
 {
 // Construct the particle type parametrs class. Use the values provide
 // by the user to initialize the internal variables. For the meaning of
 // the parametrs see the TMevSim class documentation.
    
-   fGPid = agpid;
-   fMultMean = amultmean;
-   fMultVarianceControl = amultvc;
-   fTempMean = atempmean;
-   fTempStDev = atempstdev;
-   fSigmaMean = asigmamean;
-   fSigmaStDev = asigmastdev;
-   fExpVelMean = aexpvelmean;
-   fExpVelStDev = aexpvelstdev;
    for (Int_t i = 0; i < 4; i++)
      for (Int_t j = 0; j < NFLOWTERMS; j++) {
        fVnMean[j][i] = 0.0;
@@ -65,18 +74,20 @@ TMevSimPartTypeParams::~TMevSimPartTypeParams()
 }
 
 //______________________________________________________________________________
-TMevSimPartTypeParams::TMevSimPartTypeParams (const TMevSimPartTypeParams& pars) : TObject(pars) {
+TMevSimPartTypeParams::TMevSimPartTypeParams (const TMevSimPartTypeParams& pars) : 
+   TObject(pars),
+   fGPid(pars.fGPid),
+   fMultMean(pars.fMultMean),
+   fMultVarianceControl(pars.fMultVarianceControl),
+   fTempMean(pars.fTempMean),
+   fTempStDev(pars.fTempStDev),
+   fSigmaMean(pars.fSigmaMean),
+   fSigmaStDev(pars.fSigmaStDev),
+   fExpVelMean(pars.fExpVelMean),
+   fExpVelStDev(pars.fExpVelStDev)
+{
 // The copy constructor
   
-   this->fGPid = pars.GetGPid();
-   this->fMultMean = pars.GetMultMean();
-   this->fMultVarianceControl = pars.GetMultVarianceControl();
-   this->fTempMean = pars.GetTempMean();
-   this->fTempStDev = pars.GetTempStDev();
-   this->fSigmaMean = pars.GetSigmaMean();
-   this->fSigmaStDev = pars.GetSigmaStDev();
-   this->fExpVelMean = pars.GetExpVelMean();
-   this->fExpVelStDev = pars.GetExpVelStDev();
    for (Int_t i = 0; i < 4; i++)
      for (Int_t j = 0; j < NFLOWTERMS; j++) {
        this->fVnMean[j][i] = pars.GetVnMeanComponent(j, i);
@@ -85,23 +96,27 @@ TMevSimPartTypeParams::TMevSimPartTypeParams (const TMevSimPartTypeParams& pars)
 }
 
 //______________________________________________________________________________
-TMevSimPartTypeParams& TMevSimPartTypeParams::operator=(const TMevSimPartTypeParams& pars) {
+TMevSimPartTypeParams& TMevSimPartTypeParams::operator=(const TMevSimPartTypeParams& pars) 
+{
 // The assignment operator
-   
-   this->fGPid = pars.GetGPid();
-   this->fMultMean = pars.GetMultMean();
-   this->fMultVarianceControl = pars.GetMultVarianceControl();
-   this->fTempMean = pars.GetTempMean();
-   this->fTempStDev = pars.GetTempStDev();
-   this->fSigmaMean = pars.GetSigmaMean();
-   this->fSigmaStDev = pars.GetSigmaStDev();
-   this->fExpVelMean = pars.GetExpVelMean();
-   this->fExpVelStDev = pars.GetExpVelStDev();
-   for (Int_t i = 0; i < 4; i++)
-     for (Int_t j = 0; j < NFLOWTERMS; j++) {
-       this->fVnMean[j][i] = GetVnMeanComponent(j, i);
-       this->fVnStDev[j][i] = GetVnStDevComponent(j, i);
-     }
+
+   if(this != &pars) {
+     TObject::operator=(pars);
+     fGPid = pars.fGPid;
+     fMultMean = pars.fMultMean;
+     fMultVarianceControl = pars.fMultVarianceControl;
+     fTempMean = pars.fTempMean;
+     fTempStDev = pars.fTempStDev;
+     fSigmaMean = pars.fSigmaMean;
+     fSigmaStDev = pars.fSigmaStDev;
+     fExpVelMean = pars.fExpVelMean;
+     fExpVelStDev = pars.fExpVelStDev;
+     for (Int_t i = 0; i < 4; i++)
+       for (Int_t j = 0; j < NFLOWTERMS; j++) {
+        fVnMean[j][i] = GetVnMeanComponent(j, i);
+        fVnStDev[j][i] = GetVnStDevComponent(j, i);
+       }
+   }
    return (*this);
 }