LDMX Software
RogueFrameHeader.h
1#pragma once
2#ifndef PACKING_ROGUEFRAMEHEADER_H
3#define PACKING_ROGUEFRAMEHEADER_H
4
5#include <cstdint>
6#include <vector>
7
8#include "Packing/Utility/Reader.h"
9
10namespace packing {
11
17 public:
21 int channel() const { return channel_; }
23 unsigned int size() const { return size_; }
25 uint16_t flags() const { return flags_; }
27 uint8_t error() const { return error_; }
29 uint8_t trailer() const { return trailer_; }
31 bool probablyYaml() const { return trailer_ == 0x0a; }
32
33 private:
42 uint32_t size_;
44 uint16_t flags_;
46 uint8_t error_;
48 uint8_t channel_;
58 uint8_t trailer_;
59};
60
61} // namespace packing
62
63#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