]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/mapping/macros/testPadDimensions.C
Added Bool_t rootInput argument; if set to true, the sector
[u/mrichter/AliRoot.git] / MUON / mapping / macros / testPadDimensions.C
index 1c7dba9691cc2c9c35f7628adb99290e4ccae99f..31638d34e41e2abd854fe82271334c217dc22d7d 100644 (file)
@@ -1,14 +1,26 @@
 // $Id$
-// $MpId: testPadDimensions.C,v 1.4 2005/08/24 08:53:27 ivana Exp $
+// $MpId: testPadDimensions.C,v 1.5 2005/09/26 16:05:25 ivana Exp $
 //
 // Test macro for testing retrieving of pad dimensions from
 // the map in AliMpSectorSegmentation.
 
 void testPadDimensions(AliMpStationType station = kStation1,
-                       AliMpPlaneType plane = kBendingPlane) 
+                       AliMpPlaneType plane = kBendingPlane,
+                      Bool_t rootInput = false)
 {
-  AliMpSectorReader r(station, plane);
-  AliMpSector* sector=r.BuildSector();
+  AliMpSector *sector = 0;
+  if (!rootInput) {
+    AliMpSectorReader r(station, plane);
+    sector=r.BuildSector();
+  }
+  else  {
+    TString filePath = AliMpFiles::Instance()->SectorFilePath(station,plane);
+    filePath.ReplaceAll("zones.dat", "sector.root"); 
+
+    TFile f(filePath.Data(), "READ");
+    sector = (AliMpSector*)f.Get("Sector");
+  }  
+
   AliMpSectorSegmentation segmentation(sector);  
   segmentation.PrintZones();