experim.h

Go to the documentation of this file.
00001 /********************************************************************\
00002 
00003   Name:         experim.h
00004   Created by:   ODBedit program
00005 
00006   Contents:     This file contains C structures for the "Experiment"
00007                 tree in the ODB and the "/Analyzer/Parameters" tree.
00008 
00009                 Additionally, it contains the "Settings" subtree for
00010                 all items listed under "/Equipment" as well as their
00011                 event definition.
00012 
00013                 It can be used by the frontend and analyzer to work
00014                 with these information.
00015 
00016                 All C structures are accompanied with a string represen-
00017                 tation which can be used in the db_create_record function
00018                 to setup an ODB structure which matches the C structure.
00019 
00020   Created on:   Mon Apr 14 15:27:19 2003
00021 
00022 \********************************************************************/
00023 
00024 #define EXP_PARAM_DEFINED
00025 
00026 typedef struct {
00027    char comment[80];
00028 } EXP_PARAM;
00029 
00030 #define EXP_PARAM_STR(_name) char *_name[] = {\
00031 "[.]",\
00032 "Comment = STRING : [80] Test",\
00033 "",\
00034 NULL }
00035 
00036 #ifndef EXCL_ADC_CALIBRATION
00037 
00038 #define ADC_CALIBRATION_PARAM_DEFINED
00039 
00040 typedef struct {
00041    INT pedestal[8];
00042    float software_gain[8];
00043    double histo_threshold;
00044 } ADC_CALIBRATION_PARAM;
00045 
00046 #define ADC_CALIBRATION_PARAM_STR(_name) char *_name[] = {\
00047 "[.]",\
00048 "Pedestal = INT[8] :",\
00049 "[0] 174",\
00050 "[1] 194",\
00051 "[2] 176",\
00052 "[3] 182",\
00053 "[4] 185",\
00054 "[5] 215",\
00055 "[6] 202",\
00056 "[7] 202",\
00057 "Software Gain = FLOAT[8] :",\
00058 "[0] 1",\
00059 "[1] 1",\
00060 "[2] 1",\
00061 "[3] 1",\
00062 "[4] 1",\
00063 "[5] 1",\
00064 "[6] 1",\
00065 "[7] 1",\
00066 "Histo threshold = DOUBLE : 20",\
00067 "",\
00068 NULL }
00069 
00070 #endif
00071 
00072 #ifndef EXCL_ADC_SUMMING
00073 
00074 #define ADC_SUMMING_PARAM_DEFINED
00075 
00076 typedef struct {
00077    float adc_threshold;
00078 } ADC_SUMMING_PARAM;
00079 
00080 #define ADC_SUMMING_PARAM_STR(_name) char *_name[] = {\
00081 "[.]",\
00082 "ADC threshold = FLOAT : 5",\
00083 "",\
00084 NULL }
00085 
00086 #endif
00087 
00088 #ifndef EXCL_GLOBAL
00089 
00090 #define GLOBAL_PARAM_DEFINED
00091 
00092 typedef struct {
00093    float adc_threshold;
00094 } GLOBAL_PARAM;
00095 
00096 #define GLOBAL_PARAM_STR(_name) char *_name[] = {\
00097 "[.]",\
00098 "ADC Threshold = FLOAT : 5",\
00099 "",\
00100 NULL }
00101 
00102 #endif
00103 
00104 #ifndef EXCL_TRIGGER
00105 
00106 #define ASUM_BANK_DEFINED
00107 
00108 typedef struct {
00109    float sum;
00110    float average;
00111 } ASUM_BANK;
00112 
00113 #define ASUM_BANK_STR(_name) char *_name[] = {\
00114 "[.]",\
00115 "Sum = FLOAT : 0",\
00116 "Average = FLOAT : 0",\
00117 "",\
00118 NULL }
00119 
00120 #define TRIGGER_COMMON_DEFINED
00121 
00122 typedef struct {
00123    WORD event_id;
00124    WORD trigger_mask;
00125    char buffer[32];
00126    INT type;
00127    INT source;
00128    char format[8];
00129    BOOL enabled;
00130    INT read_on;
00131    INT period;
00132    double event_limit;
00133    DWORD num_subevents;
00134    INT log_history;
00135    char frontend_host[32];
00136    char frontend_name[32];
00137    char frontend_file_name[256];
00138 } TRIGGER_COMMON;
00139 
00140 #define TRIGGER_COMMON_STR(_name) char *_name[] = {\
00141 "[.]",\
00142 "Event ID = WORD : 1",\
00143 "Trigger mask = WORD : 0",\
00144 "Buffer = STRING : [32] SYSTEM",\
00145 "Type = INT : 2",\
00146 "Source = INT : 16777215",\
00147 "Format = STRING : [8] MIDAS",\
00148 "Enabled = BOOL : y",\
00149 "Read on = INT : 257",\
00150 "Period = INT : 500",\
00151 "Event limit = DOUBLE : 0",\
00152 "Num subevents = DWORD : 0",\
00153 "Log history = INT : 0",\
00154 "Frontend host = STRING : [32] pc810",\
00155 "Frontend name = STRING : [32] Sample Frontend",\
00156 "Frontend file name = STRING : [256] C:\Midas\examples\experiment\frontend.c",\
00157 "",\
00158 NULL }
00159 
00160 #define TRIGGER_SETTINGS_DEFINED
00161 
00162 typedef struct {
00163    BYTE io506;
00164 } TRIGGER_SETTINGS;
00165 
00166 #define TRIGGER_SETTINGS_STR(_name) char *_name[] = {\
00167 "[.]",\
00168 "IO506 = BYTE : 7",\
00169 "",\
00170 NULL }
00171 
00172 #endif
00173 
00174 #ifndef EXCL_SCALER
00175 
00176 #define SCALER_COMMON_DEFINED
00177 
00178 typedef struct {
00179    WORD event_id;
00180    WORD trigger_mask;
00181    char buffer[32];
00182    INT type;
00183    INT source;
00184    char format[8];
00185    BOOL enabled;
00186    INT read_on;
00187    INT period;
00188    double event_limit;
00189    DWORD num_subevents;
00190    INT log_history;
00191    char frontend_host[32];
00192    char frontend_name[32];
00193    char frontend_file_name[256];
00194 } SCALER_COMMON;
00195 
00196 #define SCALER_COMMON_STR(_name) char *_name[] = {\
00197 "[.]",\
00198 "Event ID = WORD : 2",\
00199 "Trigger mask = WORD : 0",\
00200 "Buffer = STRING : [32] SYSTEM",\
00201 "Type = INT : 17",\
00202 "Source = INT : 0",\
00203 "Format = STRING : [8] MIDAS",\
00204 "Enabled = BOOL : y",\
00205 "Read on = INT : 377",\
00206 "Period = INT : 10000",\
00207 "Event limit = DOUBLE : 0",\
00208 "Num subevents = DWORD : 0",\
00209 "Log history = INT : 0",\
00210 "Frontend host = STRING : [32] pc810",\
00211 "Frontend name = STRING : [32] Sample Frontend",\
00212 "Frontend file name = STRING : [256] C:\Midas\examples\experiment\frontend.c",\
00213 "",\
00214 NULL }
00215 
00216 #endif

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