LDMX Software
RogueFrameHeader.h
1#pragma once
2#ifndef PACKING_ROGUEFRAMEHEADER_H
3#define PACKING_ROGUEFRAMEHEADER_H
4
5#include <cstdint>
6
7#include "Packing/Utility/Reader.h"
8
9namespace packing {
10
16 public:
20 int channel() const { return channel_; }
22 unsigned int size() const { return size_; }
24 uint16_t flags() const { return flags_; }
26 uint8_t error() const { return error_; }
28 uint8_t trailer() const { return trailer_; }
30 bool probablyYaml() const { return trailer_ == 0x0a; }
31
32 private:
41 uint32_t size_;
43 uint16_t flags_;
45 uint8_t error_;
47 uint8_t channel_;
57 uint8_t trailer_;
58};
59
60} // namespace packing
61
62#endif
the header that the Rogue StreamWriter puts includes at the beginning of each frame.
uint16_t flags() const
get the flags included in the header
unsigned int size() const
get the size of the frame not including this header
uint32_t size_
size of frame written by StreamWriter
uint8_t error() const
get specifc error flags included in the header
bool probablyYaml() const
check if this frame is probably a yaml dump
uint16_t flags_
extra flags written by StreamWriter
uint8_t channel_
StreamWriter channel.
uint8_t trailer() const
get the trailer byte for checking
uint8_t error_
error flags written by StreamWriter
int channel() const
get the channel this data was written to
uint8_t trailer_
last byte stored in frame
utility::Reader & read(utility::Reader &r)
read the next rogue frame header into memory
Reading a raw data file.
Definition Reader.h:20