Changeset 11273


Ignore:
Timestamp:
07/07/11 13:38:35 (13 years ago)
Author:
tbretz
Message:
Added EVT_STAT and GUI_STAT; changed ADC values to signed
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/FAD.h

    r11238 r11273  
    7070  int16_t  drs_temperature[NTemp];
    7171
    72   uint16_t dac[NDAC];
     72  int16_t dac[NDAC];
    7373
    7474} __attribute__((__packed__)) PEVNT_HEADER;
     
    130130   int16_t Adc_Data[];     // final length defined by malloc ....
    131131
    132 } EVENT ;
     132} __attribute__((__packed__)) EVENT ;
    133133
    134134
     
    151151
    152152//do we also have info about FTM config we want to add here ???
    153 } RUN_HEAD ;
     153} __attribute__((__packed__)) RUN_HEAD ;
    154154
    155155
     
    167167 
    168168//probably more to come ...
    169 } RUN_TAIL ;
     169} __attribute__((__packed__)) RUN_TAIL ;
    170170
    171171
     
    182182  uint32_t lastTime ;    //time when last event written so far
    183183  uint32_t closeTime ;   //time when run should be closed
     184  uint32_t maxEvt ;      //maximum number of events to write
     185  uint32_t actEvt ;      //actual number of events written so far
     186  uint32_t lastEvt ;     //last event of this run read so far
    184187  uint32_t nextEvt ;     //next event number to be written
    185188  uint32_t waitEvt ;     //event that would be ready to be written
     
    230233
    231234  int pcTime[MAX_EVT*MAX_RUN] ;     //time when last action happened
    232 } EVT_CTRL ;
     235} EVT_CTRL ;     //internal to eventbuilder
    233236
    234237//---------------------------------------------------------------
     
    238241   struct sockaddr_in sockAddr ;
    239242   int    sockDef ; //<0 not defined/ ==0 not to be used/ >0 used
    240 } FACT_SOCK ;
    241 
     243} FACT_SOCK ;    //internal to eventbuilder
     244
     245
     246
     247//---------------------------------------------------------------
     248
     249typedef struct {
     250
     251  //some info about what happened since start of program (or last 'reset')
     252   uint32_t reset ;             //#if increased, reset all counters
     253   uint32_t numRead[MAX_SOCK] ; //how often succesfull read from N sockets per loop
     254
     255   uint64_t gotByte[NBOARDS] ;  //#Bytes read per Board
     256   uint32_t gotErr[NBOARDS] ;   //#Communication Errors per Board
     257   uint32_t evtGet;             //#new Start of Events read
     258   uint32_t evtTot;             //#complete Events read
     259   uint32_t evtErr;             //#Events with Errors
     260   uint32_t evtSkp;             //#Events incomplete (timeout)
     261
     262   uint32_t procTot;            //#Events processed
     263   uint32_t procErr;            //#Events showed problem in processing
     264   uint32_t procTrg;            //#Events accepted by SW trigger
     265   uint32_t procSkp;            //#Events rejected by SW trigger
     266
     267   uint32_t feedTot;            //#Events used for feedBack system
     268   uint32_t feedErr;            //#Events rejected by feedBack
     269
     270   uint32_t wrtTot;             //#Events written to disk
     271   uint32_t wrtErr;             //#Events with write-error
     272
     273   uint32_t runOpen;            //#Runs opened
     274   uint32_t runClose;           //#Runs closed
     275   uint32_t runErr;             //#Runs with open/close errors
     276
     277
     278  //info about current connection status
     279   uint8_t  numConn[NBOARDS] ;  //#Sockets succesfully open per board
     280
     281}  __attribute__((__packed__)) EVT_STAT ;         //EventBuilder Status
     282
     283typedef struct {
     284  //info about status of the main threads
     285   int32_t  readStat ;          //read thread
     286   int32_t  procStat ;          //processing thread(s)
     287   int32_t  writStat ;          //write thread
     288
     289  //info about some rates
     290   int32_t  deltaT ;            //time in milli-seconds for rates
     291   int32_t  readEvt ;           //#events read
     292   int32_t  procEvt ;           //#events processed
     293   int32_t  writEvt ;           //#events written
     294   int32_t  skipEvt ;           //#events skipped
     295
     296  //some info about current state of event buffer (snapspot)
     297    int32_t evtBuf;             //#Events currently waiting in Buffer
     298   uint64_t totMem;             //#Bytes available in Buffer
     299   uint64_t usdMem;             //#Bytes currently used
     300   uint64_t maxMem;             //max #Bytes used during past Second
     301
     302}  __attribute__((__packed__)) GUI_STAT ;         //EventBuilder Status
    242303
    243304#endif
Note: See TracChangeset for help on using the changeset viewer.