Index: trunk/FACT++/gui/RawEventsViewer/RawEventsViewer.cc
===================================================================
--- trunk/FACT++/gui/RawEventsViewer/RawEventsViewer.cc	(revision 12014)
+++ trunk/FACT++/gui/RawEventsViewer/RawEventsViewer.cc	(revision 12015)
@@ -355,38 +355,44 @@
     loadEvents("/scratch/00000043.001_T.bin");
 #endif
-//    cout << "avant" << endl;
-//    calculatePixelsCoords();
-//    cout << "apres" << endl;
-/*
-    ifstream fin2("MasterList-v3.txt");
-    if (!fin2.is_open())
-    {
-        cout << "Error: file \"MasterList-v3\" missing. aborting." << endl;
+    PixelMap mypMap;
+    if (!mypMap.Read("FACTmapV5.txt"))
+    {
+        cerr << "ERROR - Problems reading FACTmapV5.txt" << endl;
         exit(-1);
     }
+    ifstream fin1("Trigger-Patches.txt");
+    if (!fin1.is_open())
+    {
+        cout << "Error: file \"Trigger-Patches\" missing. aborting." << endl;
+        exit(-1);
+    }
+    string buf;
+    vector<int> patchHW(1440);
     int l = 0;
-    string buf;
-    while (getline(fin2, buf, '\n'))
-    {
-        buf = Trim(buf);
+    while (getline(fin1, buf, '\n'))
+    {
+        buf = Tools::Trim(buf);
         if (buf[0]=='#')
             continue;
 
-        unsigned int softid, hardid, dummy;
-
         stringstream str(buf);
-
-        str >> softid;
-        str >> dummy;
-        str >> hardid;
-
-        if (softid>=1440)
-            continue;
-
-        hardwareMapping[softid] = hardid;
-        softwareMapping[hardid] = softid;
-
+        for (int i=0; i<9; i++)
+        {
+            unsigned int n;
+            str >> n;
+
+            if (n>=patchHW.size())
+                continue;
+
+            patchHW[n] = l;
+        }
         l++;
-    }*/
+    }
+    if (l!=160)
+        cerr << "WARNING - Problems reading Trigger-Patches.txt" << endl;
+
+    assignPixelMap(mypMap);
+    assignTriggerPatchesMap(patchHW);
+
     GLfloat tempPixelsCoords[MAX_NUM_PIXELS][3];
     for (int i=0;i<1440;i++)
