]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Applyed fixes to bugs found by Rene Brun. With many thanks. Some additonal
authornilsen <nilsen@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 19 Nov 2001 16:17:03 +0000 (16:17 +0000)
committernilsen <nilsen@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 19 Nov 2001 16:17:03 +0000 (16:17 +0000)
bugs found by Rene require more work to fix. Will be fixed soon.

12 files changed:
ITS/AliITS.cxx
ITS/AliITS.h
ITS/AliITSRad.cxx
ITS/AliITSRad.h
ITS/AliITSVertex.cxx
ITS/AliITSVertex.h
ITS/AliITSclusterSSD.cxx
ITS/AliITSgeomSDD.cxx
ITS/AliITSgeomSSD.cxx
ITS/AliITSpackageSSD.cxx
ITS/AliITSpackageSSD.h
ITS/AliITSsimulationSDD.cxx

index 5bb01baaf9a1efb895a2cdcfbcd3f20192900361..13f6f325a311576ba0df12375bed008b05d921c5 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.63  2001/10/24 21:16:34  nilsen
+Removed some dead code and improved comments/documntation.
+
 Revision 1.62  2001/10/21 19:23:21  nilsen
 Added function to allow to limit which detectors to digitize and reconstruct.
 The default is All. This change makes no changes to any root file.
