Project

General

Profile

Actions

Feature #350

open

BankData class and support in decoder

Added by Robert Michaels over 6 years ago. Updated almost 5 years ago.

Status:
Feedback
Priority:
Normal
Target version:
Start date:
04/26/2018
Due date:
05/11/2018 (over 6 years late)
% Done:

100%

Estimated time:
40.00 h
Spent time:
Responsible:
R. Michaels

Description

A "modern" way to put data into the datastream is to put separate pieces into banks, see attached picture (e.g. roc20 has 7, 8, 250, and 1495). It would be convenient to be able to pull data by (crate, bank). To support this, I am providing a new class BankData which produces global variables by reading in a database file that defines the variable name and the crate and bank. The variables can be an array, and one can skip a certain number of words in the bank. Examples of lines in the DB file are below. In order to support this class, some modifications are needed to CodaDecoder and THaEvData to store the pointers to the event buffer, and the length of bank's data, for each bank in each crate.

Examples of DB lines and their interpretation.
  1. variable crate bank Nskip Nelement
    rfadc 20 250
    skip5 20 250 5
    xarray 20 250 8 10
    norf 20 7 2 4

rfadc: one global variable named "rfadc" from crate 20 bank 250. It's the first word of that bank.
skip5: similar to rfadc, but skip the first 5 words.
xarray: an array of length 10 of data in crate 20 bank 250, skip the first 8 words.
norf: array of length 4, skipping 2, from crate 20 bank 7.


Files

banks.png (20.6 KB) banks.png Robert Michaels, 04/26/2018 09:34 AM
db_BD.dat (404 Bytes) db_BD.dat Robert Michaels, 05/08/2018 12:17 PM
Actions

Also available in: Atom PDF