From 32d0a91e343399ebeea1b886a793843337fb17e7 Mon Sep 17 00:00:00 2001 From: Alvaro Ezquerro Date: Wed, 27 Nov 2024 14:40:25 +0100 Subject: [PATCH 1/2] fix conversion from milliseconds to nanoseconds --- src/TRestRawFeminosRootToSignalProcess.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/TRestRawFeminosRootToSignalProcess.cxx b/src/TRestRawFeminosRootToSignalProcess.cxx index bd7be45..32a7b5f 100644 --- a/src/TRestRawFeminosRootToSignalProcess.cxx +++ b/src/TRestRawFeminosRootToSignalProcess.cxx @@ -123,8 +123,8 @@ TRestEvent* TRestRawFeminosRootToSignalProcess::ProcessEvent(TRestEvent* inputEv fSignalEvent->SetID(fInputTreeEntry); - // TODO: double check this is correct - fSignalEvent->SetTime(fInputEventTreeTimestamp / 1000, fInputEventTreeTimestamp % 1000); + // fInputEventTreeTimestamp is in milliseconds and TRestEvent::SetTime(seconds, nanoseconds) + fSignalEvent->SetTime(fInputEventTreeTimestamp / 1000, fInputEventTreeTimestamp % 1000 *1000000); for (size_t i = 0; i < fInputEventTreeSignalIds->size(); i++) { auto signal = TRestRawSignal(); From 439884d35266196d5772ef5fd95e5937955687c9 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 27 Nov 2024 13:42:24 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/TRestRawFeminosRootToSignalProcess.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TRestRawFeminosRootToSignalProcess.cxx b/src/TRestRawFeminosRootToSignalProcess.cxx index 32a7b5f..4e96a04 100644 --- a/src/TRestRawFeminosRootToSignalProcess.cxx +++ b/src/TRestRawFeminosRootToSignalProcess.cxx @@ -124,7 +124,7 @@ TRestEvent* TRestRawFeminosRootToSignalProcess::ProcessEvent(TRestEvent* inputEv fSignalEvent->SetID(fInputTreeEntry); // fInputEventTreeTimestamp is in milliseconds and TRestEvent::SetTime(seconds, nanoseconds) - fSignalEvent->SetTime(fInputEventTreeTimestamp / 1000, fInputEventTreeTimestamp % 1000 *1000000); + fSignalEvent->SetTime(fInputEventTreeTimestamp / 1000, fInputEventTreeTimestamp % 1000 * 1000000); for (size_t i = 0; i < fInputEventTreeSignalIds->size(); i++) { auto signal = TRestRawSignal();