Public Member Functions | Static Public Attributes | Private Attributes | List of all members
dune::FelixFrame Class Reference

#include <FelixFormat.hh>

Public Member Functions

uint8_t sof () const
 
uint8_t version () const
 
uint8_t fiber_no () const
 
uint8_t crate_no () const
 
uint8_t slot_no () const
 
uint8_t mm () const
 
uint8_t oos () const
 
uint16_t wib_errors () const
 
uint64_t timestamp () const
 
uint16_t wib_counter () const
 
uint8_t z () const
 
void set_sof (const uint8_t new_sof)
 
void set_version (const uint8_t new_version)
 
void set_fiber_no (const uint8_t new_fiber_no)
 
void set_crate_no (const uint8_t new_crate_no)
 
void set_slot_no (const uint8_t new_slot_no)
 
void set_mm (const uint8_t new_mm)
 
void set_oos (const uint8_t new_oos)
 
void set_wib_errors (const uint16_t new_wib_errors)
 
void set_timestamp (uint64_t new_timestamp)
 
void set_wib_counter (uint16_t new_wib_counter)
 
void set_z (uint8_t new_z)
 
uint8_t s1_error (const uint8_t block_num) const
 
uint8_t s2_error (const uint8_t block_num) const
 
uint16_t checksum_a (const uint8_t block_num) const
 
uint16_t checksum_b (const uint8_t block_num) const
 
uint16_t coldata_convert_count (const uint8_t block_num) const
 
uint16_t error_register (const uint8_t block_num) const
 
uint8_t hdr (const uint8_t block_num, const uint8_t i) const
 
void set_s1_error (const uint8_t block_num, const uint8_t new_s1_error)
 
void set_s2_error (const uint8_t block_num, const uint8_t new_s2_error)
 
void set_checksum_a (const uint8_t block_num, const uint16_t new_checksum_a)
 
void set_checksum_b (const uint8_t block_num, const uint16_t new_checksum_b)
 
void set_coldata_convert_count (const uint8_t block_num, const uint16_t new_coldata_convert_count)
 
void set_error_register (const uint8_t block_num, const uint16_t new_error_register)
 
void set_hdr (const uint8_t block_num, const uint8_t i, const uint8_t new_hdr)
 
uint16_t channel (const uint8_t block_num, const uint8_t adc, const uint8_t ch) const
 
uint16_t channel (const uint8_t block_num, const uint8_t ch) const
 
uint16_t channel (const uint8_t ch) const
 
void set_channel (const uint8_t block_num, const uint8_t adc, const uint8_t ch, const uint16_t new_val)
 
void set_channel (const uint8_t block_num, const uint8_t ch, const uint16_t new_val)
 
void set_channel (const uint8_t ch, const uint16_t new_val)
 
const WIBHeaderwib_header () const
 
const ColdataHeadercoldata_header (const unsigned &block=0) const
 
void print () const
 

Static Public Attributes

static constexpr size_t num_frame_hdr_words = 4
 
static constexpr size_t num_COLDATA_hdr_words = 4
 
static constexpr size_t num_frame_words = 116
 
static constexpr size_t num_frame_bytes = num_frame_words * sizeof(word_t)
 
static constexpr size_t num_COLDATA_words = 28
 
static constexpr size_t num_block_per_frame = 4
 
static constexpr size_t num_ch_per_frame = 256
 
static constexpr size_t num_ch_per_block = 64
 
static constexpr size_t num_seg_per_block = 8
 
static constexpr size_t num_ch_per_seg = 8
 

Private Attributes

WIBHeader head
 
ColdataBlock blocks [4]
 

Detailed Description

Definition at line 270 of file FelixFormat.hh.

Member Function Documentation

uint16_t dune::FelixFrame::channel ( const uint8_t  block_num,
const uint8_t  adc,
const uint8_t  ch 
) const
inline

Definition at line 387 of file FelixFormat.hh.

387  {
388  return blocks[block_num].channel(adc, ch);
389  }
uint16_t channel(const uint8_t adc, const uint8_t ch) const
Definition: FelixFormat.hh:246
int16_t adc
Definition: CRTFragment.hh:202
ColdataBlock blocks[4]
Definition: FelixFormat.hh:277
uint16_t dune::FelixFrame::channel ( const uint8_t  block_num,
const uint8_t  ch 
) const
inline

Definition at line 390 of file FelixFormat.hh.

390  {
391  return channel(block_num, ch / 8, ch % 8);
392  }
uint16_t channel(const uint8_t block_num, const uint8_t adc, const uint8_t ch) const
Definition: FelixFormat.hh:387
uint16_t dune::FelixFrame::channel ( const uint8_t  ch) const
inline

Definition at line 393 of file FelixFormat.hh.

