fdhwlib
2.0.25
|
The background data is recorded in a ASCII format, readable with any standard editor. Every background record contains some header information (like time stamp, ...) and up to five background variables for every pixel. The actual recorded variables depend on the parameter settings of the recorder.
Background variables:
Every background record originates from a single telescope and contains always one header line. This header gives the following information. The values are taken from the sample file shown below.
Data format of the background variable entries. Every entry contains a header line with the key, some parameters and the information how many pixel are covered.
All background data is produced by the classes TsBackgroundBase, TsBackground and Ts4Background coming with the hardware access library fdhwlib. It contains the methods saveAMFormat() and loadAMFormat() to write and read the background data also in the ASCII format defined by A.Menshikov.
The following lines show a shortend sample background file. It contains the entries of one record and a little sample data. The listing is cut after the beginning of the second record.
** Timer is set = 5.000 s GPS time = 700448327 s Subsec = 634 x 100us Duration = 10074 x 100us TelescopeId = 2 ** Sigma-Delta. Row values [20][22] 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 ... ** HW Statistic (Variance * 1000 )[20][24], offset = 450, samples = 64000 2748 2698 2443 2503 2815 2943 ... 2820 2509 2559 2464 2632 2765 ... ** Thresholds (Row values) [20][22] 5048 4912 4924 4998 4999 5124 5092 5141 ... 4997 5011 4902 5095 5110 4995 5048 4455 ... ** Summ over 64000 (Row values) [20][24] 3068158 2199110 2317441 2772266 2611344 3526464 3286978 ... 2690289 2829912 2418027 3340485 3481613 2595680 2942420 ... ** Hit Ratess (Row values) [20][22] 0 0 14 4 0 0 0 0 ... 0 0 65 0 0 0 0 0 ... ** Timer is set = 5.000 s GPS time = 700448332 s Subsec = 966 x 100us Duration = 10768 x 100us ** Sigma-Delta. Row values [20][22] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
For the FD performance monitoring the background data is stored in a database. The organisation of the background data in the database is choosen according to the background data text files.
There are three tables:
The run table contains the parameters that defind a background run. This are start and stop time, the telescope number, sampling time and some more. For every run a new entry is writen to the database. The sample table gathers data for every sampling time. This means at first the the time stamp and readout timing parameters. The table stores also the mean value of background data distribution over all pixel. The last table stores the pixel data. For every pixel a data set is added to the table with the four background values.
Data types supported by MySQL:
signed unsigned tinyint 8 bit -128...127 0...255 smallint 16bit -32768 ... 32767 0 .. 65535. mediumint 24bit -8388608 ...8388607. 0 .. 16777215. int 32bit -2147483648 .. 2147483647. 0 ... 4294967295.
Value range for the bgrecord variables:
Run table `EyeId` 1..4 --> u tiny `TSample` 5...30 (evt n *60) --> u small `GPSStart` --> pc uses u int `GPSStop` --> pc uses u int `StatSamples` 1..65536 --> u medium (1 über small) `StatOffset` 0...200(vorher 500) --> u tiny/small `NSamples` 12h * 60 * 2 = 1500 / Nacht --> u small Sample Table `TelescopeId` 1..24 --> u tiny, `GPSSec` --> pc uses u int `GPSMiliSec` 0...999ms --> small `TReadout` 0...1000 ms --> u small `TTransfer` 0...1000 ms --> u small `TFile` 0...1000 ms --> u small `TDatabase` 0...1000 ms --> u small `MeanVariance` 3000 ... 200000 --> u medium `VarVariance` --> u medium `MeanThreshold` 0 ... 8000 --> u small `VarThreshold` 0 ... 8000? --> u small `MeanPedestal` 150000 --> u medium `VarPedestal` 150000? --> u medium `MeanHitrate` 0 .. 1023 --> u small `VarHitrate` 0 ... 1023 --> u small `NPixel` 0...440/480 --> u tiny
To create an empty database use the following commands in the mysql administration tool.
grant all privileges on *.* to auger@localhost with grant option; create database FDKarlsruhe; create database FDLosLeones; GRANT ALL ON FDKarlsruhe.* TO auger; GRANT ALL ON FDKarlsruhe.* TO auger; use FDLosLeones; CREATE TABLE `BGRunTab` ( `BGRunTabId` int(11) NOT NULL auto_increment, `DAQRunId` int(11) NOT NULL default '0', `EyeId` tinyint(11) unsigned NOT NULL default '0', `Filename` char(40) default '', `Type` enum('cal','run','test') default 'run', `TSample` smallint(5) unsigned NOT NULL default '0', `GPSStart` int(11) unsigned NOT NULL default '0', `GPSStop` int(11) unsigned NOT NULL default '0', `StatSamples` mediumint(5) unsigned NOT NULL default '0', `StatOffset` smallint(5) unsigned default NULL, `NSamples` smallint(5) unsigned default NULL, PRIMARY KEY (`BGRunTabId`) ) TYPE=MyISAM; CREATE TABLE `BGSampleTab` ( `BGSampleTabId` int(11) NOT NULL auto_increment, `BGRunTabId` int(11) unsigned NOT NULL default '0', `TelescopeId` tinyint(2) unsigned NOT NULL default '0', `Time` datetime, `GPSSec` int(11) unsigned NOT NULL default '0', `GPSMiliSec` smallint(5) unsigned default NULL, `TReadout` smallint(5) unsigned default NULL, `TTransfer` smallint(5) unsigned default NULL, `TFile` smallint(5) unsigned default NULL, `TDatabase` smallint(5) unsigned default NULL, `MeanVariance` mediumint(5) unsigned default NULL, `VarVariance` mediumint(5) unsigned default NULL, `MeanThreshold` smallint(5) unsigned default NULL, `VarThreshold` smallint(5) unsigned default NULL, `MeanPedestal` mediumint(5) unsigned default NULL, `VarPedestal` mediumint(5) unsigned default NULL, `MeanHitrate` smallint(5) unsigned default NULL, `VarHitrate` smallint(5) unsigned default NULL, `NPixel` smallint(3) unsigned default NULL, `MeanVarianceV` mediumint(5) unsigned default NULL, `VarVarianceV` mediumint(5) unsigned default NULL, `MeanPedestalV` mediumint(5) unsigned default NULL, `VarPedestalV` mediumint(5) unsigned default NULL, `NPixelV` smallint(3) unsigned default NULL, PRIMARY KEY (`BGSampleTabId`) ) TYPE=MyISAM; CREATE TABLE `BGPixelTab` ( `BGSampleTabId` int(11) NOT NULL default '0', `PixelId` smallint(3) unsigned NOT NULL default '0', `Variance` mediumint(11) default NULL, `Threshold` smallint(5) unsigned default NULL, `Pedestal` mediumint(11) default NULL, `Hitrate` smallint(5) unsigned default NULL, PRIMARY KEY (`BGSampleTabId`, `PixelId`) ) TYPE=MyISAM; CREATE TABLE `ErrorTab` ( `ErrorTabId` int(11) NOT NULL auto_increment, `Time` datetime, `GPSSec` int(11) unsigned NOT NULL default '0', `EyeId` tinyint(2) unsigned NOT NULL default '0', `TelescopeId` tinyint(2) unsigned NOT NULL default '0', `SevLevel` enum('info','warn','error','critical','severe','fatal'), `Message` text, `Process` enum('Esm','Evb','EvbControl','processd','eyerc','feapid','readout','recorder','sender','unknown') , `ErrorSourceTabId` int(11) unsigned, PRIMARY KEY (`ErrorTabId`) ) TYPE=MyISAM;