Psana2 makes all events that are integrated by a user-specified detector available on the same process.

Test data

index0123
45678910
111213141516
1718192021
2223

s000

0123|45678910|111213141516|1718192021|2223
s0010123|


7

10|

13

16|

19
21|2223*
s0020123|





10|





|


2021|2223
value




0123456
789101112
13141516




Note:

ts 0, 1, 2, 3, 21, 22, 23 are Transtion events.

* = integrating detector

Test script

Here's the sample script reads a run with three stream files. In this run, the andor (s001) is to integrate over other detectors. You can see that the series of events show up correctly by looking at the sum of the hsd (s000) and epix (s002). 

In this example, chunk size is 2 (PS_SMD_N_EVENTS=2/ two integrating events per chunk) and batch size is 1 (batch_size=1/ one integrating events per batch). 
EventBuilder receives: 
Note that 0 and 1 (Configure and BeginRun) are skipped
2-3 (BeginStep and Enable are broadcasted - not shown below on Bds)

4-10 
11-16
17-20

Bd 0 receives:
4-7
11-13
17-19

Bd 1 receives:
8-10
14-16
20-21 

Design details

SMD0

Without an integrating detector, Smd0 reads chunks of data and sends these chunks of a defined size (PS_SMD_N_EVENTS) to EventBuilders. Since there can be different of events in each stream (depending on detector rates), no. of events from the slowest detector is used to identify the limiting timestamp. This timestamp is then used to locate the boundaries for other detectors. 

With integrating detector, no. of events from the integrating detector is used instead of the slowest detector. Every time Smd0 sends a chunk, it contains either exactly (or fewer) integrating events as defined in PS_SMD_N_EVENTS.

EventBuilders

Similar to shifting how chunk size is identified in Smd0, EventBuilders (when integrating detector is set) counts no. of events from the integrating detectors as their `batch_size` instead of just counting any events. All events prior to this marked batch_size event are sent to the same BigData cores. Users can identify this marker from the values that they see from the detector interface (None means continuous batch and Value means end of batch). 


  • No labels