393 { return channel(ch / 64, ch % 64); }
uint16_t channel(const uint8_t block_num, const uint8_t adc, const uint8_t ch) const
Definition: FelixFormat.hh:387
uint16_t dune::FelixFrame::checksum_a ( const uint8_t  block_num) const
inline

Definition at line 349 of file FelixFormat.hh.

349  {
350  return blocks[block_num].head.checksum_a();
351  }
uint16_t checksum_a() const
Definition: FelixFormat.hh:95
ColdataBlock blocks[4]
Definition: FelixFormat.hh:277
ColdataHeader head
Definition: FelixFormat.hh:242
uint16_t dune::FelixFrame::checksum_b ( const uint8_t  block_num) const
inline

Definition at line 352 of file FelixFormat.hh.

352  {
353  return blocks[block_num].head.checksum_b();
354  }
ColdataBlock blocks[4]
Definition: FelixFormat.hh:277
ColdataHeader head
Definition: FelixFormat.hh:242
uint16_t checksum_b() const
Definition: FelixFormat.hh:98
uint16_t dune::FelixFrame::coldata_convert_count ( const uint8_t  block_num) const
inline

Definition at line 355 of file FelixFormat.hh.

355  {
356  return blocks[block_num].head.coldata_convert_count;
357  }
word_t coldata_convert_count
Definition: FelixFormat.hh:90
ColdataBlock blocks[4]
Definition: FelixFormat.hh:277
ColdataHeader head
Definition: FelixFormat.hh:242
const ColdataHeader* dune::FelixFrame::coldata_header ( const unsigned &  block = 0) const
inline

Definition at line 408 of file FelixFormat.hh.

408  {
409  return &blocks[block%4].head;
410  }
ColdataBlock blocks[4]
Definition: FelixFormat.hh:277
ColdataHeader head
Definition: FelixFormat.hh:242
uint8_t dune::FelixFrame::crate_no ( ) const
inline

Definition at line 312 of file FelixFormat.hh.

312 { return head.crate_no; }
uint16_t dune::FelixFrame::error_register ( const uint8_t  block_num) const
inline

Definition at line 358 of file FelixFormat.hh.

358  {
359  return blocks[block_num].head.error_register;
360  }
ColdataBlock blocks[4]
Definition: FelixFormat.hh:277
ColdataHeader head
Definition: FelixFormat.hh:242
uint8_t dune::FelixFrame::fiber_no ( ) const
inline

Definition at line 311 of file FelixFormat.hh.

311 { return head.fiber_no; }
uint8_t dune::FelixFrame::hdr ( const uint8_t  block_num,
const uint8_t  i 
) const
inline

Definition at line 361 of file FelixFormat.hh.

361 { return blocks[block_num].head.hdr(i); }
uint8_t hdr(const uint8_t i) const
Definition: FelixFormat.hh:101
ColdataBlock blocks[4]
Definition: FelixFormat.hh:277
ColdataHeader head
Definition: FelixFormat.hh:242
uint8_t dune::FelixFrame::mm ( ) const
inline

Definition at line 314 of file FelixFormat.hh.

314 { return head.mm; }
uint8_t dune::FelixFrame::oos ( ) const
inline

Definition at line 315 of file FelixFormat.hh.

315 { return head.oos; }
void dune::FelixFrame::print ( ) const
inline

Definition at line 413 of file FelixFormat.hh.

413  {
414  std::cout << "Printing frame:\n";
415  head.print();
416  for(auto b: blocks) {
417  b.head.print();
418  b.printADCs();
419  }
420  }
void print() const
Definition: FelixFormat.hh:54
static bool * b
Definition: config.cpp:1043
ColdataBlock blocks[4]
Definition: FelixFormat.hh:277
uint8_t dune::FelixFrame::s1_error ( const uint8_t  block_num) const
inline

Definition at line 343 of file FelixFormat.hh.

343  {
344  return blocks[block_num].head.s1_error;
345  }
ColdataBlock blocks[4]
Definition: FelixFormat.hh:277
ColdataHeader head
Definition: FelixFormat.hh:242
uint8_t dune::FelixFrame::s2_error ( const uint8_t  block_num) const
inline

Definition at line 346 of file FelixFormat.hh.

346  {
347  return blocks[block_num].head.s2_error;
348  }
ColdataBlock blocks[4]
Definition: FelixFormat.hh:277
ColdataHeader head
Definition: FelixFormat.hh:242
void dune::FelixFrame::set_channel ( const uint8_t  block_num,
const uint8_t  adc,
const uint8_t  ch,
const uint16_t  new_val 
)
inline

Definition at line 395 of file FelixFormat.hh.

