Skip to content

Add a heuristic time offset to data products to allow crude calculation of wallclock time #42

@bieryAtFnal

Description

@bieryAtFnal

Here are some proposals. I will check that all of them are acceptable:

  1. this change will only affect the dataformats and dfmodules repos
  2. a new field should be added to the TriggerRecordHeader
    • its data type should be timestamp_t
    • its name should be heuristic_time_offset ???
    • should we also add this field to the FragmentHeader so that Fragments could have their timestamps reasonably interpreted without needing an accompanying TRH?
  3. in the dfmodules package, the primary change will be to populate this field. This change could be made in the FragmentReceiver or the DataWriter. The algorithm for populating this field should be something like the following:
    • within each run, when the first TriggerRecord is created or received, look up the current Linux system time in number of seconds since the Epoch, convert that number of seconds into DUNE clock ticks (e.g. multiply by 5e7 for a 50 MHz clock), and determine the difference between that number of clock ticks and the trigger_timestamp that is stored in the TriggerRecordHeader. This value is the heuristic_time_offset for all TRs in the run, and this value should be stored in the TRH::heuristic_time_offset field of all TRs in the run.
  4. another change in the dfmodules package will be to update the hdf5_dump.py script to make use of this new field to produce a human-readable string for timestamp(s) in each TR and Fragment, as needed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions