Bugs soved by Peter Hristov.
authordibari <dibari@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 6 Mar 2008 13:52:47 +0000 (13:52 +0000)
committerdibari <dibari@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 6 Mar 2008 13:52:47 +0000 (13:52 +0000)
HMPID/AliHMPIDCluster.h
HMPID/AliHMPIDParam.cxx
HMPID/AliHMPIDParam.h

index 9d1f644..f7d2c11 100644 (file)
@@ -82,7 +82,7 @@ protected:
   Double_t      fChi2;        //some estimator of the fit quality
   TObjArray    *fDigs;        //! list of digits forming this cluster
   static  Bool_t fgDoCorrSin; //flag to switch on/off correction for Sinusoidal to cluster reco
-  AliHMPIDParam *fParam;      // Pointer to AliHMPIDParam
+  AliHMPIDParam *fParam;      //!Pointer to AliHMPIDParam
   
 private:
 /*
@@ -96,7 +96,7 @@ private:
   AliHMPIDCluster &operator=(const AliHMPIDCluster& c);   //dummy assignment operator
       
   
-  ClassDef(AliHMPIDCluster,8) //HMPID cluster class
+  ClassDef(AliHMPIDCluster,9) //HMPID cluster class
 };
 
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
index ae44679..7afbebf 100644 (file)
@@ -103,7 +103,7 @@ AliHMPIDParam::AliHMPIDParam(Bool_t noGeo=kFALSE):TNamed("HmpidParam","default v
         IdealPosition(i,fM[i]);
       } else {
         TGeoPhysicalNode *pnode = pne->GetPhysicalNode();
-        if(pnode) fM[i]=pnode->GetMatrix();
+        if(pnode) fM[i]=new TGeoHMatrix(*(pnode->GetMatrix()));
         else {
           fM[i]=new TGeoHMatrix;
           IdealPosition(i,fM[i]);
index f5fff4a..0b7bb8b 100644 (file)
@@ -19,8 +19,15 @@ class AliHMPIDParam :public TNamed
 {
 public:
 //ctor&dtor    
-  virtual        ~AliHMPIDParam()                                    {for(Int_t i=0;i<7;i++) delete fM[i]; delete fgInstance; fgInstance=0;}
-         void     Print(Option_t *opt="") const;                                         //print current parametrization
+  virtual        ~AliHMPIDParam() {
+    if (fgInstance){
+      for(Int_t i=0;i<7;i++){ delete fM[i]; fM[i] = 0x0;}
+      fgInstance=0;
+    }
+  }
+  
+  void     Print(Option_t *opt="") const;                                         //print current parametrization
+         
   static inline AliHMPIDParam* Instance();                                //pointer to AliHMPIDParam singleton
   static inline AliHMPIDParam* InstanceNoGeo();                           //pointer to AliHMPIDParam singleton without geometry.root for MOOD, displays, ...
 //geo info