/dev/adei-asec

To get this branch, use:
bzr branch http://darksoft.org/webbzr/dev/adei-asec

« back to all changes in this revision

Viewing changes to setups/katrin/config.php

  • Committer: Suren A. Chilingaryan
  • Date: 2014-01-25 16:38:03 UTC
  • Revision ID: csa@dside.dyndns.org-20140125163803-mhmpyk4dpzz7qabw
Detach setups

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?php
2
 
 
3
 
$ADEI_RELEASE = false;
4
 
 
5
 
$TITLE = "";
6
 
 
7
 
if (file_exists("/opt/katrin/etc/kdbserver.conf")) {
8
 
    $MODULES = array("alarms", "katrin", "download", "infopage", "graph", "wiki");
9
 
    $CONTROLS = array("export", "aggregator", "searchtab", false, "virtual", "filter"); // false/null indicates line break
10
 
    $CONTROLS = array("infotab", "searchtab", "filter", false, "export", "aggregator", "plot", false, "virtual"); // false/null indicates line break
11
 
} else {
12
 
    $MODULES = array("alarms", "download", "infopage", "graph", "wiki");
13
 
    $CONTROLS = array("infotab", "searchtab", "virtual", false, "export", "aggregator", "plot"); // false/null indicates line break
14
 
}
15
 
 
16
 
$ADEI_AXES = array_merge($ADEI_AXES, array(
17
 
        "heatrate" => array(
18
 
            "axis_units" => _("C/min"),
19
 
            "axis_name" => _("Heat-rate"),
20
 
            "axis_mode" => "STD",
21
 
            "axis_range" => false
22
 
        ),
23
 
));
24
 
 
25
 
 
26
 
