LDMX Software
LDMXRoRHeader.h
1#pragma once
2#ifndef PACKING_LDMXRORHEADER_H
3#define PACKING_LDMXRORHEADER_H
4
5#include <cstdint>
6#include <unordered_map>
7#include <vector>
8
9#include "Packing/Utility/Reader.h"
10
11namespace packing {
12
23 public:
25 static const unsigned int SIZE = 16;
35 static const std::unordered_map<std::string, int> SUBSYSTEM_ID;
36
49 static const std::unordered_map<std::string, int> CONTRIBUTOR_ID;
50
63 static std::tuple<int, int> subsystem(const std::string& name);
64
68 uint8_t version() const { return version_; }
70 uint8_t subsystem() const { return subsystem_; }
72 uint8_t contributor() const { return contributor_; }
74 uint64_t timestamp() const { return timestamp_; }
75
76 private:
78 uint8_t version_;
80 uint8_t subsystem_;
82 uint8_t contributor_;
90 uint64_t timestamp_;
91};
92
93} // namespace packing
94
95#endif
the header that the LDMX DAQ Firmware block includes in the output data stream at the beginning of ea...
uint64_t timestamp_
timestamp of this Readout-Request (RoR)
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)
uint8_t version() const
version of LDMX data (should be zero)
uint8_t contributor_
ID number for contributor within subsystem (configured into firmware)
static const std::unordered_map< std::string, int > SUBSYSTEM_ID
The subsystem ID numbers organized by subsystem name.
uint64_t timestamp() const
get timestamp of this RoR
uint8_t version_
version of LDMX data (should be zero)
utility::Reader & read(utility::Reader &r)
read the next LDMX RoR header into memory
uint8_t subsystem_
ID number for subsystem originating data (compiled into firmware)
static const std::unordered_map< std::string, int > CONTRIBUTOR_ID
The contributor ID is a configurable parameter of the DAQ firmware.
static const unsigned int SIZE
size of this header in bytes
Reading a raw data file.
Definition Reader.h:20