Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TODO: Local Event ID #5

Open
watsonjj opened this issue Feb 21, 2020 · 0 comments
Open

TODO: Local Event ID #5

watsonjj opened this issue Feb 21, 2020 · 0 comments

Comments

@watsonjj
Copy link
Contributor

watsonjj commented Feb 21, 2020

In TargetDriver (in the the old event builder and the new one), an event ID is calculated from:

uint32_t eventID = (uint32_t)(dataPacket.GetTACKTime() / 100);

This ID is used to check if a new packet belongs in an event. The ID is also stored in the event header of the FITS binary table (as a 32 bit unsigned int).

In TargetDriver DataListener.cc the following TODO was left by Jim:

    // Use TACK stamp as event ID. This should be OK as long as TACK is always
    // properly set and unique.
    // TODO(Jim): Casting uint64_t to uint32_t is not safe here. Event ID was
    // first introduced to hold sequential integers. If we really want to use
    // uint64_t for event IDs, event header format and the corresponding FITS
    // header must be updated.
    eventID = (uint32_t)(dataPacket.GetTACKTime() / 100);
    // Jim - 100 ns precision is sufficient - work around...

From the current R1 document there is the concept of a local_event_id as part of the R1 data model. It is sent to ACADA in the Trigger message, who then send an EventRequest message with the requested_local_event_id. It is defined as a uint64_t.

How should we proceed with our local event IDs?

  1. We continue with this current approach

  2. We switch to using the TACK as the event ID. This fits the uint64 presently defined in the R1 data model document. We can use the TACK itself to decide if a packet belongs in an event (instead of this "reduced TACK"). We update the event header definition for the FITS file to store the uint64 (and bump the event header version).

  3. Something else is used for event ID....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant