]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
In Mapping/macros:
authorivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 18 Mar 2009 09:19:40 +0000 (09:19 +0000)
committerivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 18 Mar 2009 09:19:40 +0000 (09:19 +0000)
- Renaming the main macro function to be consistent with new macro name;
- create a new canvas each time when the macro is run for other station/plane
  combination.
- Adding test suite script

17 files changed:
MUON/mapping/macros/testSt12AllIndices.C
MUON/mapping/macros/testSt12AnyPadIterators.C
MUON/mapping/macros/testSt12ExistingPads.C
MUON/mapping/macros/testSt12ExistingPads2.C
MUON/mapping/macros/testSt12Graphics.C
MUON/mapping/macros/testSt12IndicesLimits.C
MUON/mapping/macros/testSt12MotifTypeIterators.C
MUON/mapping/macros/testSt12NeighboursPadIterator.C
MUON/mapping/macros/testSt12PadDimensions.C
MUON/mapping/macros/testSt12PadsUpEtc.C
MUON/mapping/macros/testSt12PrintLimits.C
MUON/mapping/macros/testSt12ReadMotifType.C
MUON/mapping/macros/testSt12ReadSector.C
MUON/mapping/macros/testSt12SectorAreaIterator.C
MUON/mapping/macros/testSt12SectorFind.C
MUON/mapping/macros/testSt12SectorPadIterators.C
MUON/mapping/macros/test_suite.sh [new file with mode: 0755]

index b6f8feb1c9ee60a1a761783665faef6d30005f41..27e1be0d5361b7727506fbd8c64309e1084ed641 100644 (file)
 
 #include <Riostream.h>
 #include <TCanvas.h>
+#include <TString.h>
 #include <TH2.h>
 
 #endif
 
+TCanvas* CreateTCanvas(const TString& name, const TString& title,
+                       AliMq::Station12Type station, AliMp::PlaneType plane)
+{
+  TString newName(name);
+  TString newTitle(title);
+  TString unique = AliMq::Station12TypeName(station) + AliMp::PlaneTypeName(plane);
+  newName += unique;
+  newTitle += unique;
+  return new TCanvas(newName.Data(), newTitle.Data());
+}                     
+
 void testAllIndices(AliMq::Station12Type station, AliMp::PlaneType plane) 
 {
   AliMpDataProcessor mp;
@@ -38,8 +50,9 @@ void testAllIndices(AliMq::Station12Type station, AliMp::PlaneType plane)
   AliMpSectorSegmentation segmentation(sector);
   AliMpVPainter* painter = AliMpVPainter::CreatePainter(sector);
 
-  TCanvas* c1 = new TCanvas("view",
-                            "MSectorPainter::Draw() output (view per pad)");
+  TCanvas* c1 = CreateTCanvas("view ", 
+                              "MSectorPainter::Draw() output (view per pad) ", 
+                              station, plane);
   painter->Draw("ZSSMP");
   c1->Update();
 
@@ -62,8 +75,8 @@ void testAllIndices(AliMq::Station12Type station, AliMp::PlaneType plane)
                           nx2, 0, nx2*2, ny2, 0, ny2*2);
 
   // Define canvas
-  TCanvas* c2 = new TCanvas("c2","Only existing pads are filled");
-  TCanvas* c3 = new TCanvas("c3","Positions");
+  TCanvas* c2 = CreateTCanvas("c2 ", "Only existing pads are filled ", station, plane);
+  TCanvas* c3 = CreateTCanvas("c3 ", "Positions ", station, plane);
   
   for ( Int_t irow=0; irow<sector->GetNofRows(); irow++ ) {
     AliMpRow* row = sector->GetRow(irow);
@@ -96,7 +109,7 @@ void testAllIndices(AliMq::Station12Type station, AliMp::PlaneType plane)
   histo2->Draw("box");
 }
 
-void testAllIndices()
+void testSt12AllIndices()
 {
   AliMq::Station12Type  station[2] = { AliMq::kStation1, AliMq::kStation2 }; 
   AliMp::PlaneType      plane[2]   = { AliMp::kBendingPlane, AliMp::kNonBendingPlane };
index 348284a112d177161730cf1e9d407e5a2c9a6fd0..afdd3a34e9e9234953efa87a34f55ba9a763f990 100644 (file)
 
 #endif
 
+TCanvas* CreateTCanvas(const TString& name, const TString& title,
+                       AliMq::Station12Type station, AliMp::PlaneType plane)
+{
+  TString newName(name);
+  TString newTitle(title);
+  TString unique = AliMq::Station12TypeName(station) + AliMp::PlaneTypeName(plane);
+  newName += unique;
+  newTitle += unique;
+  return new TCanvas(newName.Data(), newTitle.Data());
+}                     
+
 class AliMpVPadIterator;
 void MarkPads(AliMpVPadIterator& it,Int_t xmax,Int_t ymax,Bool_t print=kTRUE)
 {
@@ -61,7 +72,7 @@ void testAnyPadIterators(AliMq::Station12Type station, AliMp::PlaneType plane,
   AliMpSector* sector = r.BuildSector();
   AliMpSectorSegmentation segmentation(sector);
     
-  TCanvas *canv = new TCanvas("canv");
+  TCanvas* canv = CreateTCanvas("canv ", "", station, plane);
   canv->Divide(2,2);
   
   canv->cd(1);
@@ -97,7 +108,7 @@ void testAnyPadIterators(AliMq::Station12Type station, AliMp::PlaneType plane,
   }
 }
 
-void testAnyPadIterators()
+void testSt12AnyPadIterators()
 {
   AliMq::Station12Type  station[2] = { AliMq::kStation1, AliMq::kStation2 }; 
   AliMp::PlaneType      plane[2]   = { AliMp::kBendingPlane, AliMp::kNonBendingPlane };
index 5a54911128d0ae984067cfbae876e61561cabca6..54b148ae1ec3443c40e103dfc36ee39355f99655 100644 (file)
 
 #endif
 
+TCanvas* CreateTCanvas(const TString& name, const TString& title,
+                       AliMq::Station12Type station, AliMp::PlaneType plane)
+{
+  TString newName(name);
+  TString newTitle(title);
+  TString unique = AliMq::Station12TypeName(station) + AliMp::PlaneTypeName(plane);
+  newName += unique;
+  newTitle += unique;
+  return new TCanvas(newName.Data(), newTitle.Data());
+}                     
+
 void testExistingPads(AliMq::Station12Type station,AliMp::PlaneType plane)
 {
   AliMpDataProcessor mp;
@@ -39,8 +50,9 @@ void testExistingPads(AliMq::Station12Type station,AliMp::PlaneType plane)
   AliMpSectorSegmentation* segmentation = new AliMpSectorSegmentation(sector);
   AliMpVPainter* painter = AliMpVPainter::CreatePainter(sector);
 
-  TCanvas* c1 = new TCanvas("view",
-                            "AliMpSectorPainter::Draw() output (view per pad)");
+  TCanvas* c1 = CreateTCanvas("view ",
+                            "AliMpSectorPainter::Draw() output (view per pad) ",
+                            station, plane);
   painter->Draw("ZSSMP");
   c1->Update();
 
@@ -53,7 +65,8 @@ void testExistingPads(AliMq::Station12Type station,AliMp::PlaneType plane)
   TH2C* histo = new TH2C("histo","Existing pads", 
                           nx, -0.5, nx-0.5, ny, -0.5, ny-0.5);
 
-  TCanvas* c2 = new TCanvas("c2","Only existing pads are filled");
+  TCanvas* c2 = CreateTCanvas("c2 ","Only existing pads are filled ",
+                              station, plane);
 
   for (Int_t i=0; i<maxPadIndexX+1;i++){
     for (Int_t j=0;j<maxPadIndexY+1;++j){
@@ -70,7 +83,8 @@ void testExistingPads(AliMq::Station12Type station,AliMp::PlaneType plane)
   TH2C* histo2 = new TH2C("histo2","Existing pads2", 
                           nx, -0.5, nx-0.5, ny, -0.5, ny-0.5);
 
-  TCanvas* c3 = new TCanvas("c3","Only existing pads are filled");
+  TCanvas* c3 = CreateTCanvas("c3 ","Only existing pads are filled ",
+                              station, plane);
 
   AliMpFastSegmentation* fast = new AliMpFastSegmentation(segmentation);
   for (Int_t i=0; i<maxPadIndexX+1;i++){
@@ -87,7 +101,7 @@ void testExistingPads(AliMq::Station12Type station,AliMp::PlaneType plane)
   delete fast;
 }
 
-void testExistingPads()
+void testSt12ExistingPads()
 {
   AliMq::Station12Type  station[2] = { AliMq::kStation1, AliMq::kStation2 }; 
   AliMp::PlaneType      plane[2]   = { AliMp::kBendingPlane, AliMp::kNonBendingPlane };
index 3a9618a594e9fddcd2e0179f8070db80a26c2747..7e4e747339759db193d4aef83414ff866f7f2aa5 100644 (file)
@@ -94,7 +94,7 @@ void testExistingPads2(AliMq::Station12Type station, AliMp::PlaneType plane,
   delete segmentation;
 }
 
-void testExistingPads2()
+void testSt12ExistingPads2()
 {
   AliMq::Station12Type  station[2] = { AliMq::kStation1, AliMq::kStation2 }; 
   AliMp::PlaneType      plane[2]   = { AliMp::kBendingPlane, AliMp::kNonBendingPlane };
index d42d8fb26f488732f55a81353984eaf133bc6979..963a0d5bec9928c71de2239d32c323bfae3a4418 100644 (file)
 
 #endif
 
+TCanvas* CreateTCanvas(const TString& name, const TString& title,
+                       AliMq::Station12Type station, AliMp::PlaneType plane)
+{
+  TString newName(name);
+  TString newTitle(title);
+  TString unique = AliMq::Station12TypeName(station) + AliMp::PlaneTypeName(plane);
+  newName += unique;
+  newTitle += unique;
+  return new TCanvas(newName.Data(), newTitle.Data());
+}                     
+
 void testGraphics(AliMq::Station12Type station, AliMp::PlaneType plane) 
 {
   AliMpDataProcessor mp;
@@ -104,7 +115,7 @@ void testGraphics(AliMq::Station12Type station, AliMp::PlaneType plane)
   Int_t id = sector->GetRow(5)->GetRowSegment(0)->GetMotifPositionId(0);
   AliMpMotifPosition* motifPos = sector->GetMotifMap()->FindMotifPosition(id);
   AliMpVPainter* motifPainter = AliMpVPainter::CreatePainter(motifPos);
-  new TCanvas("onepad","One motif");
+  CreateTCanvas("onepad ","One motif ", station, plane);
   motifPainter->Draw("PT");
   
   //////////////////////////////  
@@ -113,7 +124,7 @@ void testGraphics(AliMq::Station12Type station, AliMp::PlaneType plane)
   painter->Draw("RSMCI");
 }
 
-void testGraphics()
+void testSt12Graphics()
 {
   AliMq::Station12Type  station[2] = { AliMq::kStation1, AliMq::kStation2 }; 
   AliMp::PlaneType      plane[2]   = { AliMp::kBendingPlane, AliMp::kNonBendingPlane };
index 59c7f2c278c37b4632642661de0165918d522ae2..440e0803e55a6937b348e50976957496b18efd07 100644 (file)
@@ -76,7 +76,7 @@ void testIndicesLimits(AliMq::Station12Type station,AliMp::PlaneType plane)
   delete sector;
 }                             
       
-void testIndicesLimits()
+void testSt12IndicesLimits()
 {
   AliMq::Station12Type  station[2] = { AliMq::kStation1, AliMq::kStation2 }; 
   AliMp::PlaneType      plane[2]   = { AliMp::kBendingPlane, AliMp::kNonBendingPlane };
index 0673c79e84ea33eebfc61efb15d68e4ce1da6a8b..ffab3ab09f9edc09021439035cee53ac7615b145 100644 (file)
 
 #endif
 
+TCanvas* CreateTCanvas(const TString& name, const TString& title,
+                       AliMq::Station12Type station, AliMp::PlaneType plane)
+{
+  TString newName(name);
+  TString newTitle(title);
+  TString unique = AliMq::Station12TypeName(station) + AliMp::PlaneTypeName(plane);
+  newName += unique;
+  newTitle += unique;
+  return new TCanvas(newName.Data(), newTitle.Data());
+}                     
+
 void testMotifTypeIterators(AliMq::Station12Type station, AliMp::PlaneType plane)
 {
   TString names;
@@ -54,7 +65,7 @@ void testMotifTypeIterators(AliMq::Station12Type station, AliMp::PlaneType plane
   Int_t i;
   for (i=0;i<1+(nofMotifs-1)/4;++i){
     TString cname("canv"); cname += i;
-    TCanvas* canv = new TCanvas(cname.Data(),"Iterator viewing...");
+    TCanvas* canv = CreateTCanvas(cname.Data(),"Iterator viewing...", station, plane);
     canv->Divide(2,2); 
     cvs.push_back(canv);
   }
@@ -115,7 +126,7 @@ void testMotifTypeIterators(AliMq::Station12Type station, AliMp::PlaneType plane
     cvs[i/4]->Update();
   }
 }
-void testMotifTypeIterators()
+void testSt12MotifTypeIterators()
 {
   AliMq::Station12Type  station[2] = { AliMq::kStation1, AliMq::kStation2 }; 
   AliMp::PlaneType      plane[2]   = { AliMp::kBendingPlane, AliMp::kNonBendingPlane };
index bf6f2125edf5c170f2958579e3bf645d330f19bd..2bef97aaabc2c4d9f29651f7e58dee40e0fb31b5 100644 (file)
 
 #endif
 
+TCanvas* CreateTCanvas(const TString& name, const TString& title,
+                       AliMq::Station12Type station, AliMp::PlaneType plane)
+{
+  TString newName(name);
+  TString newTitle(title);
+  TString unique = AliMq::Station12TypeName(station) + AliMp::PlaneTypeName(plane);
+  newName += unique;
+  newTitle += unique;
+  return new TCanvas(newName.Data(), newTitle.Data());
+}                     
+
 void testNeighboursPadIterator(AliMq::Station12Type station, AliMp::PlaneType plane,
                                Int_t i=50, Int_t j=50)
 {
@@ -34,7 +45,7 @@ void testNeighboursPadIterator(AliMq::Station12Type station, AliMp::PlaneType pl
   AliMpSector* sector = r.BuildSector();
   AliMpSectorSegmentation segm(sector);  
   
-  new TCanvas("canv");
+  CreateTCanvas("canv ", "", station, plane);
 
   const Double_t xmax=75;
   const Double_t ymax=120;
@@ -67,7 +78,7 @@ void testNeighboursPadIterator(AliMq::Station12Type station, AliMp::PlaneType pl
   delete sector;
 }
 
-void testNeighboursPadIterator()
+void testSt12NeighboursPadIterator()
 {
   AliMq::Station12Type  station[2] = { AliMq::kStation1, AliMq::kStation2 }; 
   AliMp::PlaneType      plane[2]   = { AliMp::kBendingPlane, AliMp::kNonBendingPlane };
index 0fe05dd60902f10b29ced6cbedee49c74a1c5c45..2f753b695c84833ad51a29fdc07ff61ffdbe4a90 100644 (file)
@@ -55,7 +55,7 @@ void testPadDimensions(AliMq::Station12Type station, AliMp::PlaneType plane)
    }
 }
 
-void testPadDimensions()
+void testSt12PadDimensions()
 {
   AliMq::Station12Type  station[2] = { AliMq::kStation1, AliMq::kStation2 }; 
   AliMp::PlaneType      plane[2]   = { AliMp::kBendingPlane, AliMp::kNonBendingPlane };
index 0625e9b761121468d6587e2d7802e072768d5e03..ee4d981a52e16061304a487f1a81312e5d61a136 100644 (file)
@@ -77,7 +77,7 @@ void testPadsUpEtc(AliMq::Station12Type station, AliMp::PlaneType  plane)
   }  
 }
 
-void testPadsUpEtc()
+void testSt12PadsUpEtc()
 {
   AliMq::Station12Type  station[2] = { AliMq::kStation1, AliMq::kStation2 }; 
   AliMp::PlaneType      plane[2]   = { AliMp::kBendingPlane, AliMp::kNonBendingPlane };
index 7a86262078573c66cb2bf820107de00a64ce0925..712b95906decebfb551d4c11a9a88154c6a13231 100644 (file)
 
 #endif
 
+TCanvas* CreateTCanvas(const TString& name, const TString& title,
+                       AliMq::Station12Type station, AliMp::PlaneType plane)
+{
+  TString newName(name);
+  TString newTitle(title);
+  TString unique = AliMq::Station12TypeName(station) + AliMp::PlaneTypeName(plane);
+  newName += unique;
+  newTitle += unique;
+  return new TCanvas(newName.Data(), newTitle.Data());
+}                     
+
 void testPrintLimits(AliMq::Station12Type station, AliMp::PlaneType  plane,
                     ostream& out=cout)
 {
@@ -34,6 +45,7 @@ void testPrintLimits(AliMq::Station12Type station, AliMp::PlaneType  plane,
   AliMpSectorReader r(dataStreams, station, plane);
   AliMpSector* sector = r.BuildSector();
   
+  //new TCanvas(" ", " ", station, plane);  // BREAKS
   new TCanvas();
 
   AliMpVPainter* painter = AliMpVPainter::CreatePainter(sector);
@@ -96,7 +108,7 @@ void testPrintLimits(AliMq::Station12Type station, AliMp::PlaneType  plane,
   }
 }
 
-void testPrintLimits()
+void testSt12PrintLimits()
 {
   AliMq::Station12Type  station[2] = { AliMq::kStation1, AliMq::kStation2 }; 
   AliMp::PlaneType      plane[2]   = { AliMp::kBendingPlane, AliMp::kNonBendingPlane };
index 9b824b128132c7618ad4fc26405dde973e16faae..ba8569922abf8035a5c681f2149700910771147d 100644 (file)
@@ -74,7 +74,7 @@ void testReadMotifType(AliMq::Station12Type station, AliMp::PlaneType plane)
   }
 }
 
-void testReadMotifType()
+void testSt12ReadMotifType()
 {
   AliMq::Station12Type  station[2] = { AliMq::kStation1, AliMq::kStation2 }; 
   AliMp::PlaneType      plane[2]   = { AliMp::kBendingPlane, AliMp::kNonBendingPlane };
index e07909a3c5beddb2c0fb0ce64186d21d87aab1e8..d798302346421ea0f1c89eca578e5c1c0b329265 100644 (file)
@@ -111,7 +111,7 @@ void testReadSector(AliMq::Station12Type station, AliMp::PlaneType plane)
   delete sector;
 }                             
      
-void testReadSector()
+void testSt12ReadSector()
 {
   AliMq::Station12Type  station[2] = { AliMq::kStation1, AliMq::kStation2 }; 
   AliMp::PlaneType      plane[2]   = { AliMp::kBendingPlane, AliMp::kNonBendingPlane };
index aa7bad42adf4559e3ab0f1119bba17cd35a965d5..1ea7fa6b62239fcc860eca0867a6881f12529111 100644 (file)
 
 class AliMpVPadIterator;
 
+TCanvas* CreateTCanvas(const TString& name, const TString& title,
+                       AliMq::Station12Type station, AliMp::PlaneType plane)
+{
+  TString newName(name);
+  TString newTitle(title);
+  TString unique = AliMq::Station12TypeName(station) + AliMp::PlaneTypeName(plane);
+  newName += unique;
+  newTitle += unique;
+  return new TCanvas(newName.Data(), newTitle.Data());
+}                     
+
 void MarkPads(AliMpVPadIterator& it, Double_t xmax, Double_t ymax, 
+              AliMq::Station12Type station, AliMp::PlaneType plane,
               Bool_t print = kTRUE)
 {
 // Marks pads according their position.
@@ -58,7 +70,7 @@ void MarkPads(AliMpVPadIterator& it, Double_t xmax, Double_t ymax,
                 it.CurrentItem().GetIndices().GetSecond());            
   }
   
-  TCanvas *canv2 = new TCanvas("canv2");
+  TCanvas* canv2 = CreateTCanvas("canv2 ", " ", station, plane);
   canv2->cd();
   //histo->SetMinimum(1.5);
   histo->Draw("box");
@@ -84,16 +96,17 @@ void testSectorAreaIterator(AliMq::Station12Type station, AliMp::PlaneType plane
     area = AliMpArea(TVector2(60.,60.),TVector2(60.,60.));
   AliMpVPadIterator* iter = segmentation.CreateIterator(area);
 
-  new TCanvas("Graph");
+  CreateTCanvas("Graph ", " ", station, plane);
   AliMpVPainter::CreatePainter(sector)->Draw("ZSSMP");
 
-  TCanvas* canv = new TCanvas("canv");
+  TCanvas* canv = CreateTCanvas("canv ", " ", station, plane);
   canv->Range(-1,-1,1,1);
   MarkPads(*iter, TMath::Abs(area.Position().X())+area.Dimensions().X(),
-                  TMath::Abs(area.Position().Y())+area.Dimensions().Y(), kTRUE);
+                  TMath::Abs(area.Position().Y())+area.Dimensions().Y(), 
+                  station, plane, kTRUE);
 }
      
-void testSectorAreaIterator()
+void testSt12SectorAreaIterator()
 {
   AliMq::Station12Type  station[2] = { AliMq::kStation1, AliMq::kStation2 }; 
   AliMp::PlaneType      plane[2]   = { AliMp::kBendingPlane, AliMp::kNonBendingPlane };
index df663caedd59ea6ded2a531d0b9889cc166f3615..172da291463ac63d7c9acae6f14b574e16daf63a 100644 (file)
 
 #endif
 
+TCanvas* CreateTCanvas(const TString& name, const TString& title,
+                       AliMq::Station12Type station, AliMp::PlaneType plane)
+{
+  TString newName(name);
+  TString newTitle(title);
+  TString unique = AliMq::Station12TypeName(station) + AliMp::PlaneTypeName(plane);
+  newName += unique;
+  newTitle += unique;
+  return new TCanvas(newName.Data(), newTitle.Data());
+}                     
+
 void testSectorFind(AliMq::Station12Type station, AliMp::PlaneType plane) 
 {
   AliMpDataProcessor mp;
@@ -33,7 +44,7 @@ void testSectorFind(AliMq::Station12Type station, AliMp::PlaneType plane)
   AliMpSector* sector = r.BuildSector();
   AliMpSectorSegmentation segmentation(sector);
   
-  new TCanvas();
+  CreateTCanvas("", "", station, plane);
   AliMpVPainter* painter = AliMpVPainter::CreatePainter(sector);
   painter->Draw("ZSSMP");
 
@@ -45,7 +56,7 @@ void testSectorFind(AliMq::Station12Type station, AliMp::PlaneType plane)
   }
 }
 
-void testSectorFind()
+void testSt12SectorFind()
 {
   AliMq::Station12Type  station[2] = { AliMq::kStation1, AliMq::kStation2 }; 
   AliMp::PlaneType      plane[2]   = { AliMp::kBendingPlane, AliMp::kNonBendingPlane };
index bf616ae8daa45a6af9a873fc9e31eab9a59a651a..91c0f196f6cef3f07d35cdced051f1952a4fedbc 100644 (file)
 
 #endif
 
+TCanvas* CreateTCanvas(const TString& name, const TString& title,
+                       AliMq::Station12Type station, AliMp::PlaneType plane)
+{
+  TString newName(name);
+  TString newTitle(title);
+  TString unique = AliMq::Station12TypeName(station) + AliMp::PlaneTypeName(plane);
+  newName += unique;
+  newTitle += unique;
+  return new TCanvas(newName.Data(), newTitle.Data());
+}                     
+
 void testSectorPadIterators(AliMq::Station12Type station, AliMp::PlaneType plane)
 {
   AliMpDataProcessor mp;
@@ -35,7 +46,7 @@ void testSectorPadIterators(AliMq::Station12Type station, AliMp::PlaneType plane
   Int_t num=0;
   
   //new TCanvas("canv");
-  new TCanvas();
+  CreateTCanvas("", "", station, plane);
 
   const Double_t xmax=150;
   const Double_t ymax=250;
@@ -55,7 +66,7 @@ void testSectorPadIterators(AliMq::Station12Type station, AliMp::PlaneType plane
   delete sector;
 }
 
-void testSectorPadIterators()
+void testSt12SectorPadIterators()
 {
   AliMq::Station12Type  station[2] = { AliMq::kStation1, AliMq::kStation2 }; 
   AliMp::PlaneType      plane[2]   = { AliMp::kBendingPlane, AliMp::kNonBendingPlane };
diff --git a/MUON/mapping/macros/test_suite.sh b/MUON/mapping/macros/test_suite.sh
new file mode 100755 (executable)
index 0000000..8864581
--- /dev/null
@@ -0,0 +1,33 @@
+#!/bin/sh
+# $Id$
+
+# Test suite for running St12 mapping test macros in a batch mode.
+# The macros outputs are saved in test_out directory.
+#
+# by I. Hrivnacova, IPN Orsay
+
+OUTDIR="test_out"
+CURDIR=`pwd`
+
+cd $ALICE_ROOT/MUON/mapping/macros
+if [ ! -d $OUTDIR ] 
+then
+  mkdir -p $OUTDIR 
+fi
+
+for TEST in `ls testSt12*C` timeMapping.C
+do
+  TESTNAME=`echo $TEST | sed s/.C//g`
+  echo "Running $TESTNAME ..."
+  #aliroot -b >& testSt12AllIndices.out << EOF
+  aliroot -b >& $OUTDIR/$TESTNAME".out" << EOF
+  .L $TEST+
+  $TESTNAME();
+  .q
+EOF
+
+done
+
+mv testExistingPads.*.out $OUTDIR
+
+cd $CURDIR