]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/AliTRDCalibraMode.cxx
Update of DAQ DAs for trunk version
[u/mrichter/AliRoot.git] / TRD / AliTRDCalibraMode.cxx
index 1dfada6c9b400daae93ee6e2cf59f6eb41620887..baac34bd12c88c4c61753e0aff3be58af6cb4bee 100644 (file)
 // AliTRDCalibraMode                                                             
 //                                                                             
 // This class is for the modes of the TRD calibration.        
-// The user has to choose with the functions SetNz and SetNrphi the precision of the calibration. 
+// The user has to choose with the functions SetNz and SetNrphi
+// the precision of the calibration. 
+// Author:
+//   R. Bailhache (R.Bailhache@gsi.de)
+//                            
 //Begin_Html
 /*
 <br>
 //End_Html 
 //
 //                            
-// Author:
-//   R. Bailhache (R.Bailhache@gsi.de)
-//                            
 //////////////////////////////////////////////////////////////////////////////////////
 
 #include "AliLog.h"
 
 #include "AliTRDCalibraMode.h"
-#include "AliTRDCommonParam.h"
+#include "AliTRDgeometry.h"
 
 ClassImp(AliTRDCalibraMode)
 
 //______________________________________________________________________________________
 AliTRDCalibraMode::AliTRDCalibraMode()
   :TObject()
+  ,fGeo(0)
 {
   //
   // Default constructor
@@ -89,12 +91,15 @@ AliTRDCalibraMode::AliTRDCalibraMode()
     fNfragRphi[i] = -1;
     fXbins[i]     = -1;
   }
-   
+  
+  fGeo = new AliTRDgeometry();
 }
 
 //______________________________________________________________________________________
 AliTRDCalibraMode::AliTRDCalibraMode(const AliTRDCalibraMode &c)
   :TObject(c)
+  ,fGeo(0)
 {
   //
   // Copy constructor
@@ -116,7 +121,13 @@ AliTRDCalibraMode::AliTRDCalibraMode(const AliTRDCalibraMode &c)
     fDetChamb2[k] = c.fDetChamb2[k];
   }
 
+  if (fGeo) {
+    delete fGeo;
+  }
+  fGeo = new AliTRDgeometry();
+
 }
+
 //____________________________________________________________________________________
 AliTRDCalibraMode::~AliTRDCalibraMode()
 {
@@ -124,6 +135,10 @@ AliTRDCalibraMode::~AliTRDCalibraMode()
   // AliTRDCalibraMode destructor
   //
 
+  if (fGeo) {
+    delete fGeo;
+  }
+
 }
 
 //_____________________________________________________________________________
@@ -232,16 +247,10 @@ Bool_t AliTRDCalibraMode::ModePadFragmentation(Int_t iPlane,Int_t iChamb, Int_t
 
   fNfragZ[i]    = 0;
   fNfragRphi[i] = 0;
-  
-  AliTRDCommonParam *parCom = AliTRDCommonParam::Instance();
-  if (!parCom) {
-    AliInfo("Could not get CommonParam Manager");
-    return kFALSE;
-  }
 
   // A little geometry:
-  Int_t rowMax = parCom->GetRowMax(iPlane,iChamb,iSect);
-  Int_t colMax = parCom->GetColMax(iPlane);
+  Int_t rowMax = fGeo->GetRowMax(iPlane,iChamb,iSect);
+  Int_t colMax = fGeo->GetColMax(iPlane);
   
   // The fragmentation
   if (fNnZ[i]    != 0) {