$READER_DB_KATRIN = array(
27
 
        "fpd" => array (
28
 
            "title" => _("520  Focal Plane Detector"),
29
 
            "reader" => "KATRINZEUSReader",
30
 
            "driver" => "odbc",
31
 
            "sqldrv" => "mssql",
32
 
            "subdrv" => "FreeTDS",
33
 
            "host" => "ipepdvmssqldb1.ka.fzk.de",
34
 
            "database" => array ("katrin_rep", "katrin_us"),
35
 
            "charset" => "ISO8859-1",
36
 
            "port" => 1433,
37
 
            "user" => 'souren',
38
 
            "password" => '$souren$',
39
 
            "multibase" => true,
40
 
            "timeout" => 500000,
41
 
            "ping" => true,
42
 
        ),
43
 
        "orca" => array (
44
 
            "title" => _("520 Focal Plane Detector/ORCA"),
45
 
            "reader" => "IPEReader",
46
 
            "driver" => "mysql",
47
 
            "host" => "127.0.0.1",
48
 
            "port" => 3306,
49
 
            "user" => "root",
50
 
            "password" => "",
51
 
            "database" => array("orca_process"),
52
 
            "charset" => "ISO8859-1",
53
 
            "timeout" => 200000,        // us
54
 
//          "ping" => true,             // host and port should be specified
55
 
//          "disconnected" => true
56
 
        ),
57
 
        "aircoils" => array (
58
 
            "title" => _("433  Air Coils"),
59
 
            "reader" => "KATRINZEUSReader",
60
 
            "driver" => "odbc",
61
 
            "sqldrv" => "mssql",
62
 
            "subdrv" => "FreeTDS",
63
 
            "host" => "ipepdvmssqldb1.ka.fzk.de",
64
 
            "port" => 1433,
65
 
            "user" => 'souren',
66
 
            "password" => '$souren$',
67
 
            "database" => array ("aircoils_rep"),
68
 
            "timeout" => 500000,
69
 
            "ping" => true,
70
 
        ),
71
 
        "temp0" => array(
72
 
            "title" => _("435  Temperatures"),
73
 
            "reader" => "KATRINDBReader",
74
 
            "driver" => "odbc",
75
 
            "sqldrv" => "mssql",
76
 
            "subdrv" => "FreeTDS",
77
 
            "host" => "ikkatrinmssql3.ka.fzk.de",
78
 
            "port" => 1433,
79
 
            "database" => array ("BakeOut2013"),
80
 
            "charset" => "ISO8859-1",
81
 
            "user" => 'souren',
82
 
            "password" => '$souren$',
83
 
            "multibase" => false,
84
 
            "timeout" => 500000,
85
 
            "ping" => true
86
 
       ),
87
 
        "magnetometer0" => array(
88
 
            "title" => _("433  Magnetometer"),
89
 
            "reader" => "KATRINDBReader",
90
 
            "driver" => "odbc",
91
 
            "sqldrv" => "mssql",
92
 
            "subdrv" => "FreeTDS",
93
 
            "host" => "ikkatrinmssql3.ka.fzk.de",
94
 
            "port" => 1433,
95
 
            "database" => array ("dbMagnet-archive_rep"),
96
 
            "user" => 'souren',
97
 
            "password" => '$souren$',
98
 
            "multibase" => true,
99
 
            "timeout" => 500000,
100
 
            "ping" => true,
101
 
       ),
102
 
        "hv" => array (
103
 
            "title" => _("436  High Voltage"),
104
 
            "reader" => "KATRINZEUSReader",
105
 
            "driver" => "odbc",
106
 
            "sqldrv" => "mssql",
107
 
            "subdrv" => "FreeTDS",
108
 
            "host" => "ipepdvmssqldb1.ka.fzk.de",
109
 
            "port" => 1433,
110
 
            "user" => 'souren',
111
 
            "password" => '$souren$',
112
 
            "database" => array ("katrin-hv_rep"),
113
 
            "charset" => "ISO8859-1",
114
 
            "timeout" => 500000,
115
 
            "ping" => true,
116
 
        ),
117
 
        "csms" => array(
118
 
            "title" => _("430  Control System"),
119
 
            "reader" => "KATRINDBReader",
120
 
            "driver" => "odbc",
121
 
            "sqldrv" => "mssql",
122
 
            "subdrv" => "FreeTDS",
123
 
            "host" => "ikkatrinmssql3.ka.fzk.de",
124
 
            "port" => 1433,
125
 
            "database" => array ("ControlSystem_MS"), 
126
 
            "user" => 'souren',
127
 
            "password" => '$souren$',
128
 
            "multibase" => false,
129
 
            "timeout" => 500000,
130
 
            "ping" => true,
131
 
       ),
132
 
 
133
 
        "mos" => array (
134
 
            "title" => _("440  Monitor Spectrometer / ZEUS"),
135
 
            "reader" => "KATRINZEUSReader",
136
 
            "driver" => "odbc",
137
 
            "sqldrv" => "mssql",
138
 
            "subdrv" => "FreeTDS",
139
 
            "host" => "ipepdvmssqldb1.ka.fzk.de",
140
 
            "port" => 1433,
141
 
            "user" => 'souren',
142
 
            "password" => '$souren$',
143
 
            "database" => array ("Monitorspeczeus_rep"),
144
 
            "timeout" => 500000,
145
 
            "ping" => true,
146
 
        ),
147
 
        "mos0" => array(
148
 
            "title" => _("440  Monitor Spectrometer / OPC"),
149
 
            "reader" => "KATRINDBReader",
150
 
            "driver" => "odbc",
151
 
            "sqldrv" => "mssql",
152
 
            "subdrv" => "FreeTDS",
153
 
            "host" => "ikkatrinmssql3.ka.fzk.de",
154
 
            "port" => 1433,
155
 
            "database" => array ("MonitorSpec_rep"),
156
 
            "user" => 'souren',
157
 
            "password" => '$souren$',
158
 
            "multibase" => false,
159
 
            "timeout" => 500000,
160
 
            "ping" => true,
161
 
       ),
162
 
        "csmos" => array(
163
 
            "title" => _("440  Control System"),
164
 
            "reader" => "KATRINDBReader",
165
 
            "driver" => "odbc",
166
 
            "sqldrv" => "mssql",
167
 
            "subdrv" => "FreeTDS",
168
 
            "host" => "ikkatrinmssql3.ka.fzk.de",
169
 
            "port" => 1433,
170
 
            "database" => array ("ControlSystem_MoS"),
171
 
            "user" => 'souren',
172
 
            "password" => '$souren$',
173
 
            "multibase" => true,
174
 
            "timeout" => 500000,
175
 
            "ping" => true,
176
 
       ),
177
 
        "cstloops" => array(
178
 
            "title" => _("600  Tritium Loops"),
179
 
            "reader" => "KATRINDBReader",
180
 
            "driver" => "odbc",
181
 
            "sqldrv" => "mssql",
182
 
            "subdrv" => "FreeTDS",
183
 
            "host" => "ikkatrinmssql3.ka.fzk.de",
184
 
            "port" => 1433,
185
 
            "database" => array ("ControlSystem_TLOOPS"),
186
 
            "user" => 'souren',
187
 
            "password" => '$souren$',
188
 
            "multibase" => true,
189
 
            "timeout" => 500000,
190
 
            "ping" => true,
191
 
       ),
192
 
        "cs0" => array(
193
 
            "title" => _("800  Control System"),
194
 
            "reader" => "KATRINDBReader",
195
 
            "driver" => "odbc",
196
 
            "sqldrv" => "mssql",
197
 
            "subdrv" => "FreeTDS",
198
 
            "host" => "ikkatrinmssql3.ka.fzk.de",
199
 
            "port" => 1433,
200
 
            "database" => array ("ControlSystem_rep"),
201
 
            "user" => 'souren',
202
 
            "password" => '$souren$',
203
 
            "multibase" => true,
204
 
            "timeout" => 500000,
205
 
            "ping" => true,
206
 
       ),
207
 
        "tc" => array (
208
 
            "title" => _("451  Test Cylinder"),
209
 
            "reader" => "KATRINZEUSReader",
210
 
            "driver" => "odbc",
211
 
            "sqldrv" => "mssql",
212
 
            "subdrv" => "FreeTDS",
213
 
            "host" => "ipepdvmssqldb1.ka.fzk.de",
214
 
            "port" => 1433,
215
 
            "user" => 'souren',
216
 
            "password" => '$souren$',
217
 
            "database" => array ("testcylinder"),
218
 
            "timeout" => 500000,
219
 
            "ping" => true,
220
 
        ),
221
 
        "pse" => array (
222
 
            "title" => _("410  PreSpectrometer"),
223
 
            "reader" => "KATRINZEUSReader",
224
 
            "driver" => "mysql",
225
 
            "host" => "localhost",
226
 
            "port" => 0,
227
 
            "user" => 'adei',
228
 
            "password" => 'adei',
229
 
            "database" => array ("katrinpse"),
230
 
            "timeout" => 200000,
231
 
            "multibase" => true
232
 
        ),
233
 
        "vessel_test" => array (
234
 
            "title" => _("430  Vessel Commisioning"),
235
 
            "reader" => "KATRINZEUSReader",
236
 
            "driver" => "mysql",
237
 
            "host" => "localhost",
238
 
            "port" => 0,
239
 
            "user" => "adei",
240
 
            "password" => "adei",
241
 
            "database" => array ("katrinvessel"),
242
 
        )
243
 
);
244
 
 
245
 
/*
246
 
if ($ADEI_SETUP == "katrin") {
247
 
    $READER_DB_KATRIN["kdb"] = array(
248
 
        "title" => _("KATRIN Database"),
249
 
        "reader" => "KATRINreader",
250
 
        "database" => array ("Pre Spectrometer")
251
 
    );
252
 
}
253
 
*/
254
 
 
255
 
 
256
 
if (is_array($READER_DB)) $READER_DB = array_merge($READER_DB_KATRIN, $READER_DB);
257
 
else $READER_DB = $READER_DB_KATRIN;
258
 
 
259
 
 
260
 
// This is ZEUS7 sources
261
 
 
262
 
 
263
 
$OPTIONS_ZEUS7 = array(
264
 
            "optimize_empty_cache" => true,
265
 
            "maximal_allowed_gap" => 120,
266
 
            "ignore_invalid_data" => true
267
 
);
268
 
 
269
 
$OPTIONS["pse"] = array_merge($OPTIONS_ZEUS7, array(
270
 
));
271
 
 
272
 
$OPTIONS["vessel_test"] = array_merge($OPTIONS_ZEUS7, array(
273
 
            "date_limit" => array("2007-07-01 00:00:00",  "2007-09-21 00:00:00"),
274
 
            "channel_uids" => "/^DAT_/",
275
 
));
276
 
 
277
 
