|
LDMX Software
|
the header that the LDMX DAQ Firmware block includes in the output data stream at the beginning of each data frame More...
#include <LDMXRoRHeader.h>
Public Member Functions | |
| utility::Reader & | read (utility::Reader &r) |
| read the next LDMX RoR header into memory | |
| bool | valid () const |
| true if the header was parsed successfully (sentinel and reserved word matched) | |
| uint8_t | version () const |
| version of LDMX data (should be zero) | |
| uint8_t | subsystem () const |
| ID number for subsystem originating data (compiled into firmware) | |
| uint8_t | contributor () const |
| ID number for contributor within subsystem (configured into firmware) | |
| uint64_t | timestamp () const |
| get timestamp of this RoR | |
Static Public Member Functions | |
| static std::tuple< int, int > | subsystem (const std::string &name) |
| Get the (subsystem, contributor) pair for the input subsystem name. | |
| static std::string | getSubsystemName (uint8_t subsystem_id, uint8_t contributor_id) |
| Get the subsystem name from subsystem and contributor IDs. | |
Static Public Attributes | |
| static const unsigned int | SIZE = 16 |
| size of this header in bytes | |
| static const std::unordered_map< std::string, int > | SUBSYSTEM_ID |
| The subsystem ID numbers organized by subsystem name. | |
| static const std::unordered_map< std::string, int > | CONTRIBUTOR_ID |
| The contributor ID is a configurable parameter of the DAQ firmware. | |
Private Attributes | |
| bool | valid_ {false} |
| set to true only when all validity checks pass during read() | |
| uint8_t | version_ |
| version of LDMX data (should be zero) | |
| uint8_t | subsystem_ |
| ID number for subsystem originating data (compiled into firmware) | |
| uint8_t | contributor_ |
| ID number for contributor within subsystem (configured into firmware) | |
| uint64_t | timestamp_ |
| timestamp of this Readout-Request (RoR) | |
the header that the LDMX DAQ Firmware block includes in the output data stream at the beginning of each data frame
This header is immediately preceeded by a RogueFrameHeader for data frames. It is separate only becuase some frames written to the file (mainly, the configuration stream) do not include this header as well as the RogueFrameHeader.
Definition at line 22 of file LDMXRoRHeader.h.
|
inline |
ID number for contributor within subsystem (configured into firmware)
Definition at line 91 of file LDMXRoRHeader.h.
References contributor_.
Referenced by eventbuilder::EventBuilder::produce().
|
static |
Get the subsystem name from subsystem and contributor IDs.
Uses both the subsystem ID (compiled into firmware) and contributor ID (configured into firmware) to uniquely identify the subsystem. This is necessary because some subsystems share the same subsystem ID but have different contributor IDs (e.g., ecal and hcal both use subsystem ID 5 but have different contributor IDs).
| [in] | subsystem_id | the subsystem ID from the RoR header |
| [in] | contributor_id | the contributor ID from the RoR header |
Definition at line 27 of file LDMXRoRHeader.cxx.
References CONTRIBUTOR_ID, and SUBSYSTEM_ID.
Referenced by eventbuilder::EventBuilder::produce().
| utility::Reader & packing::LDMXRoRHeader::read | ( | utility::Reader & | r | ) |
read the next LDMX RoR header into memory
Definition at line 56 of file LDMXRoRHeader.cxx.
References contributor_, subsystem_, timestamp_, valid_, and version_.
Referenced by eventbuilder::EventBuilder::produce().
|
inline |
ID number for subsystem originating data (compiled into firmware)
Definition at line 89 of file LDMXRoRHeader.h.
References subsystem_.
Referenced by packing::SingleSubsystemUnpacker::configure().
|
static |
Get the (subsystem, contributor) pair for the input subsystem name.
| [in] | name | subsystem name ('tdaq','ts','tracker','hcal','ecal') |
Definition at line 13 of file LDMXRoRHeader.cxx.
References CONTRIBUTOR_ID, and SUBSYSTEM_ID.
Referenced by eventbuilder::EventBuilder::produce().
|
inline |
get timestamp of this RoR
Definition at line 93 of file LDMXRoRHeader.h.
References timestamp_.
Referenced by eventbuilder::EventBuilder::produce(), and packing::SingleSubsystemUnpacker::produce().
|
inline |
true if the header was parsed successfully (sentinel and reserved word matched)
Definition at line 85 of file LDMXRoRHeader.h.
References valid_.
|
inline |
version of LDMX data (should be zero)
Definition at line 87 of file LDMXRoRHeader.h.
References version_.
|
private |
ID number for contributor within subsystem (configured into firmware)
Definition at line 103 of file LDMXRoRHeader.h.
Referenced by contributor(), and read().
|
static |
The contributor ID is a configurable parameter of the DAQ firmware.
For the 2025 slice test at SLAC, there was only ever one contributor per subsystem and so there is just one integer per subsystem here. (-1 means that it was not set and can be ignored).
In the future, there will be more than one contributor for some subsystems.
The subsystem names are all lower case.
Definition at line 49 of file LDMXRoRHeader.h.
Referenced by getSubsystemName(), and subsystem().
|
static |
size of this header in bytes
Definition at line 25 of file LDMXRoRHeader.h.
Referenced by packing::SingleSubsystemUnpacker::produce().
|
private |
ID number for subsystem originating data (compiled into firmware)
Definition at line 101 of file LDMXRoRHeader.h.
Referenced by read(), and subsystem().
|
static |
The subsystem ID numbers organized by subsystem name.
These ID numbers are compiled into the DAQ firmware. Since the same firmware was used for both the ECal and HCal, they both ended up having the same subsystem ID (5).
The subsystem names are all lower case.
Definition at line 35 of file LDMXRoRHeader.h.
Referenced by getSubsystemName(), and subsystem().
|
private |
timestamp of this Readout-Request (RoR)
It is some combination of pulseID and bunchCount, but I'm unsure on how to decompose those at this time.
Definition at line 111 of file LDMXRoRHeader.h.
Referenced by read(), and timestamp().
|
private |
set to true only when all validity checks pass during read()
Definition at line 97 of file LDMXRoRHeader.h.
|
private |
version of LDMX data (should be zero)
Definition at line 99 of file LDMXRoRHeader.h.