Trigger Primitive Communication Interface for testing at protoDUNE - - PowerPoint PPT Presentation

trigger primitive communication interface for testing at
SMART_READER_LITE
LIVE PREVIEW

Trigger Primitive Communication Interface for testing at protoDUNE - - PowerPoint PPT Presentation

Trigger Primitive Communication Interface for testing at protoDUNE Brett Viren with input from Phil, Kurt, Josh Physics Department DAQ DS 15 Feb 2019 What we have now (from Kurt) Brett Viren (BNL) TP IPC API 15 Feb 2019 2 / 9 What we


slide-1
SLIDE 1

Trigger Primitive Communication Interface for testing at protoDUNE Brett Viren

with input from Phil, Kurt, Josh Physics Department DAQ DS – 15 Feb 2019

slide-2
SLIDE 2

What we have now (from Kurt)

Brett Viren (BNL) TP IPC API 15 Feb 2019 2 / 9

slide-3
SLIDE 3

What we want (from Kurt, IPC version)

Brett Viren (BNL) TP IPC API 15 Feb 2019 3 / 9

slide-4
SLIDE 4

API: Transport Pipeline

  • TP finder code uses a TPSink, new BR uses a TPSource.
  • These classes hide IPC details from the apps.
  • Middleware replaceable w/out app code changes
  • Test different communication patterns, insert functionality
  • Shown here, use PUB/SUB pattern for network traffic.

// TP finder TPSink s(cfg); TPSet tps; while (true) { make_tps(tps); auto rc = s(tps); if (rc) { cerr << "Oops!\n" } } // new TP BR TPSource s(cfg); TPSet tps; while (0 == s(tps)) { // serve TPs to EB }

Brett Viren (BNL) TP IPC API 15 Feb 2019 4 / 9

slide-5
SLIDE 5

API: Data

TPSet with metadata about its TrigPrim’s

detid APA face number or smaller address count sequence each set datatime absolute time measured by det. elec. timespan of all TPs in the set chanspan dittor for channels TrigPrim values self-explanatory

Data rate here is not an issue, room to add more.

Brett Viren (BNL) TP IPC API 15 Feb 2019 5 / 9

slide-6
SLIDE 6

Why the explicit TPSet?

Why not just pass individual TrigPrim messages?

  • 39Ar will produce 50-150 kHz TP per APA face.
  • This is only a few MB/s but is an uncomfortably high network

packet rate if each TP is sent as one message.

  • Thus, must do some bundling.
  • ZeroMQ can auto-bundle messages up to 8kB.
  • API can do the bundling but it must do so “dumbly” (treat data as
  • paque), else transport becomes application.
  • The sending app can do smarter bundling and provide TPSet

metadata.

  • Why make the app do it?
  • Receiving app can use metadata to assist in marshalling w/out having to

read TP data.

  • Gets us one step closer to MLT functionality.

Brett Viren (BNL) TP IPC API 15 Feb 2019 6 / 9

slide-7
SLIDE 7

Packaging

Will provide a “PTMP” software package:

  • “Prototype Trigger Message Passing”
  • C++ source in stand-alone repository.
  • Portable build system producing shared lib + headers.
  • Reference applications sending dummy TPs.
  • External dependencies:
  • libzmq
  • libczmq
  • protoc (build time)

Brett Viren (BNL) TP IPC API 15 Feb 2019 7 / 9

slide-8
SLIDE 8

FIN

Brett Viren (BNL) TP IPC API 15 Feb 2019 8 / 9

slide-9
SLIDE 9

API: Alternative Patterns

Use PUSH/PULL instead of PUB/SUB Make direct sink/source connect, eg between two threads in same app.

Can replace or even remove intervening actors:

  • Investigate different socket patterns and their performance.
  • Insert additional processing steps:
  • filters, refiners, loggers, monitors
  • App can also be implemented inside an actor function.

These added value/features are for free.

Brett Viren (BNL) TP IPC API 15 Feb 2019 9 / 9