Index: fact/tools/pyscripts/pyfact/calfactfits.h
===================================================================
--- fact/tools/pyscripts/pyfact/calfactfits.h	(revision 17715)
+++ fact/tools/pyscripts/pyfact/calfactfits.h	(revision 17730)
@@ -53,5 +53,5 @@
 #endif
 
-#include "factfits.h"
+#include "extern_Mars_mcore/factfits.h"
 
 class CalFactFits
Index: fact/tools/pyscripts/pyfact/pyfact.py
===================================================================
--- fact/tools/pyscripts/pyfact/pyfact.py	(revision 17715)
+++ fact/tools/pyscripts/pyfact/pyfact.py	(revision 17730)
@@ -10,13 +10,42 @@
 
 # get the ROOT stuff + my shared libs
-from ROOT import gSystem
+import ROOT
 # factfits_h.so is made from factfits.h and is used to access the data
 # make sure the location of factfits_h.so is in LD_LIBRARY_PATH.
 # having it in PYTHONPATH is *not* sufficient
-gSystem.Load('fits_h.so')
-gSystem.Load('izstream_h.so')
-gSystem.Load('zfits_h.so')
-gSystem.Load('factfits_h.so')
-gSystem.Load('calfactfits_h.so')
+hostname = ROOT.gSystem.HostName()
+if 'isdc' in hostname:
+    ROOT.gSystem.Load("/usr/lib64/libz.so")
+elif ('neiseLenovo' in hostname or 'factcontrol' in hostname):
+    ROOT.gSystem.Load("/usr/lib/libz.so")
+elif ("max-K50AB" in hostname or "watz" in hostname):
+    ROOT.gSystem.Load("/usr/lib/x86_64-linux-gnu/libz.so")
+elif ("grolsch" in hostname):
+    ROOT.gSystem.Load("/usr/lib/i386-linux-gnu/libz.so")
+else:
+    print "Error,Warning,Whatever libz stuff makes me crazy."
+    
+root_make_string = ROOT.gSystem.GetMakeSharedLib()
+if not "-std=c++0x" in root_make_string:
+    root_make_string = root_make_string.replace('$Opt', '$Opt -std=c++0x -D HAVE_ZLIB')
+ROOT.gSystem.SetMakeSharedLib(root_make_string)
+
+ROOT.gROOT.ProcessLine(".L extern_Mars_mcore/izstream.h+O")
+ROOT.gROOT.ProcessLine(".L extern_Mars_mcore/fits.h+O")
+ROOT.gROOT.ProcessLine(".L extern_Mars_mcore/zfits.h+O")
+ROOT.gROOT.ProcessLine(".L extern_Mars_mcore/factfits.h+O")
+ROOT.gROOT.ProcessLine(".L calfactfits.h+O")
+
+ROOT.gInterpreter.GenerateDictionary("map<string,fits::Entry>","map;string;extern_Mars_mcore/fits.h")
+ROOT.gInterpreter.GenerateDictionary("pair<string,fits::Entry>","map;string;extern_Mars_mcore/fits.h")
+ROOT.gInterpreter.GenerateDictionary("map<string,fits::Table::Column>","map;string;extern_Mars_mcore/fits.h")
+ROOT.gInterpreter.GenerateDictionary("pair<string,fits::Table::Column>","map;string;extern_Mars_mcore/fits.h")
+
+#ROOT.gSystem.Load('my_string_h.so')
+ROOT.gSystem.Load('extern_Mars_mcore/fits_h.so')
+ROOT.gSystem.Load('extern_Mars_mcore/izstream_h.so')
+ROOT.gSystem.Load('extern_Mars_mcore/zfits_h.so')
+ROOT.gSystem.Load('extern_Mars_mcore/factfits_h.so')
+ROOT.gSystem.Load('calfactfits_h.so')
 from ROOT import *
 
@@ -520,5 +549,5 @@
         self.stacked_cols = {}
 
