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

Fix TRestRawFeminosRootToSignalProcess setting a wrong timestamp #150

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

AlvaroEzq
Copy link
Contributor

@AlvaroEzq AlvaroEzq commented Nov 27, 2024

AlvaroEzq Ok: 2 Powered by Pull Request Badge

PR to fix issue #149

The timestamp of the event is not set correctly in this line:

// TODO: double check this is correct
fSignalEvent->SetTime(fInputEventTreeTimestamp / 1000, fInputEventTreeTimestamp % 1000);

This is due to the fInputEventTreeTimestamp being in milliseconds and the method TRestEvent::SetTime second parameter is nanoseconds. So the subsecond information of the timestamp is not correct. This is solved easily by just changing that line to
fSignalEvent->SetTime(fInputEventTreeTimestamp / 1000, fInputEventTreeTimestamp % 1000 * 1.e6);

@AlvaroEzq AlvaroEzq linked an issue Nov 27, 2024 that may be closed by this pull request
@AlvaroEzq AlvaroEzq changed the title Fix TRestRawFeminosRootToSignalProcess sets a wrong timestamp Fix TRestRawFeminosRootToSignalProcess setting a wrong timestamp Nov 27, 2024
@AlvaroEzq AlvaroEzq requested a review from lobis November 27, 2024 18:33
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

Successfully merging this pull request may close these issues.

TRestRawFeminosRootToSignalProcess sets a wrong timestamp
1 participant