JeffersonLab / JANA4ML4FPGA

EIC R&D supported project developing ML on FPGA for streaming readout systems
1 stars 1 forks source link

Add CDAQfile plugin back #24

Closed cissieAB closed 1 year ago

cissieAB commented 1 year ago

Updates

Test

Test on gluon200, the jana way to call jana4ml4fpga

[hdtrdops@gluon200 JANA4ML4FPGA]$ ./install/bin/jana4ml4fpga -Pplugins=CDAQfile,example_evio_analysis,root_output /gluonraid3/data4/rawdata/trd/DATA/hd_rawdata_002539_002.evio
...
[2023-03-08 23:52:11.611] [CDAQfile] [info] Read block 81 status: 0
[2023-03-08 23:52:11.612] [CDAQfile] [info] Parsed block 81 had 1 events, swap_needed=true
[2023-03-08 23:52:11.612] [CDAQfile] [info]   Event #0 got event-number=0:
[2023-03-08 23:52:11.612] [CDAQfile] [info]     Factory = Df125Config                     NumObjects = 80
[2023-03-08 23:52:11.612] [CDAQfile] [info]     Factory = DCODAROCInfo                    NumObjects = 160
[2023-03-08 23:52:11.612] [CDAQfile] [info]     Factory = Df125FDCPulse                   NumObjects = 3342
[2023-03-08 23:52:11.612] [CDAQfile] [info]     Factory = Df125TriggerTime                NumObjects = 320
[2023-03-08 23:52:11.612] [CDAQfile] [info]     Factory = Df250TriggerTime                NumObjects = 80
[2023-03-08 23:52:11.612] [CDAQfile] [info]     Factory = Df125WindowRawData              NumObjects = 3342
[2023-03-08 23:52:11.612] [CDAQfile] [info]     Factory = DGEMSRSWindowRawData            NumObjects = 102400
[INFO] Status: 0 events processed  0.0 Hz (0.0 Hz avg)
[INFO] All workers have stopped.
[INFO] Merging threads ...
[INFO] JArrow: Finalized JEventProcessor ''
[INFO] Event processing ended.
[INFO] JArrowProcessingController: Final Report
  Thread team size [count]:    1
  Total uptime [s]:            2.513
  Uptime delta [s]:            0.01025
  Completed events [count]:    0
  Inst throughput [Hz]:        0
  Avg throughput [Hz]:         0
  Sequential bottleneck [Hz]:  0
  Parallel bottleneck [Hz]:    0
  Efficiency [0..1]:           inf

  +--------------------------+------------+--------+-----+---------+-------+--------+---------+-------------+
  |           Name           |   Status   |  Type  | Par | Threads | Chunk | Thresh | Pending |  Completed  |
  +--------------------------+------------+--------+-----+---------+-------+--------+---------+-------------+
  | sources                  | Finished   | Source |  F  |       0 |    40 |      - |       - |           0 |
  | processors               | Finished   | Sink   |  T  |       0 |     1 |     80 |       0 |           0 |
  +--------------------------+------------+--------+-----+---------+-------+--------+---------+-------------+
  +--------------------------+-------------+--------------+----------------+--------------+----------------+
  |           Name           | Avg latency | Inst latency | Queue latency  | Queue visits | Queue overhead | 
  |                          | [ms/event]  |  [ms/event]  |   [ms/visit]   |    [count]   |     [0..1]     | 
  +--------------------------+-------------+--------------+----------------+--------------+----------------+
  | sources                  |         inf |          inf |        0.00374 |            1 |       1.49e-06 |
  | processors               |         inf |          inf |            inf |            0 |           -nan |
  +--------------------------+-------------+--------------+----------------+--------------+----------------+
  +----+----------------------+-------------+------------+-----------+----------------+------------------+
  | ID | Last arrow name      | Useful time | Retry time | Idle time | Scheduler time | Scheduler visits |
  |    |                      |     [ms]    |    [ms]    |    [ms]   |      [ms]      |     [count]      |
  +----+----------------------+-------------+------------+-----------+----------------+------------------+
  |  0 | idle                 |    2.51e+03 |          0 |         0 |         0.0588 |                1 |
  +----+----------------------+-------------+------------+-----------+----------------+------------------+

[2023-03-08 23:52:12.110] [RootFile] [info] Closed user histogram file: eicrecon.root
[2023-03-08 23:52:12.163] [CDAQfile] [info] Closing EVIO file /gluonraid3/data4/rawdata/trd/DATA/hd_rawdata_002539_002.evio

EVIO Statistics for /gluonraid3/data4/rawdata/trd/DATA/hd_rawdata_002539_002.evio :
------------------------
    Nblocks: 81
    Nevents: 81
    Nerrors: 0
Nbad_blocks: 0
Nbad_events: 0

/home/hdtrdops/GemTrd_2023/JANA4ML4FPGA/src/libraries/evio/HDEVIO.cc:106 Call HDEVIO destructo??
cissieAB commented 1 year ago

If you use the same base command as above, but add a "-t" option, then jana4ml4fpga will process the input *.evio as a BlockedEventSource, CDAQfile plugin will be ignored. @DraTeots

[hdtrdops@gluon200 JANA4ML4FPGA]$ ./install/bin/jana4ml4fpga -t -Pplugins=CDAQfile,example_evio_analysis,root_output /gluonraid3/data4/rawdata/trd/DATA/hd_rawdata_002539_002.evio

[INFO] Block 81 read_ok
/home/hdtrdops/GemTrd_2023/JANA4ML4FPGA/src/executables/jana4ml4fpga/EVIOBlockProcessor.cc:20
[INFO] JBlockedEventSource::NextBlock
[INFO] No more blocks in "/gluonraid3/data4/rawdata/trd/DATA/hd_rawdata_002539_002.evio"!

EVIO Statistics for /gluonraid3/data4/rawdata/trd/DATA/hd_rawdata_002539_002.evio :
------------------------
    Nblocks: 81
    Nevents: 81
    Nerrors: 0
Nbad_blocks: 0
Nbad_events: 0

[INFO] Closing EVIO file "/gluonraid3/data4/rawdata/trd/DATA/hd_rawdata_002539_002.evio"!
/home/hdtrdops/GemTrd_2023/JANA4ML4FPGA/src/libraries/evio/HDEVIO.cc:106 Call HDEVIO destructo??