// This is ZEUS8 sources
278
 
$OPTIONS_ZEUS = array(
279
 
            "maximal_allowed_gap" => 120,
280
 
            "ignore_invalid_data" => true,
281
 
            "optimize_empty_cache" => true,
282
 
            "use_md5_postfix" => false,
283
 
            "date_limit" => "2008-04-21 12:00:00",              //GMT
284
 
            "channel_uids" => "/^[45]\d\d[\-_]/",
285
 
            "axis" => array(
286
 
                "/^412-RTP/i" => "temperature",
287
 
                "/^522-RTP/i" => "temperature",
288
 
                "/^522-RP[PV]/i" => "pressure/milli"
289
 
            )
290
 
);
291
 
 
292
 
$OPTIONS["pse__katrinpse"] = array_merge($OPTIONS_ZEUS, array(
293
 
));
294
 
 
295
 
$OPTIONS["aircoils"] = array_merge($OPTIONS_ZEUS, array(
296
 
));
297
 
 
298
 
$OPTIONS["mos"] = array_merge($OPTIONS_ZEUS, array(
299
 
));
300
 
 
301
 
$OPTIONS["hv"] = array_merge($OPTIONS_ZEUS, array(
302
 
        "date_limit" => "2012-09-01 00:00:00",              //GMT
303
 
));
304
 
 
305
 
$OPTIONS["tc"] = array_merge($OPTIONS_ZEUS, array(
306
 
));
307
 
 
308
 
$OPTIONS["fpd"] = array_merge($OPTIONS_ZEUS, array(
309
 
            "alarm_severity" => 0
310
 
));
311
 
 
312
 
$OPTIONS["fpd__katrin_rep_20121130"] = array_merge($OPTIONS_ZEUS, array(
313
 
        "data_filters" => array(
314
 
            array (
315
 
                "class" => "LENGTHFilter",
316
 
                "add_missing_items" => true,
317
 
                "remove_extra_items" => true,
318
 
                "ignore_invalid_data" => true
319
 
            ), array (
320
 
                "class" => "NULLFilter",
321
 
                "use_missing_items" => true,
322
 
                "check_growth" => true,
323
 
                "check_precise" => true,
324
 
            )
325
 
        )
326
 
));
327
 
 
328
 
// This is DBReader sources
329
 
 
330
 
$MAGNET_AXIS_DEFS = array(
331
 
        "/\(C\)/"       => "Temperature (C)",
332
 
        "/\(uT\)/"      => "Magnetic field (uT)",
333
 
        "/\(-\)/"       => "Status/error flag (-)",
334
 
        "/\(V\)/"       => "Voltage (V)"
335
 
);
336
 
 
337
 
