Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 23 additions & 10 deletions sbnanaobj/StandardRecord/SRSBNDFrameShiftInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,31 @@ namespace caf
* Each shift is in [ns]
*
* For more information, see
* [SBN DocDB 43090](https://sbn-docdb.fnal.gov/cgi-bin/sso/ShowDocument?docid=43090).
* legacy: [SBN DocDB 43090](https://sbn-docdb.fnal.gov/cgi-bin/sso/ShowDocument?docid=43090).
* new: ???
*/

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
struct SRSBNDFrameShiftInfo {

static constexpr uint16_t InvalidType = std::numeric_limits<uint16_t>::max();
static constexpr uint16_t InvalidChannel = std::numeric_limits<uint16_t>::max();
static constexpr uint64_t InvalidTimestamp = std::numeric_limits<uint64_t>::max();

uint64_t frameCrtt1 = InvalidTimestamp; ///< Frame for CRT T1 signal [ns]
uint16_t timingTypeCrtt1 = InvalidType; ///< Types of CRT T1 frame
uint16_t timingChannelCrtt1 = InvalidChannel; ///< Channel of CRT T1 frame

uint64_t frameBeamGate = InvalidTimestamp; ///< Frame for Beam Gate [ns]
uint16_t timingTypeBeamGate = InvalidType; ///< Types of Beam Gate frame
uint16_t timingChannelBeamGate = InvalidChannel; ///< Channel of Beam Gate frame

uint64_t frameEtrig = InvalidTimestamp; ///< Frame for ETRIG [ns]
uint16_t timingTypeEtrig = InvalidType; ///< Types of ETRIG frame
uint16_t timingChannelEtrig = InvalidChannel; ///< Channel of ETRIG frame

uint64_t frameDefault = InvalidTimestamp; ///< Default frame depending on the stream type [ns]
uint16_t timingTypeDefault = InvalidType; ///< Types of default frame
uint16_t timingChannelDefault = InvalidChannel; ///< Channel of default frame
};
} // end namespace
#endif // SRSBNDFRAMESHIFTINFO_H
Expand Down
20 changes: 10 additions & 10 deletions sbnanaobj/StandardRecord/SRSBNDTimingInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ namespace caf

struct SRSBNDTimingInfo
{
static constexpr uint64_t NoTimestamp = std::numeric_limits<uint32_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
static constexpr uint64_t InvalidTimestamp = std::numeric_limits<uint64_t>::max();

uint64_t rawDAQHeaderTimestamp = InvalidTimestamp; ///< Timestamp when the event is built by the event builder at DAQ-level
uint64_t tdcCrtt1 = InvalidTimestamp; ///< Timestamp of BNB stream CRT T1 Reset recorded by the SPEC-TDC
uint64_t tdcBes = InvalidTimestamp; ///< Timestamp of BES signal sent by MFTU recorded by the SPEC-TDC
uint64_t tdcRwm = InvalidTimestamp; ///< Timestamp of RWM signal recorded by the SPEC-TDC
uint64_t tdcEtrig = InvalidTimestamp; ///< Timestamp of Event Trigger (ETRIG) sent by the PTB recorded by the SPEC-TDC
uint64_t hltCrtt1 = InvalidTimestamp; ///< Timestamp of BNB and Offbeam stream CRT T1 Reset High Level Trigger (HLT) created by the PTB
uint64_t hltEtrig = InvalidTimestamp; ///< Timestamp of ETRIG HLT created by the PTB
uint64_t hltBeamGate = InvalidTimestamp; ///< Timestamp of Beam Gate Acceptance HLT created by the PTB
};
} // end namespace
#endif // SRSBNDTIMINGINFO_H
Expand Down
3 changes: 2 additions & 1 deletion sbnanaobj/StandardRecord/classes_def.xml
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,8 @@
<class name="std::vector<caf::SRCRTSpacePoint>" />
<class name="std::vector<caf::SRSBNDCRTTrack>" />

<class name="caf::SRSBNDFrameShiftInfo" ClassVersion="10">
<class name="caf::SRSBNDFrameShiftInfo" ClassVersion="11">
<version ClassVersion="11" checksum="2340993735"/>
<version ClassVersion="10" checksum="2564414428"/>
</class>
<class name="caf::SRSBNDTimingInfo" ClassVersion="10">
Expand Down