]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Fixing coding convention violation and adding Clear method (Laurent)
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 17 Jun 2007 21:04:51 +0000 (21:04 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 17 Jun 2007 21:04:51 +0000 (21:04 +0000)
MUON/AliMUONTrackParam.cxx
MUON/AliMUONTrackParam.h

index b11809ed58b3d02035b5d629d03f2f339663d4da..9507634b1c276e3b0fcfcfb3bbf22990b7172334 100644 (file)
@@ -228,7 +228,7 @@ Double_t AliMUONTrackParam::P() const
 }
 
   //__________________________________________________________________________
-TMatrixD* AliMUONTrackParam::GetCovariances()
+TMatrixD* AliMUONTrackParam::GetCovariances() const
 {
   /// Return the covariance matrix (create it before if needed)
   if (!fCovariances) {
@@ -264,11 +264,19 @@ void AliMUONTrackParam::SetVariances(Double_t matrix[5][5])
   for (Int_t i=0; i<5; i++) (*fCovariances)(i,i) = matrix[i][i];
 }
 
+//__________________________________________________________________________
+void
+AliMUONTrackParam::Clear(Option_t* /*opt*/)
+{
+  /// Delete the covariance matrix
+  DeleteCovariances();
+}
+
   //__________________________________________________________________________
 void AliMUONTrackParam::DeleteCovariances()
 {
   /// Delete the covariance matrix
-  if (fCovariances) delete fCovariances;
+  delete fCovariances;
   fCovariances = 0x0;
 }
 
index 9201d5c2b49319d62111a2dfeebc44ce6843c358..68d0236cce6114c67f12594283d9b91e6010a0ee 100644 (file)
@@ -73,7 +73,7 @@ class AliMUONTrackParam : public TObject
 
        /// return kTRUE if the covariance matrix exist, kFALSE if not
   Bool_t    CovariancesExist(void) {return (fCovariances) ? kTRUE : kFALSE;}
-  TMatrixD* GetCovariances(void);
+  TMatrixD* GetCovariances(void) const;
   void      SetCovariances(TMatrixD* covariances);
   void      SetCovariances(Double_t matrix[5][5]);
   void      SetVariances(Double_t matrix[5][5]);
@@ -87,6 +87,7 @@ class AliMUONTrackParam : public TObject
 
   virtual void Print(Option_t* opt="") const;
  
+  virtual void Clear(Option_t* opt="");
 
  private:
   // Parameters
@@ -103,7 +104,7 @@ class AliMUONTrackParam : public TObject
   ///    <X,Y>      <Y,SlopeX>        <Y,Y>      <Y,SlopeY>       <Y,InvP_yz>
   /// <X,SlopeY>  <SlopeX,SlopeY>  <Y,SlopeY>  <SlopeY,SlopeY>  <SlopeY,InvP_yz>
   /// <X,InvP_yz> <SlopeX,InvP_yz> <Y,InvP_yz> <SlopeY,InvP_yz> <InvP_yz,InvP_yz>  </pre>
-  TMatrixD *fCovariances; ///< \brief Covariance matrix of track parameters 
+  mutable TMatrixD *fCovariances; ///< \brief Covariance matrix of track parameters 
   
   AliMUONHitForRec *fHitForRecPtr; //!< Pointer to associated HitForRec if any