]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/mapping/macros/testSectorFind.C
Added the possibility to do diagnostics histograms.
[u/mrichter/AliRoot.git] / MUON / mapping / macros / testSectorFind.C
index 85717627441c1cf0317513d64bc2b271b81de1ac..1c1cb4120ff6f30db83c0549400e6a5f87565ebb 100644 (file)
@@ -1,15 +1,26 @@
 // $Id$
-// $MpId: testSectorFind.C,v 1.8 2005/08/24 08:53:27 ivana Exp $
+// $MpId: testSectorFind.C,v 1.10 2005/10/28 15:36:08 ivana Exp $
 //
 // Test macro for which verify that all FindPosition, FindIndices
 // and FindLocation methods are consistents between them.
 
 void testSectorFind(AliMpStationType station = kStation1,
-                    AliMpPlaneType plane = kBendingPlane)
+                    AliMpPlaneType plane = kBendingPlane,
+                   Bool_t rootInput = false) 
 {
-  AliMpSectorReader r(station, plane);
+  AliMpSector *sector = 0;
+  if (!rootInput) {
+    AliMpSectorReader r(station, plane);
+    sector=r.BuildSector();
+  }
+  else  {
+    TString filePath = AliMpFiles::SectorFilePath(station,plane);
+    filePath.ReplaceAll("zones.dat", "sector.root"); 
+
+    TFile f(filePath.Data(), "READ");
+    sector = (AliMpSector*)f.Get("Sector");
+  }  
 
-  AliMpSector *sector=r.BuildSector();
   AliMpSectorSegmentation segmentation(sector);
   AliMpVPainter* painter = AliMpVPainter::CreatePainter(sector);
   painter->Draw("ZSSMP");