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

TPM HDF5 Usage #268

Merged
merged 8 commits into from
Jan 26, 2024
Merged

TPM HDF5 Usage #268

merged 8 commits into from
Jan 26, 2024

Conversation

aeoranday
Copy link
Member

TriggerPrimitiveMaker currently uses a txt file to read TriggerPrimitives from. This change allows the TPM to use HDF5 files to read from with the requirement that the HDF5 file contains TimeSlices (implying the file is a tpstream).

This was tested using generate_tpset_from_tpm.cxx. This application focuses on the changes made to the TPM by copying the new code and running against an arbitrary tpstream file. This does not test the use of TPM in the replay application.

Copy link
Contributor

@ArturSztuc ArturSztuc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I would add an extra sanity check, however, as above in the review.

// If we crossed a time boundary, push the current TPSet and reset it
if (current_tpset_number > prev_tpset_number) {
tpset.start_time = prev_tpset_number * m_conf.tpset_time_width + m_conf.tpset_time_offset;
tpset.end_time = tpset.start_time + m_conf.tpset_time_width;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this how this is set in the readout? Does the config have a default value that's the same as readout's default value for TPSet creation?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not refer to how TPSets are created in readout. The changes here were to make use of reading from HDF5 files on the legacy code. There were no logic or definition changes otherwise.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case this might not be the final PR for HDF5 reading. I think as much as possible we want to emulate how the readout creates TPSets, so that the replay app is really trying to replay identical conditions.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. There will likely be more changes necessary to catch up to readout.

@bieryAtFnal
Copy link
Contributor

For formatting source code files, I suggest using dbt-clang-format.sh <filename>.

@aeoranday aeoranday requested a review from ArturSztuc January 26, 2024 17:12
Copy link
Contributor

@ArturSztuc ArturSztuc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you for all these changes!

@aeoranday aeoranday merged commit 879ead3 into develop Jan 26, 2024
1 check passed
@aeoranday aeoranday deleted the aeoranday/tpm-hdf5-usage branch January 26, 2024 23:35
@bieryAtFnal bieryAtFnal added the miscellaneous deliverable A change that is/will be part of a release but is not substantial enough to be a daq-deliverable label Jan 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
miscellaneous deliverable A change that is/will be part of a release but is not substantial enough to be a daq-deliverable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants