]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/mapping/macros/testMotifTypeIterators.C
Added the possibility to do diagnostics histograms.
[u/mrichter/AliRoot.git] / MUON / mapping / macros / testMotifTypeIterators.C
index 268e9e468b232a91fcb531dd3baea2446085b5a3..2c2d998d1e54882fd5f5bd6212730f78343f6ae0 100644 (file)
@@ -1,9 +1,11 @@
 // $Id$
+// $MpId: testMotifTypeIterators.C,v 1.11 2005/09/26 16:05:25 ivana Exp $
 //
 // Test macro for reading motif type data and iterate over them.
 
 void testMotifTypeIterators(AliMpStationType station = kStation1,
-                            AliMpPlaneType plane = kBendingPlane)
+                            AliMpPlaneType plane = kBendingPlane,
+                           Bool_t rootInput = false)
 {
   TString names;
   TString names2;
@@ -20,14 +22,14 @@ void testMotifTypeIterators(AliMpStationType station = kStation1,
       nv = 5;
     }  
     else {
-      names = "ABCDEFGHIIJKLMN";
-      names2 ="abcdefgijklmnopqrstuwvvvvvv";
-      nv = 6;
+      names = "ABCEFGHIJKLMN";
+      names2 ="abcdefgijklmnopqrstuwvvvvv";
+      nv = 5;
     }  
   Int_t nofMotifs = names.Length() + names2.Length(); 
   // cout << " nofMotifs: " << nofMotifs << endl;   
     
-  TH2C* histos[] = new TH2C* [names.Length()];
+  TH2C* histos[] = new TH2C* [nofMotifs];
   TCanvas* canv[] = new TCanvas* [1+(nofMotifs-1)/4];
   Int_t i;
   for (i=0;i<1+(nofMotifs-1)/4;++i){
@@ -40,7 +42,7 @@ void testMotifTypeIterators(AliMpStationType station = kStation1,
     canv[i]->Divide(2,2); 
   }
     
-  AliMpReader r(station, plane);
+  AliMpMotifReader r(station, plane);
   //r.SetVerboseLevel(2);
 
   for (i=0;i<nofMotifs;++i){
@@ -56,7 +58,7 @@ void testMotifTypeIterators(AliMpStationType station = kStation1,
       else        
         mname += "1";
     }  
-    // if (i==36) continue;  
+    //if (i==36) continue;  
         // break for these motifs (St2, BP) - to be investigated
    
     AliMpMotifType *mt = r.BuildMotifType(mname);
@@ -86,7 +88,7 @@ void testMotifTypeIterators(AliMpStationType station = kStation1,
                       it.CurrentItem().GetIndices().GetSecond(),num);
     }
 
-    delete mt;
+    //delete mt;
     histos[i]->Draw("text");
     canv[i/4]->Update();
   }