@@ -300,7 +303,7 @@ AliITS::AliITS() : AliDetector() {
     fEuclidOut  = 0;
     fITSgeom    = 0;
     fITSmodules = 0;
-    SetDetectors(); // default to "All". This variable not written out.
+    SetDetectors(); // default to fOpt="All". This variable not written out.
 
     fIdN        = 0;
     fIdName     = 0;
@@ -352,7 +355,7 @@ AliITS::AliITS(const char *name, const char *title):AliDetector(name,title){
     fEuclidOut  = 0;
     fITSgeom    = 0;
     fITSmodules = 0;
-    SetDetectors(); // default to "All". This variable not written out.
+    SetDetectors(); // default to fOpt="All". This variable not written out.
 
     fIdN        = 0;
     fIdName     = 0;
index 5da33cc75a862eb57d57c676ed2f2fb3a5333ffa..0b5b0eba6006a1bf66d5eea7c5b03317c9654797 100644 (file)
@@ -10,6 +10,7 @@
 ////////////////////////////////////////////////////////////////////////
 
 #include <TObjArray.h> // used in inline function GetModule.
+#include <TBranch.h>   // used in inline function SetHitsAddressBranch
 
 #include "AliDetector.h"
 
@@ -67,6 +68,8 @@ class AliITS : public AliDetector {
     virtual void SetDefaultClusterFinders();
     virtual void MakeBranch(Option_t *opt=" ", const char *file=0);
     virtual void SetTreeAddress();
+    // For a give branch from the treeH sets the TClonesArray address.
+    virtual void SetHitsAddressBranch(TBranch *b){b->SetAddress(fHits);}
     // Return pointer to DetType #id
     AliITSDetType *DetType(Int_t id);
     //Int_t           NDetTypes() {return fNDetTypes;}
index 54b0d4c892cddd154756a8cba22ef01cd17cd71a..38187da8f8327be7f9933a43db9ce0ef1f839bbc 100644 (file)
@@ -8,7 +8,18 @@
 
 
 ClassImp(AliITSRad)
+//______________________________________________________________________
+AliITSRad::AliITSRad() {
+    // Default constructor
 
+
+  fmrad1 = 0;
+  fmrad2 = 0;
+  fmrad3 = 0;
+  fmrad4 = 0;
+  fmrad5 = 0;
+  fmrad6 = 0;
+}
 AliITSRad::AliITSRad(Int_t iimax, Int_t jjmax) {
 
   imax=iimax;
index 0bdeb1e1952889da113fab3a25c67baddbd2ab2d..31370dc2e4127ef354ed83046b7f224ee958fb65 100644 (file)
@@ -17,9 +17,9 @@ class TMatrix;
 class AliITSRad : public TObject { 
 
 public:
-
+    ALIITSRAD(); // Default constructor.
   AliITSRad(Int_t iimax, Int_t jjmax);         // class constructor
-  ~AliITSRad();                                // class destructor
+  virtual ~AliITSRad();                        // class destructor
   
   Int_t Getimax() {return imax;}               // return the first dimension of the matrices
   Int_t Getjmax() {return jmax;}               // return the second dimension of the matrices
index 78c99e0d0a0bb49df808a898773c0ae29ac71c48..e713d307f7ff94fda86f25890626ee0ed0bd44d6 100644 (file)
@@ -37,9 +37,24 @@ ClassImp(AliITSVertex)
 //////////////////////////////////////////////////////////////////////
 
 
-//______________________________________________________________________________
+//______________________________________________________________________
+AliITSVertex::AliITSVertex() {
+    // Default Constructor
 
-AliITSVertex::AliITSVertex() {   
+    fPosition   = 0;
+    fResolution = 0;
+    fSNR        = 0;
+}
+//______________________________________________________________________
+AliITSVertex::~AliITSVertex() {
+    // Default Constructor
+
+    if(fPosition){ delete [] fPosition; fPostion   = 0;}
+    if(fResolution){ delete []fResoultion; fResolution = 0;}
+    if(fSNR){ delete [] fSNR;fSNR        = 0;}
+}
+//______________________________________________________________________
+void AliITSVertex::Exec(){
 
    fPosition = new Double_t[3];
    fResolution = new Double_t[3];
@@ -422,27 +437,15 @@ AliITSVertex::AliITSVertex() {
    delete hITSYv;
    
 }
-
-
-//______________________________________________________________________________
-
-AliITSVertex::~AliITSVertex() { 
-   delete [] fPosition;
-   delete [] fResolution;
-   delete [] fSNR;
-}
-
-//______________________________________________________________________________
-
+//______________________________________________________________________
 Double_t AliITSVertex::PhiFunc(Float_t p[]) {
-         Double_t phi=0;
-         if(p[1]>0 && p[0]>0) phi=(TMath::ATan((Double_t)(p[1]/p[0]))*57.29578);
-         if(p[1]>0 && p[0]<0) phi=(TMath::ATan((Double_t)(p[1]/p[0]))*57.29578)+180;
-         if(p[1]<0 && p[0]<0) phi=(TMath::ATan((Double_t)(p[1]/p[0]))*57.29578)+180;
-         if(p[1]<0 && p[0]>0) phi=(TMath::ATan((Double_t)(p[1]/p[0]))*57.29578)+360;
-         return phi;
-}
-
-//______________________________________________________________________________
+    Double_t phi=0;
 
+    if(p[1]>0 && p[0]>0) phi=(TMath::ATan((Double_t)(p[1]/p[0]))*57.29578);
+    if(p[1]>0 && p[0]<0) phi=(TMath::ATan((Double_t)(p[1]/p[0]))*57.29578)+180;
+    if(p[1]<0 && p[0]<0) phi=(TMath::ATan((Double_t)(p[1]/p[0]))*57.29578)+180;
+    if(p[1]<0 && p[0]>0) phi=(TMath::ATan((Double_t)(p[1]/p[0]))*57.29578)+360;
+    return phi;
+}
 
+//______________________________________________________________________
index 714f74aee80568b233353535c16ea8e4735f2792..a8376848f6ffd60a4750516ecc89e117a0f29395 100644 (file)
@@ -16,7 +16,8 @@ class AliITSVertex : public TObject  {
  public:
  
         AliITSVertex();
-        ~AliITSVertex();
+        virtual ~AliITSVertex();
+       void Exec();
         Double_t PhiFunc(Float_t p[]);
 
 //      This class determines 3D vertex position, resolution and signal 
index fc054e8309294875ccbd42025a7b395a867b0798..a5caddfb65b7c868cf379b331aadd8a3f429f34e 100644 (file)
@@ -17,7 +17,7 @@ AliITSclusterSSD::AliITSclusterSSD()
        fNTracks      = -1;
        fLeftNeighbour  = kFALSE;
        fRightNeighbour = kFALSE;
-       fCrossedClusterIndexes = new TArrayI(300);
+       fCrossedClusterIndexes = 0;
        fConsumed=kFALSE;
 
 }
index b7ebad9012c64dda1e6c450bc593c00db2410101..b8be382424be3be3a55210b185cfe95af7e0005a 100644 (file)
 
 /*
 $Log$
+Revision 1.14  2001/10/19 21:32:35  nilsen
+Minor changes to remove compliation warning on gcc 2.92.2 compiler, and
+cleanded up a little bit of code.
+
 Revision 1.13  2001/10/12 22:07:20  nilsen
 A patch for C++ io manipulation functions so that they will work both
 with GNU gcc 2.96 and GNU gcc 3.01 compilers. Needs to be tested with
@@ -146,8 +150,8 @@ AliITSgeomSDD::~AliITSgeomSDD(){
 // Destructor
 
     if(fShapeSDD!=0) delete fShapeSDD;
-    if(fAnodeLowEdgeL!=0) delete fAnodeLowEdgeL;
-    if(fAnodeLowEdgeR!=0) delete fAnodeLowEdgeR;
+    if(fAnodeLowEdgeL!=0) delete [] fAnodeLowEdgeL;
+    if(fAnodeLowEdgeR!=0) delete [] fAnodeLowEdgeR;
     fShapeSDD  = 0;
     fPeriod    = 0.0;
     fDvelocity = 0.0;
@@ -319,6 +323,10 @@ istream &operator>>(istream &is,AliITSgeomSDD &r){
 //======================================================================
 /*
 $Log$
+Revision 1.14  2001/10/19 21:32:35  nilsen
+Minor changes to remove compliation warning on gcc 2.92.2 compiler, and
+cleanded up a little bit of code.
+
 Revision 1.13  2001/10/12 22:07:20  nilsen
 A patch for C++ io manipulation functions so that they will work both
 with GNU gcc 2.96 and GNU gcc 3.01 compilers. Needs to be tested with
@@ -789,6 +797,10 @@ istream &operator>>(istream &is,AliITSgeomSDD256 &r){
 //======================================================================
 /*
 $Log$
+Revision 1.14  2001/10/19 21:32:35  nilsen
+Minor changes to remove compliation warning on gcc 2.92.2 compiler, and
+cleanded up a little bit of code.
+
 Revision 1.13  2001/10/12 22:07:20  nilsen
 A patch for C++ io manipulation functions so that they will work both
 with GNU gcc 2.96 and GNU gcc 3.01 compilers. Needs to be tested with
index 85101470c1ac1378afb87d02f9aa29a3f4d0b059..e71d15e3b7d23ee0b107398c73f77ef57adf9742 100644 (file)
 
 /*
 $Log$
+Revision 1.13  2001/10/12 22:07:20  nilsen
+A patch for C++ io manipulation functions so that they will work both
+with GNU gcc 2.96 and GNU gcc 3.01 compilers. Needs to be tested with
+other platforms.
+
 Revision 1.12  2001/08/24 21:06:37  nilsen
 Added more documentation, fixed up some coding violations, and some
 forward declorations.
@@ -125,9 +130,9 @@ void AliITSgeomSSD::ResetSSD(const Float_t *box,Float_t ap,Float_t an,
 AliITSgeomSSD::~AliITSgeomSSD(){
     // Destructor.
 
-    delete fLowEdgeP; fLowEdgeP = 0;
-    delete fLowEdgeN; fLowEdgeN = 0;
-    delete fShapeSSD; fShapeSSD = 0;
+    if(fLowEdgeP) delete [] fLowEdgeP; fLowEdgeP = 0;
+    if(fLowEdgeN) delete [] fLowEdgeN; fLowEdgeN = 0;
+    if(fShapeSSD) delete  fShapeSSD; fShapeSSD = 0;
     fNp = 0;
     fNn = 0;
     fAngleP = 0.0;
@@ -284,6 +289,11 @@ istream &operator>>(istream &is,AliITSgeomSSD &r){
 //======================================================================
 /*
 $Log$
+Revision 1.13  2001/10/12 22:07:20  nilsen
+A patch for C++ io manipulation functions so that they will work both
+with GNU gcc 2.96 and GNU gcc 3.01 compilers. Needs to be tested with
+other platforms.
+
 Revision 1.12  2001/08/24 21:06:37  nilsen
 Added more documentation, fixed up some coding violations, and some
 forward declorations.
@@ -359,6 +369,11 @@ istream &operator>>(istream &is,AliITSgeomSSD175 &r){
 //======================================================================
 /*
 $Log$
+Revision 1.13  2001/10/12 22:07:20  nilsen
+A patch for C++ io manipulation functions so that they will work both
+with GNU gcc 2.96 and GNU gcc 3.01 compilers. Needs to be tested with
+other platforms.
+
 Revision 1.12  2001/08/24 21:06:37  nilsen
 Added more documentation, fixed up some coding violations, and some
 forward declorations.
@@ -443,6 +458,11 @@ istream &operator>>(istream &is,AliITSgeomSSD275and75 &r){
 //======================================================================
 /*
 $Log$
+Revision 1.13  2001/10/12 22:07:20  nilsen
+A patch for C++ io manipulation functions so that they will work both
+with GNU gcc 2.96 and GNU gcc 3.01 compilers. Needs to be tested with
+other platforms.
+
 Revision 1.12  2001/08/24 21:06:37  nilsen
 Added more documentation, fixed up some coding violations, and some
 forward declorations.
index a9656e2dac07e8da86a8b326612343b65b77d676..785be49bfe43fdbbab66999d131dfecb98030459 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.4  2000/07/12 05:32:20  fca
+Correcting several syntax problem with static members
+
 */
 
 #include <iostream.h>
@@ -37,10 +40,10 @@ ClassImp(AliITSpackageSSD)
 AliITSpackageSSD::AliITSpackageSSD()
 {
   fNclustersN=0;
-  fClusterNIndexes = new TArrayI(300)
+  fClusterNIndexes = 0
                
   fNclustersP=0;
-  fClusterPIndexes = new TArrayI(300);
+  fClusterPIndexes = 0;
   if (debug) cout<<"Default Ctor was used\n>>>>>>>>>>>>>><<<<<<<<<<<<<";
 }
 
index 469136e76696960576bba9a340339a26047322f9..5dba2843cc2e6ce9aead6cf5706e809fee0f752f 100644 (file)
@@ -103,10 +103,3 @@ private:
 };
 
 #endif
-
-
-
-
-
-
-
index 1152e969c3dda92630c9569f954081b1f0f86ad5..2e8f8424f35022a093a237880552bd2e560d0cb6 100644 (file)
@@ -303,12 +303,6 @@ AliITSsimulationSDD::~AliITSsimulationSDD() {
     delete fStream;
     delete fElectronics;
 
-    fD.Set(0);
-    fT1.Set(0);
-    fT2.Set(0);
-    fTol.Set(0);
-    fNoise.Set(0);
-    fBaseline.Set(0);
     fITS = 0;
 
     if (fHis) {