eff C++ warnings corrected.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 21 May 2007 15:26:04 +0000 (15:26 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 21 May 2007 15:26:04 +0000 (15:26 +0000)
STEER/AliCheb3D.cxx
STEER/AliCheb3D.h
STEER/AliMagFCheb.cxx
STEER/AliMagFCheb.h

index 0eaa7b3..41246b2 100644 (file)
@@ -82,6 +82,7 @@
 #include <TRandom.h>
 #include <TROOT.h>
 #include "AliCheb3D.h"
+#include "AliLog.h"
 
 
 
@@ -125,6 +126,30 @@ AliCheb3DCalc::AliCheb3DCalc(FILE* stream):
     LoadData(stream);
 }
 
+AliCheb3DCalc::AliCheb3DCalc(const AliCheb3DCalc& cheb):
+    TNamed("", ""),
+    fNCoefs(0),  
+    fNRows(0),
+    fNCols(0),
+    fNElemBound2D(0),
+    fNColsAtRow(0),
+    fColAtRowBg(0),
+    fCoefBound2D0(0),
+    fCoefBound2D1(0),
+    fCoefs(0),
+    fTmpCf1(0),
+    fTmpCf0(0)
+{
+    // Copy constructor
+    cheb.Copy(*this);
+}
+
+void AliCheb3DCalc::Copy(TObject &) const
+{
+  //dummy Copy function
+  AliFatal("Not implemented!");
+}
+
 //__________________________________________________________________________________________
 void AliCheb3DCalc::Clear(Option_t*)
 {
@@ -339,9 +364,11 @@ AliCheb3D::AliCheb3D():
     TNamed("", ""),
     fDimOut(0),
     fPrec(0.),
+    fChebCalc(),
     fMaxCoefs(0),
     fResTmp(0),
     fGrid(0),
+    fUsrFunName(),
     fUsrMacro(0)            
 {
     // Default constructor
@@ -352,9 +379,11 @@ AliCheb3D::AliCheb3D(const char* inputFile):
     TNamed("", ""),
     fDimOut(0),
     fPrec(0.),
+    fChebCalc(),
     fMaxCoefs(0),
     fResTmp(0),
     fGrid(0),
+    fUsrFunName(),
     fUsrMacro(0)            
 {
     // Default constructor
@@ -368,9 +397,11 @@ AliCheb3D::AliCheb3D(FILE* stream):
     TNamed("", ""),
     fDimOut(0),
     fPrec(0.),
+    fChebCalc(),
     fMaxCoefs(0),
     fResTmp(0),
     fGrid(0),
+    fUsrFunName(),
     fUsrMacro(0)            
 {
     // Default constructor
@@ -378,6 +409,20 @@ AliCheb3D::AliCheb3D(FILE* stream):
     LoadData(stream);
 }
 
+AliCheb3D::AliCheb3D(const AliCheb3D& cheb):
+    TNamed("", ""),
+    fDimOut(0),
+    fPrec(0.),
+    fChebCalc(),
+    fMaxCoefs(0),
+    fResTmp(0),
+    fGrid(0),
+    fUsrFunName(),
+    fUsrMacro(0)            
+{
+    // Copy constructor
+    cheb.Copy(*this);
+}
 
 //__________________________________________________________________________________________
 #ifdef _INC_CREATION_ALICHEB3D_
@@ -427,6 +472,13 @@ AliCheb3D::AliCheb3D(void (*ptr)(float*,float*), int DimOut, Float_t  *bmin,Floa
 }
 #endif
 
+
+void AliCheb3D::Copy(TObject &) const
+{
+  //dummy Copy function
+  AliFatal("Not implemented!");
+}
+
 //__________________________________________________________________________________________
 void AliCheb3D::Clear(Option_t*)
 {
index 9151951..b2193a9 100644 (file)
@@ -89,6 +89,13 @@ class AliCheb3DCalc: public TNamed
  public:
   AliCheb3DCalc();
   AliCheb3DCalc(FILE* stream); // read coefs from text file
+  AliCheb3DCalc(const AliCheb3DCalc &cheb);
+  AliCheb3DCalc& operator= (const AliCheb3DCalc &cheb) {
+      // Assignment operator
+      cheb.Copy(*this);
+      return *this;
+  }
+  
   ~AliCheb3DCalc() {Clear();}
   //
   void       Print(Option_t* opt="")                                   const;
@@ -101,6 +108,8 @@ class AliCheb3DCalc: public TNamed
 #endif
   //
   static void ReadLine(TString& str,FILE* stream);
+ private:
+  void Copy (TObject &mc) const;
   //
  protected:
   //
@@ -141,6 +150,13 @@ class AliCheb3D: public TNamed
     AliCheb3D();
     AliCheb3D(const char* inpFile); // read coefs from text file
     AliCheb3D(FILE*);               // read coefs from stream
+    AliCheb3D(const AliCheb3D &cheb);
+    AliCheb3D& operator= (const AliCheb3D &cheb) {
+       // Assignment operator
+       cheb.Copy(*this);
+       return *this;
+    }
+  
   //
 #ifdef _INC_CREATION_ALICHEB3D_
   AliCheb3D(const char* funName, Int_t DimOut, Float_t  *bmin,Float_t  *bmax, Int_t *npoints, Float_t  prec=1E-6);
@@ -191,7 +207,9 @@ class AliCheb3D: public TNamed
   //
   Float_t      MapToInternal(Float_t  x,Int_t d) const {return (x-fBOffset[d])*fBScale[d];} // map x to [-1:1]
   Float_t      MapToExternal(Float_t  x,Int_t d) const {return x/fBScale[d]+fBOffset[d];}   // map from [-1:1] to x
-  //  
+  //
+ private:
+  void Copy (TObject &mc) const;
  protected:
   Int_t        fDimOut;            // dimension of the ouput array
   Float_t      fPrec;              // requested precision
index a954393..1ebeb95 100644 (file)
@@ -35,6 +35,7 @@
 //                                                                               //
 ///////////////////////////////////////////////////////////////////////////////////
 
+#include "AliLog.h"
 #include "AliMagFCheb.h"
 
 ClassImp(AliMagFCheb)
@@ -42,6 +43,24 @@ ClassImp(AliMagFCheb)
 
 
 //__________________________________________________________________________________________
+AliMagFCheb::AliMagFCheb() :
+    TNamed(),
+    fNParamsSol(0),
+    fNSegZSol(0),
+    fNParamsDip(0),
+    fSegZSol(0),
+    fSegRSol(0),
+    fNSegRSol(0),
+    fSegZIdSol(0),
+    fMinZSol(0.),
+    fMaxZSol(0.),
+    fMaxRSol(0.),
+    fParamsSol(0),
+    fParamsDip(0)
+{
+  Init0();
+}
+
 AliMagFCheb::AliMagFCheb(const char* inputFile) :
     TNamed("Field Map", inputFile),
     fNParamsSol(0),
@@ -53,12 +72,42 @@ AliMagFCheb::AliMagFCheb(const char* inputFile) :
     fSegZIdSol(0),
     fMinZSol(0.),
     fMaxZSol(0.),
-    fMaxRSol(0.)
+    fMaxRSol(0.),
+    fParamsSol(0),
+    fParamsDip(0)
 {
   Init0();
   LoadData(inputFile);
 }
 
+AliMagFCheb::AliMagFCheb(const AliMagFCheb &cheb) :
+    TNamed(),
+    fNParamsSol(0),
+    fNSegZSol(0),
+    fNParamsDip(0),
+    fSegZSol(0),
+    fSegRSol(0),
+    fNSegRSol(0),
+    fSegZIdSol(0),
+    fMinZSol(0.),
+    fMaxZSol(0.),
+    fMaxRSol(0.),
+    fParamsSol(0),
+    fParamsDip(0)
+{
+  //
+  // Copy constructor for AliMC
+  //
+  cheb.Copy(*this);
+}
+
+//_______________________________________________________________________
+void AliMagFCheb::Copy(TObject &) const
+{
+  //dummy Copy function
+  AliFatal("Not implemented!");
+}
+
 //__________________________________________________________________________________________
 AliMagFCheb::~AliMagFCheb()
 {
index 1571762..492ec4f 100644 (file)
 class AliMagFCheb: public TNamed
 {
  public:
-  AliMagFCheb()                                                  {Init0();}
-  AliMagFCheb(const char* inputFile);
-  ~AliMagFCheb();
+    AliMagFCheb();
+    AliMagFCheb(const char* inputFile);
+    AliMagFCheb(const AliMagFCheb &cheb);
+    AliMagFCheb& operator= (const AliMagFCheb &cheb) {
+       // Assignment operator
+       cheb.Copy(*this);
+       return *this;
+    }
+
+   ~AliMagFCheb();
   //
   void       AddParamSol(AliCheb3D* param);
   void       AddParamDip(AliCheb3D* param);
@@ -70,6 +77,8 @@ class AliMagFCheb: public TNamed
  protected:
   void         Init0();
   virtual void FieldCylSol(Float_t *rphiz, Float_t *b)    const;
+ private:
+  void Copy (TObject &cheb) const;
   //
  protected:
   //