$OPTIONS_DB = array(
338
 
//    "timezone" => "Europe/Berlin",
339
 
    "time_module" => "MSTICKS",
340
 
    "timesort" => 1,
341
 
    "min_resolution" => 10,
342
 
    "ignore_subseconds" => false,
343
 
    "optimize_empty_cache" => true,
344
 
    "use_cache_timewindow" => true,
345
 
    "use_md5_postfix" => true,
346
 
    "channel_uids" => true,
347
 
    "date_limit" => "2009-09-09 00:00:00",
348
 
    "tables" => array(
349
 
        "/^Wv\\\$LiveData\\\$(.*)$/" => array(
350
 
            'gid' => '${1}',
351
 
            'title' => '${1}'
352
 
        )
353
 
    ),
354
 
    "groups" => array(
355
 
        "/^(.*)$/" => '[Wv$LiveData\$${1}]'
356
 
    ),
357
 
    "columns" => array(
358
 
        "time" => "WsDateTimeTicks",
359
 
        "data" => "/^\d/"
360
 
    )
361
 
);
362
 
 
363
 
$OPTIONS["temp0"] = array_merge($OPTIONS_DB, array(
364
 
    "item_table" => array(
365
 
                "table" => 'cda.[Wt$ConfigData$TempMonSensors]',
366
 
                "id" => "WsName",
367
 
                "properties" => array(
368
 
                    "name" => "WsDescription",
369
 
                    "uid" => "WsName",
370
 
                    "axis" => "WsUnit"
371
 
                )
372
 
)));
373
 
 
374
 
$OPTIONS["magnetometer0"] = array_merge($OPTIONS_DB, array(
375
 
    "tables" => array(
376
 
        "/^Wt\\\$LiveData\\\$(.*)$/" => array(
377
 
            'gid' => '${1}',
378
 
            'title' => '${1}'
379
 
        )
380
 
    ),
381
 
    "groups" => array(
382
 
        "/^(.*)$/" => 'mda.[Wt$LiveData\$${1}]'
383
 
    ),
384
 
    "columns" => array(
385
 
        "time" => "WsDateTimeTicks",
386
 
        "data" => "/^Ws(Ch)?_/"
387
 
    ),
388
 
    "axis" => $MAGNET_AXIS_DEFS,
389
 
    "mask_table" => array(
390
 
        "table" => 'mda.[Wt$ConfigData$Masks]',
391
 
        "id" => "WsTID",
392
 
        "gid" => "WsTable",
393
 
        "properties" => array(
394
 
            "name" => "WsName",
395
 
            "mask" => "WsChannels"
396
 
        )
397
 
    ),
398
 
    "item_table" => array(
399
 
                "table" => 'mda.[Wt$ConfigData$SensorlistRing2]',
400
 
                "id" => "name",
401
 
                "properties" => array(
402
 
                    "name" => "comment",
403
 
                    "uid" => "comment",
404
 
                )
405
 
    )
406
 
));
407
 
 
408
 
$OPTIONS["mos0"] = array_merge($OPTIONS_DB, array(
409
 
    "columns" => array(
410
 
        "time" => "WsDateTimeTicks",
411
 
        "data" => "/^(MoS|MoU|\d)/"
412
 
    )
413
 
));
414
 
 
415
 
$OPTIONS["cs0"] = array_merge($OPTIONS_DB, array(
416
 
    "tables" => array(
417
 
        "/^Wv\\\$LiveData\\\$(\d+.*)$/" => array(
418
 
            'gid' => '${1}',
419
 
            'title' => '${1}'
420
 
        )
421
 
    ),
422
 
));
423
 
 
424
 
$OPTIONS["csms"] = $OPTIONS["cs0"];
425
 
$OPTIONS["csmos"] = $OPTIONS["cs0"];
426
 
$OPTIONS["cstloops"] = $OPTIONS["cs0"];
427
 
 
428
 
 
429
 
// This is channel spleating 
430
 
$OPTIONS["cs0__ControlSystem_rep.20120207"] = array(
431
 
    "tables" => array(
432
 
        "/^Wv\\\$LiveData\\\$(MonSpec435)$/" => array(
433
 
            array(
434
 
                'gid' => '${1}@1',
435
 
                'title' => '${1}-1'
436
 
            ),
437
 
            array(
438
 
                'gid' => '${1}@2',
439
 
                'title' => '${1}-2'
440
 
            )
441
 
        ),
442
 
        "/^Wv\\\$LiveData\\\$(MonSpec.*)$/" => array(
443
 
            'gid' => '${1}',
444
 
            'title' => '${1}'
445
 
        )
446
 
    ),
447
 
    "groups" => array(
448
 
        "/^([^@]*)(@\d)?$/" => '[Wv$LiveData\$${1}]'
449
 
    ),
450
 
);
451
 
 
452
 
