-
Notifications
You must be signed in to change notification settings - Fork 16
Frame Shift Module to Correct Timing in Data - PR For Spring Production #155
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
Merged
Merged
Changes from 7 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
ea2a3d8
first commit
VCLanNguyen b05e89d
make new caf standard record
VCLanNguyen 123c48d
update sbnd timing class
VCLanNguyen 5c21b16
add doxygen style comments
VCLanNguyen 99b8a82
Merge branch 'release/SBN2025A' into lnguyen/frame_shift_pr_spring
VCLanNguyen eeed440
change class to struct
VCLanNguyen 6cba924
Merge branch 'lnguyen/frame_shift_pr_spring' of https://github.com/SB…
VCLanNguyen 811ae4f
fix classes_def
VCLanNguyen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| /** | ||
| * @file /sbnanaobj/StandardRecord/SRSBNDFrameShiftInfo.h | ||
| * @brief Defines CAF data structures to store sbnd::timing::FrameShiftInfo (docdb#43090). | ||
| * @author Vu Chi Lan Nguyen | ||
| * @date August 29, 2025 | ||
| * | ||
| */ | ||
|
|
||
| #ifndef SRSBNDFRAMESHIFTINFO_H | ||
| #define SRSBNDFRAMESHIFTINFO_H | ||
|
|
||
| #include <cstdint> | ||
| #include "sbnanaobj/StandardRecord/SRConstants.h" | ||
|
|
||
| namespace caf | ||
| { | ||
| /** | ||
| * @brief A struct to store shifts across different reference frames from sbnd::timing::FrameShiftInfo for SBND Data | ||
| * | ||
| * Each shift is in [ns] | ||
| * | ||
| * For more information, see | ||
| * [SBN DocDB 43090](https://sbn-docdb.fnal.gov/cgi-bin/sso/ShowDocument?docid=43090). | ||
| */ | ||
|
|
||
| struct SRSBNDFrameShiftInfo { | ||
| static constexpr uint16_t NoType = std::numeric_limits<uint16_t>::max(); | ||
| uint16_t timingType = NoType; ///< Types of decoded frames: 0 - SPEC TDC ETRIG, 1 - HLT ETRIG, 2 - Do Nothing | ||
| double frameTdcCrtt1 = kSignalingNaN; ///< Shift from decoded frame to SPEC-TDC CRT T1 [ns] | ||
| double frameTdcBes = kSignalingNaN; ///< Shift from decoded frame to SPEC-TDC BES [ns] | ||
| double frameTdcRwm = kSignalingNaN; ///< Shift from decoded frame to SPEC-TDC RWM [ns] | ||
| double frameHltCrtt1 = kSignalingNaN; ///< Shift from decoded frame to HLT CRT T1 [ns] | ||
| double frameHltBeamGate = kSignalingNaN; ///< Shift from decoded frame to HLT Beam Gate [ns] | ||
| double frameApplyAtCaf = kSignalingNaN; ///< Frame to shift to when running at CAF stage | ||
| }; | ||
| } // end namespace | ||
| #endif // SRSBNDFRAMESHIFTINFO_H | ||
| ////////////////////////////////////////////////////////////////////////////// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| /** | ||
| * @file /sbnanaobj/StandardRecord/SRSBNDTimingInfo.h | ||
| * @brief Defines CAF data structures to store sbnd::timing::TimingInfo (docdb#43090). | ||
| * @author Vu Chi Lan Nguyen | ||
| * @date August 29, 2025 | ||
| * | ||
| */ | ||
|
|
||
| #ifndef SRSBNDTIMINGINFO_H | ||
| #define SRSBNDTIMINGINFO_H | ||
|
|
||
| #include <stdint.h> | ||
|
|
||
| namespace caf | ||
| { | ||
| /** | ||
| * @brief A struct to store important timestamps from sbnd::timing::TimingInfo for SBND data | ||
| * | ||
| * Each timestamp is in UNIX Timestamp Format [ns] | ||
| * | ||
| * For more information, see | ||
| * [SBN DocDB 43090](https://sbn-docdb.fnal.gov/cgi-bin/sso/ShowDocument?docid=43090). | ||
| */ | ||
|
|
||
| struct SRSBNDTimingInfo | ||
| { | ||
| static constexpr uint64_t NoTimestamp = std::numeric_limits<uint64_t>::max(); | ||
|
|
||
| uint64_t rawDAQHeaderTimestamp = NoTimestamp; ///< Timestamp when the event is built by the event builder at DAQ-level | ||
| uint64_t tdcCrtt1 = NoTimestamp; ///< Timestamp of BNB stream CRT T1 Reset recorded by the SPEC-TDC | ||
| uint64_t tdcBes = NoTimestamp; ///< Timestamp of BES signal sent by MFTU recorded by the SPEC-TDC | ||
| uint64_t tdcRwm = NoTimestamp; ///< Timestamp of RWM signal recorded by the SPEC-TDC | ||
| uint64_t tdcEtrig = NoTimestamp; ///< Timestamp of Event Trigger (ETRIG) sent by the PTB recorded by the SPEC-TDC | ||
| uint64_t hltCrtt1 = NoTimestamp; ///< Timestamp of BNB and Offbeam stream CRT T1 Reset High Level Trigger (HLT) created by the PTB | ||
| uint64_t hltEtrig = NoTimestamp; ///< Timestamp of ETRIG HLT created by the PTB | ||
| uint64_t hltBeamGate = NoTimestamp; ///< Timestamp of Beam Gate Acceptance HLT created by the PTB | ||
| }; | ||
| } // end namespace | ||
| #endif // SRSBNDTIMINGINFO_H | ||
| ////////////////////////////////////////////////////////////////////////////// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.