396  {
397  blocks[block_num].set_channel(adc, ch, new_val);
398  }
int16_t adc
Definition: CRTFragment.hh:202
void set_channel(const uint8_t adc, const uint8_t ch, uint16_t new_val)
Definition: FelixFormat.hh:251
ColdataBlock blocks[4]
Definition: FelixFormat.hh:277
void dune::FelixFrame::set_channel ( const uint8_t  block_num,
const uint8_t  ch,
const uint16_t  new_val 
)
inline

Definition at line 399 of file FelixFormat.hh.

399  {
400  set_channel(block_num, ch / 8, ch % 8, new_val);
401  }
void set_channel(const uint8_t block_num, const uint8_t adc, const uint8_t ch, const uint16_t new_val)
Definition: FelixFormat.hh:395
void dune::FelixFrame::set_channel ( const uint8_t  ch,
const uint16_t  new_val 
)
inline

Definition at line 402 of file FelixFormat.hh.

402  {
403  set_channel(ch / 64, ch % 64, new_val);
404  }
void set_channel(const uint8_t block_num, const uint8_t adc, const uint8_t ch, const uint16_t new_val)
Definition: FelixFormat.hh:395
void dune::FelixFrame::set_checksum_a ( const uint8_t  block_num,
const uint16_t  new_checksum_a 
)
inline

Definition at line 369 of file FelixFormat.hh.

369  {
370  blocks[block_num].head.set_checksum_a(new_checksum_a);
371  }
void set_checksum_a(const uint16_t new_checksum_a)
Definition: FelixFormat.hh:115
ColdataBlock blocks[4]
Definition: FelixFormat.hh:277
ColdataHeader head
Definition: FelixFormat.hh:242
void dune::FelixFrame::set_checksum_b ( const uint8_t  block_num,
const uint16_t  new_checksum_b 
)
inline

Definition at line 372 of file FelixFormat.hh.

372  {
373  blocks[block_num].head.set_checksum_b(new_checksum_b);
374  }
void set_checksum_b(const uint16_t new_checksum_b)
Definition: FelixFormat.hh:119
ColdataBlock blocks[4]
Definition: FelixFormat.hh:277
ColdataHeader head
Definition: FelixFormat.hh:242
void dune::FelixFrame::set_coldata_convert_count ( const uint8_t  block_num,
const uint16_t  new_coldata_convert_count 
)
inline

Definition at line 375 of file FelixFormat.hh.

376  {
377  blocks[block_num].head.coldata_convert_count = new_coldata_convert_count;
378  }
word_t coldata_convert_count
Definition: FelixFormat.hh:90
ColdataBlock blocks[4]
Definition: FelixFormat.hh:277
ColdataHeader head
Definition: FelixFormat.hh:242
void dune::FelixFrame::set_crate_no ( const uint8_t  new_crate_no)
inline

Definition at line 329 of file FelixFormat.hh.

329 { head.crate_no = new_crate_no; }
void dune::FelixFrame::set_error_register ( const uint8_t  block_num,
const uint16_t  new_error_register 
)
inline

Definition at line 379 of file FelixFormat.hh.

379  {
380  blocks[block_num].head.error_register = new_error_register;
381  }
ColdataBlock blocks[4]
Definition: FelixFormat.hh:277
ColdataHeader head
Definition: FelixFormat.hh:242
void dune::FelixFrame::set_fiber_no ( const uint8_t  new_fiber_no)
inline

Definition at line 328 of file FelixFormat.hh.

328 { head.fiber_no = new_fiber_no; }
void dune::FelixFrame::set_hdr ( const uint8_t  block_num,
const uint8_t  i,
const uint8_t  new_hdr 
)
inline

Definition at line 382 of file FelixFormat.hh.

382  {
383  blocks[block_num].head.set_hdr(i, new_hdr);
384  }
void set_hdr(const uint8_t i, const uint8_t new_hdr)
Definition: FelixFormat.hh:123
ColdataBlock blocks[4]
Definition: FelixFormat.hh:277
ColdataHeader head
Definition: FelixFormat.hh:242
void dune::FelixFrame::set_mm ( const uint8_t  new_mm)
inline

Definition at line 331 of file FelixFormat.hh.

331 { head.mm = new_mm; }
void dune::FelixFrame::set_oos ( const uint8_t  new_oos)
inline

Definition at line 332 of file FelixFormat.hh.

332 { head.oos = new_oos; }
void dune::FelixFrame::set_s1_error ( const uint8_t  block_num,
const uint8_t  new_s1_error 
)
inline

Definition at line 363 of file FelixFormat.hh.

363  {
364  blocks[block_num].head.s1_error = new_s1_error;
365  }
ColdataBlock blocks[4]
Definition: FelixFormat.hh:277
ColdataHeader head
Definition: FelixFormat.hh:242
void dune::FelixFrame::set_s2_error ( const uint8_t  block_num,
const uint8_t  new_s2_error 
)
inline

Definition at line 366 of file FelixFormat.hh.

366  {
367  blocks[block_num].head.s2_error = new_s2_error;
368  }
ColdataBlock blocks[4]
Definition: FelixFormat.hh:277
ColdataHeader head
Definition: FelixFormat.hh:242
void dune::FelixFrame::set_slot_no ( const uint8_t  new_slot_no)
inline

Definition at line 330 of file FelixFormat.hh.

330 { head.slot_no = new_slot_no; }
void dune::FelixFrame::set_sof ( const uint8_t  new_sof)
inline

Definition at line 325 of file FelixFormat.hh.

325 { head.sof = new_sof; }
void dune::FelixFrame::set_timestamp ( uint64_t  new_timestamp)
inline

Definition at line 336 of file FelixFormat.hh.

336 { head.set_timestamp(new_timestamp); }
void set_timestamp(const uint64_t new_timestamp)
Definition: FelixFormat.hh:40
void dune::FelixFrame::set_version ( const uint8_t  new_version)
inline

Definition at line 327 of file FelixFormat.hh.

327 { head.version = new_version; }
void dune::FelixFrame::set_wib_counter ( uint16_t  new_wib_counter)
inline

Definition at line 337 of file FelixFormat.hh.

337  {
338  head.wib_counter_1 = new_wib_counter;
339  }
word_t wib_counter_1
Definition: FelixFormat.hh:29
void dune::FelixFrame::set_wib_errors ( const uint16_t  new_wib_errors)
inline

Definition at line 333 of file FelixFormat.hh.

333  {
334  head.wib_errors = new_wib_errors;
335  }
void dune::FelixFrame::set_z ( uint8_t  new_z)
inline

Definition at line 340 of file FelixFormat.hh.

340 { head.z = new_z; }
uint8_t dune::FelixFrame::slot_no ( ) const
inline

Definition at line 313 of file FelixFormat.hh.

313 { return head.slot_no; }
uint8_t dune::FelixFrame::sof ( ) const
inline

Definition at line 308 of file FelixFormat.hh.

308 { return head.sof; }
uint64_t dune::FelixFrame::timestamp ( ) const
inline

Definition at line 317 of file FelixFormat.hh.

317 { return head.timestamp(); }
uint64_t timestamp() const
Definition: FelixFormat.hh:31
uint8_t dune::FelixFrame::version ( ) const
inline

Definition at line 310 of file FelixFormat.hh.

310 { return head.version; }
uint16_t dune::FelixFrame::wib_counter ( ) const
inline

Definition at line 318 of file FelixFormat.hh.

318 { return head.wib_counter(); }
uint16_t wib_counter() const
Definition: FelixFormat.hh:38
uint16_t dune::FelixFrame::wib_errors ( ) const
inline

Definition at line 316 of file FelixFormat.hh.

316 { return head.wib_errors; }
const WIBHeader* dune::FelixFrame::wib_header ( ) const
inline

Definition at line 407 of file FelixFormat.hh.

407 { return &head; }
uint8_t dune::FelixFrame::z ( ) const
inline

Definition at line 319 of file FelixFormat.hh.

319 { return head.z; }

Member Data Documentation

ColdataBlock dune::FelixFrame::blocks[4]
private

Definition at line 277 of file FelixFormat.hh.

WIBHeader dune::FelixFrame::head
private

Definition at line 276 of file FelixFormat.hh.

constexpr size_t dune::FelixFrame::num_block_per_frame = 4
static

Definition at line 297 of file FelixFormat.hh.

constexpr size_t dune::FelixFrame::num_ch_per_block = 64
static

Definition at line 299 of file FelixFormat.hh.

constexpr size_t dune::FelixFrame::num_ch_per_frame = 256
static

Definition at line 298 of file FelixFormat.hh.

constexpr size_t dune::FelixFrame::num_ch_per_seg = 8
static

Definition at line 301 of file FelixFormat.hh.

constexpr size_t dune::FelixFrame::num_COLDATA_hdr_words = 4
static

Definition at line 286 of file FelixFormat.hh.

constexpr size_t dune::FelixFrame::num_COLDATA_words = 28
static

Definition at line 295 of file FelixFormat.hh.

constexpr size_t dune::FelixFrame::num_frame_bytes = num_frame_words * sizeof(word_t)
static

Definition at line 294 of file FelixFormat.hh.

constexpr size_t dune::FelixFrame::num_frame_hdr_words = 4
static

Definition at line 285 of file FelixFormat.hh.

constexpr size_t dune::FelixFrame::num_frame_words = 116
static

Definition at line 292 of file FelixFormat.hh.

constexpr size_t dune::FelixFrame::num_seg_per_block = 8
static

Definition at line 300 of file FelixFormat.hh.


The documentation for this class was generated from the following file: