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

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

Open
bieryAtFnal opened this issue Feb 22, 2021 · 0 comments

Comments

@bieryAtFnal
Copy link
Collaborator

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
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