3 #ifndef artdaq_dune_Overlays_Frame14Fragment_hh 4 #define artdaq_dune_Overlays_Frame14Fragment_hh 7 #include "artdaq-core/Data/Fragment.hh" 44 typedef std::vector<uint16_t>
adc_v;
47 virtual uint8_t
link_mask(
const unsigned& frame_ID = 0)
const = 0;
48 virtual uint8_t
femb_valid(
const unsigned& frame_ID = 0)
const = 0;
49 virtual uint8_t
fiber_no(
const unsigned& frame_ID = 0)
const = 0;
50 virtual uint8_t
slot_no(
const unsigned& frame_ID = 0)
const = 0;
51 virtual uint8_t
crate_no(
const unsigned& frame_ID = 0)
const = 0;
52 virtual uint8_t
frame_version(
const unsigned& frame_ID = 0)
const = 0;
54 virtual uint32_t
wib_data(
const unsigned& frame_ID = 0)
const = 0;
55 virtual uint64_t
timestamp(
const unsigned& frame_ID = 0)
const = 0;
56 virtual uint32_t
crc20(
const unsigned& frame_ID = 0)
const = 0;
57 virtual uint32_t
flex12(
const unsigned& frame_ID = 0)
const = 0;
58 virtual uint32_t
flex24(
const unsigned& frame_ID = 0)
const = 0;
61 virtual adc_t
get_ADC(
const unsigned& frame_ID,
const uint8_t block_ID,
62 const uint8_t channel_ID)
const = 0;
63 virtual adc_t
get_ADC(
const unsigned& frame_ID,
64 const uint8_t channel_ID)
const = 0;
68 const uint8_t channel_ID)
const = 0;
72 virtual std::map<uint8_t, adc_v>
get_all_ADCs()
const = 0;
96 uint8_t
link_mask(
const unsigned& frame_ID = 0)
const {
97 return frame_(frame_ID)->link_mask;
100 return frame_(frame_ID)->femb_valid;
102 uint8_t
fiber_no(
const unsigned& frame_ID = 0)
const {
103 return frame_(frame_ID)->fiber_num;
105 uint8_t
slot_no(
const unsigned& frame_ID = 0)
const {
106 return frame_(frame_ID)->slot_num;
108 uint8_t
crate_no(
const unsigned& frame_ID = 0)
const {
109 return frame_(frame_ID)->crate_num;
112 return frame_(frame_ID)->frame_version;
115 uint32_t
wib_data(
const unsigned& frame_ID = 0)
const {
116 return frame_(frame_ID)->wib_data;
118 uint64_t
timestamp(
const unsigned& frame_ID = 0)
const {
119 return frame_(frame_ID)->timestamp;
121 uint32_t
crc20(
const unsigned& frame_ID = 0)
const {
122 return frame_(frame_ID)->crc20;
124 uint32_t
flex12(
const unsigned& frame_ID = 0)
const {
125 return frame_(frame_ID)->flex12;
127 uint32_t
flex24(
const unsigned& frame_ID = 0)
const {
128 return frame_(frame_ID)->flex24;
137 const uint8_t channel_ID)
const {
140 }
else if (block_ID == 1) {
147 adc_t get_ADC(
const unsigned& frame_ID,
const uint8_t channel_ID)
const {
148 return get_ADC(frame_ID,channel_ID/128,channel_ID%128);
153 const uint8_t channel_ID)
const {
156 output[i] =
get_ADC(i, block_ID, channel_ID);
163 output[i] =
get_ADC(i, channel_ID);
169 std::map<uint8_t, adc_v>
output;
170 for (
int i = 0; i < 256; i++)
182 frame14::frame14
const*
frame_(
const unsigned& frame_num = 0)
const {
adc_t get_ADC(const unsigned &frame_ID, const uint8_t block_ID, const uint8_t channel_ID) const
Frame14FragmentUnordered(artdaq::Fragment const &fragment)
uint8_t slot_no(const unsigned &frame_ID=0) const
uint8_t fiber_no(const unsigned &frame_ID=0) const
std::map< uint8_t, adc_v > get_all_ADCs() const
uint8_t femb_valid(const unsigned &frame_ID=0) const
uint32_t wib_data(const unsigned &frame_ID=0) const
size_t total_frames() const
adc_t get_ADC(const unsigned &frame_ID, const uint8_t channel_ID) const
uint16_t unpack14(const uint32_t *packed, size_t i)
virtual uint8_t slot_no(const unsigned &frame_ID=0) const =0
virtual std::map< uint8_t, adc_v > get_all_ADCs() const =0
virtual adc_t get_ADC(const unsigned &frame_ID, const uint8_t block_ID, const uint8_t channel_ID) const =0
virtual adc_v get_ADCs_by_channel(const uint8_t block_ID, const uint8_t channel_ID) const =0
uint32_t flex24(const unsigned &frame_ID=0) const
adc_v get_ADCs_by_channel(const uint8_t channel_ID) const
uint64_t timestamp(const unsigned &frame_ID=0) const
virtual uint32_t wib_data(const unsigned &frame_ID=0) const =0
Frame14Fragment(const artdaq::Fragment &fragment)
virtual size_t total_frames() const =0
const void * artdaq_Fragment_
virtual uint32_t flex24(const unsigned &frame_ID=0) const =0
virtual uint8_t link_mask(const unsigned &frame_ID=0) const =0
uint32_t flex12(const unsigned &frame_ID=0) const
virtual uint8_t femb_valid(const unsigned &frame_ID=0) const =0
virtual ~Frame14Fragment()
uint8_t frame_version(const unsigned &frame_ID=0) const
uint32_t crc20(const unsigned &frame_ID=0) const
virtual uint8_t fiber_no(const unsigned &frame_ID=0) const =0
const Frame14Fragment * ParseFrame14Fragment(const artdaq::Fragment &fragment)
virtual uint64_t timestamp(const unsigned &frame_ID=0) const =0
virtual uint32_t flex12(const unsigned &frame_ID=0) const =0
uint8_t crate_no(const unsigned &frame_ID=0) const
frame14::frame14 const * frame_(const unsigned &frame_num=0) const
virtual uint8_t frame_version(const unsigned &frame_ID=0) const =0
std::vector< uint16_t > adc_v
adc_v get_ADCs_by_channel(const uint8_t block_ID, const uint8_t channel_ID) const
virtual uint32_t crc20(const unsigned &frame_ID=0) const =0
uint8_t link_mask(const unsigned &frame_ID=0) const
virtual uint8_t crate_no(const unsigned &frame_ID=0) const =0