Index: fact/tools/pixelmap_test/PixelMapTest.cc
===================================================================
--- fact/tools/pixelmap_test/PixelMapTest.cc	(revision 9839)
+++ fact/tools/pixelmap_test/PixelMapTest.cc	(revision 10116)
@@ -1,53 +1,75 @@
 //simple test program to check the PixelMap class
+//Q. Weitzel, ETH Zurich, December 14, 2010
 
 #include "../../pixelmap/PixelMap.h"
 #include <iostream>
 
+using namespace std;
+
 int main(){
 
-    std::cout << std::endl;
-    std::cout << "==============================" << std::endl;
-    std::cout << "PixelMap Test Program" << std::endl;
-    std::cout << "==============================" << std::endl;
-    std::cout << std::endl;
+    cout << endl;
+    cout << "==============================" << endl;
+    cout << "PixelMap Test Program" << endl;
+    cout << "==============================" << endl;
+    cout << endl;
 
-    PixelMap* pm = new PixelMap("Test_PixelMap.txt", true);
+    cout << "Return value when asking for a non-existing pixel: " << PixelMap::PM_ERROR_CODE << endl;
+    cout << endl;
 
+    //PixelMap* pm = new PixelMap("", true);
+    PixelMap* pm = new PixelMap("0:   0 0 0 0   0 2 0   0 0;   1:   0 0 0 1   0 0 1   -1 -1;   237:   0 0 0 2   0 0 1   0 -1;", true);
+    
     pm->Print();
 
-    std::string drs1 = pm->DRS_to_Pixel(0,0,0,true);
-    std::cout << "Name: " << drs1 << std::endl;
+    unsigned int fpa;
+    fpa = pm->FPA_to_Pixel(0,0,0,0,true);
+    cout << "PixelID: " << fpa << endl;
+    fpa = pm->FPA_to_Pixel(0,1,0,0,true);
+    cout << "PixelID: " << fpa << endl;
+    fpa = pm->FPA_to_Pixel(0,0,0,0,true);
+    cout << "PixelID: " << fpa << endl;
 
-    std::string drs2 = pm->DRS_to_Pixel(1,0,0,true);
-    std::cout << "Name: " << drs2 << std::endl;
+    vector<unsigned int> hv;
+    hv = pm->HV_to_Pixel(6,1,8,true);
+    cout << hv.size() << " PixelIDs found: ";
+    for (unsigned int i=0; i < hv.size(); i++){cout << hv[i] << " ";}
+    cout << endl;
+    hv = pm->HV_to_Pixel(6,9,1,true);
+    cout << hv.size() << " PixelIDs found: ";
+    for (unsigned int i=0; i < hv.size(); i++){cout << hv[i] << " ";}
+    cout << endl;
+    hv = pm->HV_to_Pixel(0,0,1,true);
+    cout << hv.size() << " PixelIDs found: ";
+    for (unsigned int i=0; i < hv.size(); i++){cout << hv[i] << " ";}
+    cout << endl;
+    hv = pm->HV_to_Pixel(0,0,1,true);
+    cout << hv.size() << " PixelIDs found: ";
+    for (unsigned int i=0; i < hv.size(); i++){cout << hv[i] << " ";}
+    cout << endl;
 
-    std::string drs3 = pm->DRS_to_Pixel(0,0,0,true);
-    std::cout << "Name: " << drs3 << std::endl;
+    unsigned int pos;
+    pos = pm->POS_to_Pixel(-1,-1,true);
+    cout << "PixelID: " << pos << endl;
+    pos = pm->POS_to_Pixel(-10,1,true);
+    cout << "PixelID: " << pos << endl;
 
-    std::string hv1 = pm->HV_to_Pixel(6,1,8,true);
-    std::cout << "Name: " << hv1 << std::endl;
+    unsigned int fpab;
+    fpab = pm->Pixel_to_FPAboard(0,true);
+    cout << "Board: " << fpab << endl;
+    fpab = pm->Pixel_to_FPAboard(5,true);
+    cout << "Board: " << fpab << endl;
 
-    std::string hv2 = pm->HV_to_Pixel(6,9,1,true);
-    std::cout << "Name: " << hv2 << std::endl;
+    unsigned int hvboard;
+    hvboard = pm->Pixel_to_HVboard(0,true);
+    cout << "Board: " << hvboard << endl;
+    hvboard = pm->Pixel_to_HVboard(5,true);
+    cout << "Board: " << hvboard << endl;
 
-    std::string hv3 = pm->HV_to_Pixel(1,0,0,true);
-    std::cout << "Name: " << hv3 << std::endl;
-
-    unsigned int drsb1 = pm->Pixel_to_DRSboard("0-1-1",true);
-    std::cout << "Board: " << drsb1 << std::endl;
-
-    unsigned int drsb2 = pm->Pixel_to_DRSboard("1-0-0",true);
-    std::cout << "Board: " << drsb2 << std::endl;
-
-    pm->Print();
-
-    std::string drs4 = pm->DRS_to_Pixel(0,0,1,true);
-    std::cout << "Name: " << drs4 << std::endl;
-
-    unsigned int hvchain1 = pm->Pixel_to_HVchain("0-1-1",true);
-    std::cout << "Chain: " << hvchain1 << std::endl;
-
-    unsigned int hvchain2 = pm->Pixel_to_HVchain("1-0-0",true);
-    std::cout << "Chain: " << hvchain2 << std::endl;
+    int posy;
+    posy = pm->Pixel_to_POSy(1,true);
+    cout << "POSy: " << posy << endl;
+    posy = pm->Pixel_to_POSy(15,true);
+    cout << "POSy: " << posy << endl;
 
     delete pm;
