Index: trunk/FACT++/src/EventBuilderWrapper.h
===================================================================
--- trunk/FACT++/src/EventBuilderWrapper.h	(revision 11323)
+++ trunk/FACT++/src/EventBuilderWrapper.h	(revision 11324)
@@ -686,4 +686,6 @@
 #endif
 
+#include "DimWriteStatistics.h"
+
 class EventBuilderWrapper
 {
@@ -736,4 +738,5 @@
     uint32_t fNumEvts[4];
 
+    DimWriteStatistics  fDimWriteStats;
     DimDescribedService fDimRuns;
     DimDescribedService fDimEvents;
@@ -785,4 +788,5 @@
     EventBuilderWrapper(MessageImp &imp) : fMsg(imp),
         fFileFormat(kNone), fMaxRun(0), fLastOpened(0), fLastClosed(0),
+        fDimWriteStats  ("FAD_CONTROL", imp),
         fDimRuns        ("FAD_CONTROL/RUNS",             "I:5;C", ""),
         fDimEvents      ("FAD_CONTROL/EVENTS",           "I:4", ""),
@@ -794,8 +798,8 @@
         fDimTemperature ("FAD_CONTROL/TEMPERATURE",      "F:82", ""),
         fDimRefClock    ("FAD_CONTROL/REFERENCE_CLOCK",  "I:42", ""),
-        fDimStatistics1 ("FAD_CONTROL/STATISTICS1",      "I:3;I:5;I:1;X:3;C:676", ""),
+        fDimStatistics1 ("FAD_CONTROL/STATISTICS1",      "I:3;I:2;X:4;I:3;I:1;I:2;C:40;I:40;I:40;X:40", ""),
         fDimStatistics2 ("FAD_CONTROL/STATISTICS2",      "I:1;I:280;X:40;I:40;I:4;I:4;I:2;I:2;I:3;C:40",  ""),
         fDebugStream(false), fDebugRead(false)
-   {
+    {
         if (This)
             throw logic_error("EventBuilderWrapper cannot be instantiated twice.");
@@ -1057,4 +1061,10 @@
         fFiles.push_back(file);
 
+        ostringstream str;
+        str << "Opened: " << file->GetFileName() << " (" << file->GetRunId() << ")";
+        fMsg.Info(str);
+
+        fDimWriteStats.FileOpened(file->GetFileName());
+
         fLastOpened = runid;
         UpdateRuns(file->GetFileName());
@@ -1118,8 +1128,4 @@
         }
 
-        ostringstream str;
-        str << "Closing file for run " << file->GetRunId() << " (" << file << ")" << endl;
-        fMsg.Info(str);
-
         fFiles.erase(it);
 
@@ -1134,4 +1140,8 @@
             // Error message
         }
+
+        ostringstream str;
+        str << "Closed: " << file->GetFileName() << " (" << file->GetRunId() << ")";
+        fMsg.Info(str);
 
         delete file;
