Index: /trunk/FACT++/src/DataProcessorImp.cc
===================================================================
--- /trunk/FACT++/src/DataProcessorImp.cc	(revision 12476)
+++ /trunk/FACT++/src/DataProcessorImp.cc	(revision 12477)
@@ -48,5 +48,5 @@
 // =======================================================================
 
-bool DataDump::Open(RUN_HEAD* h)
+bool DataDump::Open(const RUN_HEAD* h, const FAD::RunDescription &)
 {
     fFileName = "/dev/null";
Index: /trunk/FACT++/src/DataProcessorImp.h
===================================================================
--- /trunk/FACT++/src/DataProcessorImp.h	(revision 12476)
+++ /trunk/FACT++/src/DataProcessorImp.h	(revision 12477)
@@ -7,4 +7,9 @@
 struct _EVENT;
 struct _RUN_TAIL;
+
+namespace FAD
+{
+    struct RunDescription;
+};
 
 typedef struct _RUN_HEAD RUN_HEAD;
@@ -30,5 +35,5 @@
     virtual ~DataProcessorImp() { }
 
-    virtual bool Open(RUN_HEAD* h) = 0;
+    virtual bool Open(const RUN_HEAD* h, const FAD::RunDescription &desc) = 0;
     virtual bool WriteEvt(EVENT *) = 0;
     virtual bool Close(RUN_TAIL * = 0) = 0;
@@ -55,5 +60,5 @@
     DataDump(const std::string &path, uint32_t id, MessageImp &imp) : DataProcessorImp(path, id, imp) { }
 
-    bool Open(RUN_HEAD* h);
+    bool Open(const RUN_HEAD* h, const FAD::RunDescription &d);
     bool WriteEvt(EVENT *e);
     bool Close(RUN_TAIL * = 0);
Index: /trunk/FACT++/src/DataWriteFits.cc
===================================================================
--- /trunk/FACT++/src/DataWriteFits.cc	(revision 12476)
+++ /trunk/FACT++/src/DataWriteFits.cc	(revision 12477)
@@ -1,4 +1,5 @@
 #include "DataWriteFits.h"
 
+#include "HeadersFAD.h"
 #include "FAD.h"
 #include "Converter.h"
@@ -30,5 +31,5 @@
 //! @param h a pointer to the RUN_HEAD structure that contains the informations relative to this run
 //
-bool DataWriteFits::Open(RUN_HEAD* h)
+bool DataWriteFits::Open(const RUN_HEAD* h, const FAD::RunDescription &d)
 {
     if (fConv)
@@ -94,6 +95,7 @@
         fFile.WriteKey("NROI",     h->Nroi,     "Number of slices per pixels");
         fFile.WriteKey("NROITM",   realRoiTM,   "Number of slices per time-marker"); //ETIENNE from NroiTMm to Nroi
-		int realOffset = (h->NroiTM > h->Nroi) ?  h->NroiTM - 2*h->Nroi : 0;
-		fFile.WriteKey("OFFSET", realOffset, "Offset between pixels ROI and TM ROi"); //ETIENNE added
+
+        const uint16_t realOffset = (h->NroiTM > h->Nroi) ?  h->NroiTM - 2*h->Nroi : 0;
+        fFile.WriteKey("OFFSET", realOffset, "Offset between pixels ROI and TM ROi"); //ETIENNE added
 
         //FIXME should we also put the start and stop time of the received data ?
@@ -103,5 +105,5 @@
         fFile.WriteKey("ADCRANGE", 2000,        "Dynamic range in mV");
         fFile.WriteKey("ADC",      12,          "Resolution in bits");
-
+        fFile.WriteKey("TYPE",     d.name,      "File type according to FAD configuration (Config database)");
 
         // Write a single key for:
Index: /trunk/FACT++/src/DataWriteRaw.cc
===================================================================
--- /trunk/FACT++/src/DataWriteRaw.cc	(revision 12476)
+++ /trunk/FACT++/src/DataWriteRaw.cc	(revision 12477)
@@ -1,4 +1,5 @@
 #include "DataWriteRaw.h"
 
+#include "HeadersFAD.h"
 #include "FAD.h"
 
@@ -18,5 +19,5 @@
 }
 
-bool DataWriteRaw::Open(RUN_HEAD *h)
+bool DataWriteRaw::Open(const RUN_HEAD *h, const FAD::RunDescription &d)
 {
     const string name = FormFileName("bin");
@@ -51,5 +52,5 @@
 
     WriteBlockHeader(kRunHeader, 1, 0, sizeof(RUN_HEAD)-sizeof(PEVNT_HEADER*));
-    fOut.write(reinterpret_cast<char*>(h), sizeof(RUN_HEAD)-sizeof(PEVNT_HEADER*));
+    fOut.write(reinterpret_cast<const char*>(h), sizeof(RUN_HEAD)-sizeof(PEVNT_HEADER*));
 
     for (int i=0; i<40; i++)
Index: /trunk/FACT++/src/DataWriteRaw.h
===================================================================
--- /trunk/FACT++/src/DataWriteRaw.h	(revision 12476)
+++ /trunk/FACT++/src/DataWriteRaw.h	(revision 12477)
@@ -81,5 +81,5 @@
     };
 
-    bool Open(RUN_HEAD *h);
+    bool Open(const RUN_HEAD *h, const FAD::RunDescription &d);
     bool WriteEvt(EVENT *evt);
     bool Close(RUN_TAIL *tail= 0);
Index: /trunk/FACT++/src/HeadersFAD.h
===================================================================
--- /trunk/FACT++/src/HeadersFAD.h	(revision 12476)
+++ /trunk/FACT++/src/HeadersFAD.h	(revision 12477)
@@ -401,4 +401,14 @@
     };
 
+    struct RunDescription
+    {
+        uint32_t maxtime;
+        uint32_t maxevt;
+
+        std::string name;
+
+        Configuration reference;
+    };
+
     // --------------------------------------------------------------------
 #ifdef __cplusplus