-    def _make_meta_dict(self):
+    def _make_meta_dict__old(self):
         """ This method retrieves meta information about the fits file and 
             stores this information in a dict
@@ -564,4 +593,31 @@
             meta_dict[keys[i]]=(value, comments[i])
         return meta_dict
+        
+    def _make_meta_dict(self):
+        meta_dict = {}
+        for key,entry in self.f.GetKeys():
+            type = entry.type
+            fitsString = entry.fitsString # the original 80-char line from the FITS header
+            comment = entry.comment
+            value = entry.value
+            
+            if type == 'I':
+                value = int(value)
+            elif type == 'F':
+                value = float(value)
+            elif type == 'B':
+                if value == 'T':
+                    value = True
+                elif value == 'F':
+                    value = False
+                else:
+                    raise TypeError("meta-type is 'B', but meta-value is neither 'T' nor 'F'. meta-value:",value)
+            elif type == 'T':
+                value = value
+            else:
+                raise TypeError("unknown meta-type: known meta types are: I,F,B and T. meta-type:",type)
+            meta_dict[key]=(value, comment)
+        return meta_dict
+        
 
 
@@ -579,19 +635,24 @@
                     unit - string like 'mV' or 'ADC count'
         """
-        # abbreviation
-        f = self.f
-        
-        # intermediate variables for file table-metadata dict generation
-        keys=f.GetPy_ColumnKeys()
-        #offsets=self.GetPy_ColumnOffsets() #not needed on python level...
-        nums=f.GetPy_ColumnNums()
-        sizes=f.GetPy_ColumnSizes()
-        types=f.GetPy_ColumnTypes()
-        units=f.GetPy_ColumnUnits()
-    
-        # zip the values
-        values = zip(nums,sizes,types,units)
-        # create the columns dictionary
-        columns = dict(zip(keys ,values))
+        ## abbreviation
+        #f = self.f
+        #
+        ## intermediate variables for file table-metadata dict generation
+        #keys=f.GetPy_ColumnKeys()
+        ##offsets=self.GetPy_ColumnOffsets() #not needed on python level...
+        #nums=f.GetPy_ColumnNums()
+        #sizes=f.GetPy_ColumnSizes()
+        #types=f.GetPy_ColumnTypes()
+        #units=f.GetPy_ColumnUnits()
+    
+        ## zip the values
+        #values = zip(nums,sizes,types,units)
+        ## create the columns dictionary
+        #columns = dict(zip(keys ,values))
+        
+        
+        columns = {}
+        for key,col in self.f.GetColumns():
+            columns[key]=( col.num, col.size, col.type, col.unit)
         return columns
 
@@ -945,6 +1006,4 @@
     print 'data file:', data_file_name
     print 'calib file:', calib_file_name
-#    data_file_name =  '/home/luster/win7/FACT/data/raw/20120114/20120114_028.fits.gz'
-#    calib_file_name = '/home/luster/win7/FACT/data/raw/20120114/20120114_022.drs.fits.gz'
     run = RawData( data_file_name, calib_file_name , return_dict=True)
 
@@ -957,13 +1016,17 @@
     """ tests  """
     import sys
-    if len(sys.argv) == 1:
-        print 'showing test of iterator of RawData class'
-        print 'in order to test the SlowData classe please use:', sys.argv[0], 'fits-file-name'
-        _test_iter(10)
-            
-
-    else:
-        print 'showing test of SlowData class'
-        print 'in case you wanted to test the RawData class, please give no commandline arguments'
-        file = SlowData(sys.argv[1])
-        _test_SlowData(sys.argv[1])
+    
+    f = fits(sys.argv[1])
+    test_m1 = ROOT.std.map(str,ROOT.fits.Entry)()
+    test_m2 = ROOT.std.map(str,ROOT.fits.Table.Column)()
+    print "len(test_m1)", len(test_m1)
+    print "len(test_m2)", len(test_m2)
+    
+    for k1 in f.GetKeys():
+        pass
+    print k1
+    for k2 in f.GetColumns():
+        pass
+    print k2
+    
+    sd = SlowData(sys.argv[1])
