Index: /trunk/FACT++/src/biasctrl.cc
===================================================================
--- /trunk/FACT++/src/biasctrl.cc	(revision 11964)
+++ /trunk/FACT++/src/biasctrl.cc	(revision 11965)
@@ -11,4 +11,5 @@
 #include "Console.h"
 #include "Converter.h"
+#include "PixelMap.h"
 
 #include "tools.h"
@@ -1785,42 +1786,6 @@
         // --------------------------------------------------------------------------
 
-        ifstream fin("FACTmapV5.txt");
-
-        int l = 0;
-
-        vector<float> vec(kNumChannels);
-
-        string buf;
-        while (getline(fin, buf, '\n'))
-        {
-            if (l>1439)
-                break;
-
-            buf = Tools::Trim(buf);
-            if (buf[0]=='#')
-                continue;
-
-            stringstream str(buf);
-
-            int   idummy, board, channel;
-            float fdummy, volt;
-
-            str >> idummy >> idummy >> idummy >> idummy >> idummy;
-            str >> volt;
-            str >> board;
-            str >> channel;
-            str >> fdummy >> fdummy >> fdummy;
-
-            if (channel+32*board>=kNumChannels)
-            {
-                T::Error("Invalid board/channel read from FACTmapV5.txt.");
-                return 4;
-            }
-
-            vec[channel+32*board] = volt;
-            l++;
-        }
-
-        if (l!=1440)
+        PixelMap map;
+        if (!map.Read("FACTmapV5.txt"))
         {
             T::Error("Reading reference voltages from FACTmapV5.txt failed.");
@@ -1828,5 +1793,5 @@
         }
 
-        if (!fBias.SetNewGapdVoltage(vec))
+        if (!fBias.SetNewGapdVoltage(map.Vgapd()))
         {
             T::Error("Setting reference voltages failed.");
