Index: trunk/FACT++/src/PixelMap.cc
===================================================================
--- trunk/FACT++/src/PixelMap.cc	(revision 15211)
+++ trunk/FACT++/src/PixelMap.cc	(revision 15212)
@@ -1,9 +1,12 @@
 #include "PixelMap.h"
 
-#include <boost/regex.hpp>
+#ifdef __EXCEPTIONS
+#include <stdexcept>
+#endif
 
-//#ifdef HAS_SQL
-#include <mysql++/mysql++.h>
-//#endif
+#ifdef __MARS__
+#include "MLog.h"
+#include "MLogManip.h"
+#endif
 
 using namespace std;
@@ -12,5 +15,5 @@
 const BiasMapEntry  BiasMap::empty  = { -1, 0, 0, 0 };
 
-void BiasMap::Read(const std::string &fname)
+bool BiasMap::Read(const std::string &fname)
 {
     std::ifstream fin(fname);
@@ -37,6 +40,15 @@
         str >> entry.Voff;
 
+#ifdef __EXCEPTIONS
         if (entry.hv_channel+32*entry.hv_board>=416)
             throw runtime_error("Invalid board/channel read from "+fname+".");
+#endif
+#ifdef __MARS__
+        if (entry.hv_channel+32*entry.hv_board>=416)
+        {
+            gLog << err << "Invalid board/channel read from " << fname << "." << endl;
+            return false;
+        }
+#endif
 
         (*this)[entry.hv()] = entry;
@@ -45,4 +57,5 @@
     }
 
+#ifdef __EXCEPTIONS
     if (l!=416)
         throw runtime_error("Number of lines read from "+fname+" does not match 416.");
@@ -50,5 +63,26 @@
     if (size()!=416)
         throw runtime_error("Number of entries read from "+fname+" does not match 416.");
+#endif
+
+#ifdef __MARS__
+    if (l!=416)
+    {
+        gLog << err  << "Number of lines read from " << fname << " does not match 416." << endl;
+        return false;
+    }
+
+    if (size()!=416)
+    {
+        gLog << "Number of entries read from " << fname << " does not match 416." << endl;
+        return false;
+    }
+#endif
+
+    return true;
 }
+
+#ifndef __MARS__
+#include <boost/regex.hpp>
+#include <mysql++/mysql++.h>
 
 void BiasMap::Retrieve(const std::string &database)
@@ -114,2 +148,3 @@
         throw runtime_error("Number of entries retrived from database does not match 416.");
 }
+#endif
Index: trunk/FACT++/src/PixelMap.h
===================================================================
--- trunk/FACT++/src/PixelMap.h	(revision 15211)
+++ trunk/FACT++/src/PixelMap.h	(revision 15212)
@@ -2,13 +2,13 @@
 #define FACT_PixelMap
 
-#include<vector>
-#include<string>
-#include<fstream>
-#include<sstream>
+#include <vector>
+#include <string>
+#include <fstream>
+#include <sstream>
 
 #include "tools.h"
 
 #ifdef DEBUG
-#include<iostream>  // cerr -- to be removed?
+#include <iostream>  // cerr -- to be removed?
 #endif
 
@@ -204,6 +204,8 @@
     }
 
+#ifndef __MARS__
     void Retrieve(const std::string &database);
-    void Read(const std::string &fname);
+#endif
+    bool Read(const std::string &fname);
 
     const BiasMapEntry &hv(int board, int channel) const
