Public Member Functions | Public Attributes | List of all members
dune::ColdataBlock Struct Reference

#include <FelixFormat.hh>

Public Member Functions

uint16_t channel (const uint8_t adc, const uint8_t ch) const
 
void set_channel (const uint8_t adc, const uint8_t ch, uint16_t new_val)
 
void printADCs () const
 

Public Attributes

ColdataHeader head
 
ColdataSegment segments [8]
 

Detailed Description

Definition at line 241 of file FelixFormat.hh.

Member Function Documentation

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

Definition at line 246 of file FelixFormat.hh.

246  {
247  // Each segment houses one half (four channels) of two subsequent ADCs.
248  return segments[(adc / 2) * 2 + ch / 4].channel(adc, ch);
249  }
uint16_t channel(const uint8_t adc, const uint8_t ch) const
Definition: FelixFormat.hh:246
int16_t adc
Definition: CRTFragment.hh:202
ColdataSegment segments[8]
Definition: FelixFormat.hh:244
void dune::ColdataBlock::printADCs ( ) const
inline

Definition at line 255 of file FelixFormat.hh.

255  {
256  std::cout << "\t\t0\t1\t2\t3\t4\t5\t6\t7\n";
257  for (int i = 0; i < 8; i++) {
258  std::cout << "Stream " << i << ":\t";
259  for (int j = 0; j < 8; j++) {
260  std::cout << std::hex << channel(i, j) << '\t';
261  }
262  std::cout << std::dec << '\n';
263  }
264  }
uint16_t channel(const uint8_t adc, const uint8_t ch) const
Definition: FelixFormat.hh:246
QTextStream & hex(QTextStream &s)
QTextStream & dec(QTextStream &s)
void dune::ColdataBlock::set_channel ( const uint8_t  adc,
const uint8_t  ch,
uint16_t  new_val 
)
inline

Definition at line 251 of file FelixFormat.hh.

251  {
252  segments[(adc / 2) * 2 + ch / 4].set_channel(adc, ch, new_val);
253  }
int16_t adc
Definition: CRTFragment.hh:202
ColdataSegment segments[8]
Definition: FelixFormat.hh:244
void set_channel(const uint8_t adc, const uint8_t ch, uint16_t new_val)
Definition: FelixFormat.hh:251

Member Data Documentation

ColdataHeader dune::ColdataBlock::head

Definition at line 242 of file FelixFormat.hh.

ColdataSegment dune::ColdataBlock::segments[8]

Definition at line 244 of file FelixFormat.hh.


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