Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Module ImgAlgos::UsdUsbEncoderFilter

This ImgAlgos::UsdUsbEncoderFilter (ImgAlgos > V00-03-43) module is created by request of Thomas Kroll for experiment with mobile rack in SACLA .

It has This psana module contains an example of how to get UsdUsb::DataV1 object and timestime-tamps stamps from different data sources for event synchronization purpose.

Functionality:

To work with time-code objects it uses helper class TimeCode. It loads input timing information from file defined by the  ifname  and store it in the std::vector<TimeCode> member object. For each event the TimeCode object is defined from data; time stamp from PSEvt::EventId, and unique code from UsdUsb::DataV1. TheTimeCode object from data is compared with information loaded from the input file. If the TimeCode object from data is consistent with one of the records in the file event is passed for further processing, otherwise discarded.

 

parameter

default value

description

source

"DetInfo(:USDUSB)"

source of data

mode

1input image key

filter mode: 0-off, 1-on, -1-on in inverted decision mode

ifname
""(empty)

 

input file name, is empty by default

ofname

"" (empty) 

output file name, is empty by default

 bitmask 63bitmask on UsdUsb code, by default use 6 bits 

print_bits

0

verbosity:

  • =0 - print nothing
  • +1 - input pars
  • +2 - records from input file
  • +4 - open/close info for output file
  • +8 - filter summary
  • +16 - content of the UsdUsb::ConfigV1 object
  • +32 - content of the UsdUsb::DataV1 object

 

Input (ifname) and output (ofname) files have any number of records of the same format. Each record consists of four integer numbers:

  •     timestamp sec (uint32_t),
  •     timestamp nsec (uint32_t),
  •     UsdUsb 6-bit code (uint8_t),
  •     user defined counter (unsigned).

Example of the input/output file content:

Code Block
1373280273 293197261  51     1
1373280273 301532011  52     2
1373280273 309867156  54     3
1373280273 318206221  58     4
1373280273 326553079  61     5
...

 

 

 

 

 

Module ImgAlgos::ImgIntMonCorr

...

 

...