$OPTIONS["cs0__ControlSystem_rep.20120207__MonSpec435@1"] = array(
453
 
    "columns" => array(
454
 
        "time" => "WsDateTimeTicks",
455
 
        "data" => "/\/435[A-H]/"
456
 
    )
457
 
);
458
 
 
459
 
$OPTIONS["cs0__ControlSystem_rep.20120207__MonSpec435@2"] = array(
460
 
    "columns" => array(
461
 
        "time" => "WsDateTimeTicks",
462
 
        "data" => "/\/435[I-Z]/"
463
 
    )
464
 
);
465
 
 
466
 
$OPTIONS["csmos__ControlSystem_MoS_201202__MonSpec435@1"] = $OPTIONS["cs0__ControlSystem_rep.20120207__MonSpec435@1"];
467
 
$OPTIONS["csmos__ControlSystem_MoS_201202__MonSpec435@2"] = $OPTIONS["cs0__ControlSystem_rep.20120207__MonSpec435@2"];
468
 
 
469
 
 
470
 
// This is plugin sources 
471
 
/*
472
 
$OPTIONS["kdb"] = array(
473
 
    "date_limit" => "2009-11-00 00:00:00"
474
 
);
475
 
 
476
 
$SEARCH_ENGINES["KDBSearch"] = array();
477
 
*/
478
 
 
479
 
$ORCA_AXIS_DEFS = array(
480
 
        "/\(C\)/"   => "temperature",
481
 
        "/\(nA\)/"  => "current/nano",
482
 
        "/\(#\)/"    => "number",
483
 
        "/\(V\)/"    => "voltage"
484
 
);
485
 
 
486
 
$OPTIONS["orca"] = array(
487
 
            "groups" => array(
488
 
                "/^(.*)$/" => '${1}',
489
 
            ),
490
 
            "tables" => array(
491
 
                "/^(Data_0[\w\d_]+)$/" => array(
492
 
                    'gid' => '${1}',
493
 
                    'title' => '${1}'
494
 
                )
495
 
            ),
496
 
            "columns" => array(
497
 
                "time" => "sec",
498
 
               "data" => "/^\d+/" 
499
 
            ),
500
 
            "timesort" => 1,                                    // 0 - NATURAL, 1 - ASC, -1 - DESC, string whith request
501
 
//            "time_module" => "USECTICKS",
502
 
            "time_format" => "U",
503
 
            "min_resolution" => 10,
504
 
            "ignore_subseconds" => true,
505
 
            "optimize_empty_cache" => true,
506
 
            "use_cache_timewindow" => true,
507
 
//          "use_cache_reader" => true,
508
 
            "use_md5_postfix" => true,
509
 
            "axis" => $ORCA_AXIS_DEFS,
510
 
//            "axes_table" => array(
511
 
//                "table" => "Axislist",
512
 
//                "id" => "id",
513
 
//                "properties" => array(
514
 
//                    "axis_name" => "comment",
515
 
//                    "axis_units" => "unit"
516
 
//                )
517
 
//            ),
518
 
            "item_table" => array(
519
 
                "table" => "Sensorlist",
520
 
                "id" => "name",
521
 
                //"gid" => "group",
522
 
                "properties" => array(
523
 
                    "uid" => "comment",
524
 
                    "name" => "comment",
525
 
                    //"axis" => "axis"
526
 
                )
527
 
            ),
528
 
            "data_filters" => array(
529
 
                "BADVALUEFilter" => array (
530
 
                    "badvalue" => -50
531
 
                )
532
 
            )
533
 
);
534
 
 
535
 
 
536
 
?>