Index: trunk/FACT++/src/FAD.h
===================================================================
--- trunk/FACT++/src/FAD.h	(revision 11272)
+++ trunk/FACT++/src/FAD.h	(revision 11273)
@@ -70,5 +70,5 @@
   int16_t  drs_temperature[NTemp];
 
-  uint16_t dac[NDAC];
+  int16_t  dac[NDAC];
 
 } __attribute__((__packed__)) PEVNT_HEADER;
@@ -130,5 +130,5 @@
    int16_t Adc_Data[];     // final length defined by malloc ....
 
-} EVENT ;
+} __attribute__((__packed__)) EVENT ;
 
 
@@ -151,5 +151,5 @@
 
 //do we also have info about FTM config we want to add here ???
-} RUN_HEAD ;
+} __attribute__((__packed__)) RUN_HEAD ;
 
 
@@ -167,5 +167,5 @@
  
 //probably more to come ...
-} RUN_TAIL ;
+} __attribute__((__packed__)) RUN_TAIL ;
 
 
@@ -182,4 +182,7 @@
   uint32_t lastTime ;    //time when last event written so far
   uint32_t closeTime ;   //time when run should be closed
+  uint32_t maxEvt ;      //maximum number of events to write
+  uint32_t actEvt ;      //actual number of events written so far
+  uint32_t lastEvt ;     //last event of this run read so far
   uint32_t nextEvt ;     //next event number to be written
   uint32_t waitEvt ;     //event that would be ready to be written
@@ -230,5 +233,5 @@
 
   int pcTime[MAX_EVT*MAX_RUN] ;     //time when last action happened
-} EVT_CTRL ;
+} EVT_CTRL ;     //internal to eventbuilder
 
 //---------------------------------------------------------------
@@ -238,6 +241,64 @@
    struct sockaddr_in sockAddr ;
    int    sockDef ; //<0 not defined/ ==0 not to be used/ >0 used
-} FACT_SOCK ; 
-
+} FACT_SOCK ;    //internal to eventbuilder
+
+
+
+//---------------------------------------------------------------
+
+typedef struct {
+
+  //some info about what happened since start of program (or last 'reset')
+   uint32_t reset ;             //#if increased, reset all counters
+   uint32_t numRead[MAX_SOCK] ; //how often succesfull read from N sockets per loop
+
+   uint64_t gotByte[NBOARDS] ;  //#Bytes read per Board
+   uint32_t gotErr[NBOARDS] ;   //#Communication Errors per Board
+   uint32_t evtGet;             //#new Start of Events read
+   uint32_t evtTot;             //#complete Events read
+   uint32_t evtErr;             //#Events with Errors
+   uint32_t evtSkp;             //#Events incomplete (timeout)
+
+   uint32_t procTot;            //#Events processed
+   uint32_t procErr;            //#Events showed problem in processing
+   uint32_t procTrg;            //#Events accepted by SW trigger
+   uint32_t procSkp;            //#Events rejected by SW trigger
+
+   uint32_t feedTot;            //#Events used for feedBack system
+   uint32_t feedErr;            //#Events rejected by feedBack
+
+   uint32_t wrtTot;             //#Events written to disk
+   uint32_t wrtErr;             //#Events with write-error
+
+   uint32_t runOpen;            //#Runs opened
+   uint32_t runClose;           //#Runs closed
+   uint32_t runErr;             //#Runs with open/close errors
+
+
+  //info about current connection status
+   uint8_t  numConn[NBOARDS] ;  //#Sockets succesfully open per board
+
+}  __attribute__((__packed__)) EVT_STAT ;         //EventBuilder Status
+
+typedef struct {
+  //info about status of the main threads
+   int32_t  readStat ;          //read thread
+   int32_t  procStat ;          //processing thread(s)
+   int32_t  writStat ;          //write thread
+
+  //info about some rates
+   int32_t  deltaT ;            //time in milli-seconds for rates
+   int32_t  readEvt ;           //#events read
+   int32_t  procEvt ;           //#events processed
+   int32_t  writEvt ;           //#events written
+   int32_t  skipEvt ;           //#events skipped
+
+  //some info about current state of event buffer (snapspot)
+    int32_t evtBuf;             //#Events currently waiting in Buffer
+   uint64_t totMem;             //#Bytes available in Buffer
+   uint64_t usdMem;             //#Bytes currently used
+   uint64_t maxMem;             //max #Bytes used during past Second
+
+}  __attribute__((__packed__)) GUI_STAT ;         //EventBuilder Status
 
 #endif
