hardware.h

Go to the documentation of this file.
00001 /********************************************************************\
00002 
00003   Name:         HARDWARE.H
00004   Created by:   Stefan Ritt
00005 
00006   Contents:     Type ID definitions and structured for specific
00007                 hardware.
00008 
00009   $Id: hardware.h 3881 2007-09-06 10:12:38Z ritt $
00010 
00011 \********************************************************************/
00012 
00013 /* Hardware data types. Can be used to create MIDAS banks. Should
00014    be or'ed with standard data types like TID_DWORD | TID_LRS1882 */
00015 
00016 #define TID_LRS1882    (1<<8)   /* LeCroy 1882 fastbus ADC */
00017 #define TID_LRS1877    (2<<8)   /* LeCroy 1877 fastbus TDC */
00018 #define TID_PCOS3      (3<<8)   /* LeCroy PCOS 3 wire chambers */
00019 #define TID_LRS1875    (4<<8)   /* LeCroy 1875 fastbus TDC */
00020 
00021 /* Hardware data records */
00022 
00023 typedef struct {
00024    WORD data:12;
00025     WORD:4;
00026    WORD channel:7;
00027    WORD range:1;
00028    WORD event:3;
00029    WORD geo_addr:5;
00030 } LRS1882_DATA;
00031 
00032 typedef struct {
00033    WORD data:16;
00034    WORD edge:1;
00035    WORD channel:7;
00036    WORD buffer:2;
00037    WORD parity:1;
00038    WORD geo_addr:5;
00039 } LRS1877_DATA;
00040 
00041 typedef struct {
00042    WORD count:11;
00043    WORD buffer:3;
00044     WORD:1;
00045    WORD parity:1;
00046     WORD:11;
00047    WORD geo_addr:5;
00048 } LRS1877_HEADER;
00049 
00050 typedef struct {
00051   WORD data     : 12;
00052   WORD          : 4;
00053   WORD channel  : 6;
00054   WORD          : 1;
00055   WORD range    : 1;
00056   WORD event    : 3;
00057   WORD geo_addr : 5;
00058 } LRS1875_DATA;
00059 
00060 typedef struct {
00061   WORD          : 8;
00062   WORD count    : 6; 
00063   WORD          : 2; 
00064   WORD crate    : 8; 
00065   WORD tag      : 3;
00066   WORD geo_addr : 5; 
00067 } CAEN775_HEADER;
00068 
00069 typedef struct {
00070   WORD data     : 12;
00071   WORD overflow : 1;
00072   WORD underflow: 1;
00073   WORD valid    : 1;
00074   WORD          : 1;
00075   WORD channel  : 6;
00076   WORD          : 2;
00077   WORD tag      : 3;
00078   WORD geo_addr : 5;
00079 } CAEN775_DATA;

Midas DOC Version 3.0.0 ---- PSI Stefan Ritt ----
Contributions: Pierre-Andre Amaudruz - Sergio Ballestrero - Suzannah Daviel - Doxygen - Peter Green - Qing Gu - Greg Hackman - Gertjan Hofman - Paul Knowles - Exaos Lee - Rudi Meier - Glenn Moloney - Dave Morris - John M O'Donnell - Konstantin Olchanski - Renee Poutissou - Tamsen Schurman - Andreas Suter - Jan M.Wouters - Piotr Adam Zolnierczuk