Index: src/Fragmentation/Summation/HeaderPrinter.hpp
===================================================================
--- src/Fragmentation/Summation/HeaderPrinter.hpp	(revision 675cd611bd03a5b8b2837d1811ebb901240fc57e)
+++ src/Fragmentation/Summation/HeaderPrinter.hpp	(revision 47cee77c416ae305ae2648bbac752afcf74f0537)
@@ -31,11 +31,12 @@
  */
 struct HeaderPrinter {
-  HeaderPrinter(const std::string &init) :
-    header(init)
+  HeaderPrinter(const std::string _suffix = std::string("")) :
+    header(""),
+    suffix(_suffix)
   {}
 
   template <typename MapKey>
   void operator()(MapKey &) {
-    header += std::string("\t") + printKeyNames::printName<MapKey>();
+    header += std::string("\t") + printKeyNames::printName<MapKey>() + suffix;
   }
 
@@ -46,4 +47,5 @@
 private:
   std::string header;
+  std::string suffix;
 };
 
Index: src/Fragmentation/Summation/Makefile.am
===================================================================
--- src/Fragmentation/Summation/Makefile.am	(revision 675cd611bd03a5b8b2837d1811ebb901240fc57e)
+++ src/Fragmentation/Summation/Makefile.am	(revision 47cee77c416ae305ae2648bbac752afcf74f0537)
@@ -27,4 +27,5 @@
 	Fragmentation/Summation/SumUpPerLevel.hpp \
 	Fragmentation/Summation/ValuePrinter.hpp \
+	Fragmentation/Summation/writeIndexedTable.hpp \
 	Fragmentation/Summation/writeTable.hpp \
 	Fragmentation/Summation/ZeroInstance.hpp
Index: src/Fragmentation/Summation/ValuePrinter.hpp
===================================================================
--- src/Fragmentation/Summation/ValuePrinter.hpp	(revision 675cd611bd03a5b8b2837d1811ebb901240fc57e)
+++ src/Fragmentation/Summation/ValuePrinter.hpp	(revision 47cee77c416ae305ae2648bbac752afcf74f0537)
@@ -31,7 +31,7 @@
 template <typename MapType, int numprecision=5>
 struct ValuePrinter {
-  ValuePrinter(const MapType &_instance, const size_t level) :
+  ValuePrinter(const MapType &_instance) :
     instance(_instance),
-    value(toString(level))
+    value("")
   {}
 
Index: src/Fragmentation/Summation/writeIndexedTable.hpp
===================================================================
--- src/Fragmentation/Summation/writeIndexedTable.hpp	(revision 47cee77c416ae305ae2648bbac752afcf74f0537)
+++ src/Fragmentation/Summation/writeIndexedTable.hpp	(revision 47cee77c416ae305ae2648bbac752afcf74f0537)
@@ -0,0 +1,88 @@
+/*
+ * writeIndexedTable.hpp
+ *
+ *  Created on: Sep 28, 2013
+ *      Author: heber
+ */
+
+#ifndef WRITEINDEXEDTABLE_HPP_
+#define WRITEINDEXEDTABLE_HPP_
+
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <boost/mpl/for_each.hpp>
+
+#include <string>
+#include <sstream>
+#include <vector>
+
+#include "Fragmentation/Summation/HeaderPrinter.hpp"
+#include "Fragmentation/Summation/ValuePrinter.hpp"
+
+/** Templated functor to write from a given vector of results the
+ * table per keyset with decent header line.
+ *
+ * @param results vector of results of MapType
+ * @param MaxLevel print values up till this level
+ * @return string of the resulting table
+ */
+template <typename MapType, typename VectorType, int numprecision=10>
+struct writeIndexedTable{
+  std::string operator()(
+      const std::map<IndexSet::ptr, std::pair<MapType,MapType> > &results,
+      const size_t MaxLevel,
+      const size_t StartLevel=1)
+  {
+    typedef std::map<IndexSet::ptr, std::pair<MapType,MapType> > maptype_t;
+    std::stringstream resultstream;
+
+    /// create header line for energy
+    resultstream << "level\tkeyset";
+    {
+      HeaderPrinter header("_value");
+      boost::mpl::for_each<VectorType>(boost::ref(header));
+      resultstream << header.get() << std::endl;
+    }
+    {
+      HeaderPrinter header("_contribution");
+      boost::mpl::for_each<VectorType>(boost::ref(header));
+      resultstream << header.get() << std::endl;
+    }
+
+    /// print values per line
+    if (MaxLevel >= StartLevel) {
+      ASSERT( results.size() >= (MaxLevel-StartLevel),
+          "writeIndexedTable<M,V>() - results has insufficient size.");
+      for (typename maptype_t::const_iterator resultiter = results.begin();
+          resultiter != results.end(); ++resultiter) {
+        resultstream << resultiter->first->size() << "\t" << "{";
+        for (IndexSet::const_iterator keyiter = resultiter->first->begin();
+            keyiter != resultiter->first->end(); ++keyiter)
+          resultstream << ( keyiter != resultiter->first->begin() ? "," : "") << *keyiter;
+        resultstream << "}";
+        {
+          ValuePrinter<MapType, numprecision> values(resultiter->second.first);
+          boost::mpl::for_each<VectorType>(boost::ref(values));
+          resultstream << values.get();
+        }
+        {
+          ValuePrinter<MapType, numprecision> values(resultiter->second.second);
+          boost::mpl::for_each<VectorType>(boost::ref(values));
+          resultstream << values.get();
+        }
+        resultstream << std::endl;
+      }
+    } else {
+      ELOG(2, "writeIndexedTable does not output as MaxLevel(" << MaxLevel
+          << ") < StartLevel(" << StartLevel << ".");
+    }
+    return resultstream.str();
+  }
+};
+
+
+#endif /* WRITEINDEXEDTABLE_HPP_ */
Index: src/Fragmentation/Summation/writeTable.hpp
===================================================================
--- src/Fragmentation/Summation/writeTable.hpp	(revision 675cd611bd03a5b8b2837d1811ebb901240fc57e)
+++ src/Fragmentation/Summation/writeTable.hpp	(revision 47cee77c416ae305ae2648bbac752afcf74f0537)
@@ -38,5 +38,6 @@
 
     /// create header line for energy
-    HeaderPrinter header("level");
+    resultstream << "level";
+    HeaderPrinter header;
     boost::mpl::for_each<VectorType>(boost::ref(header));
     resultstream << header.get() << std::endl;
@@ -47,5 +48,6 @@
           "writeTable<M,V>() - results has insufficient size.");
       for (size_t level = StartLevel; level <= MaxLevel; ++level) {
-        ValuePrinter<MapType, numprecision> values(results[level-1], level);
+        resultstream << level;
+        ValuePrinter<MapType, numprecision> values(results[level-1]);
         boost::mpl::for_each<VectorType>(boost::ref(values));
         resultstream << values.get() << std::endl;
