Public Member Functions | Public Attributes | List of all members
dune::ColdataSegment 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, const uint16_t new_val)
 

Public Attributes

word_t adc0ch0_1: 8
 
word_t adc1ch0_1: 8
 
word_t adc0ch0_2: 4
 
word_t adc0ch1_1: 4
 
word_t adc1ch0_2: 4
 
word_t adc1ch1_1: 4
 
word_t adc0ch1_2: 8
 
word_t adc1ch1_2: 8
 
word_t adc0ch2_1: 8
 
word_t adc1ch2_1: 8
 
word_t adc0ch2_2: 4
 
word_t adc0ch3_1: 4
 
word_t adc1ch2_2: 4
 
word_t adc1ch3_1: 4
 
word_t adc0ch3_2: 8
 
word_t adc1ch3_2: 8
 

Detailed Description

Definition at line 190 of file FelixFormat.hh.

Member Function Documentation

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

Definition at line 199 of file FelixFormat.hh.

199  {
200  if (adc % 2 == 0) {
201  switch (ch % 4) {
202  case 0: return adc0ch0_1 | adc0ch0_2 << 8;
203  case 1: return adc0ch1_1 | adc0ch1_2 << 4;
204  case 2: return adc0ch2_1 | adc0ch2_2 << 8;
205  case 3: return adc0ch3_1 | adc0ch3_2 << 4;
206  }
207  } else if (adc % 2 == 1) {
208  switch (ch % 4) {
209  case 0: return adc1ch0_1 | adc1ch0_2 << 8;
210  case 1: return adc1ch1_1 | adc1ch1_2 << 4;
211  case 2: return adc1ch2_1 | adc1ch2_2 << 8;
212  case 3: return adc1ch3_1 | adc1ch3_2 << 4;
213  }
214  }
215  return 0;
216  }
int16_t adc
Definition: CRTFragment.hh:202
void dune::ColdataSegment::set_channel ( const uint8_t  adc,
const uint8_t  ch,
const uint16_t  new_val 
)
inline

Definition at line 218 of file FelixFormat.hh.

219  {
220  if (adc % 2 == 0) {
221  switch (ch % 4) {
222  case 0: adc0ch0_1 = new_val; adc0ch0_2 = new_val >> 8; break;
223  case 1: adc0ch1_1 = new_val; adc0ch1_2 = new_val >> 4; break;
224  case 2: adc0ch2_1 = new_val; adc0ch2_2 = new_val >> 8; break;
225  case 3: adc0ch3_1 = new_val; adc0ch3_2 = new_val >> 4; break;
226  }
227  } else if (adc % 2 == 1) {
228  switch (ch % 4) {
229  case 0: adc1ch0_1 = new_val; adc1ch0_2 = new_val >> 8; break;
230  case 1: adc1ch1_1 = new_val; adc1ch1_2 = new_val >> 4; break;
231  case 2: adc1ch2_1 = new_val; adc1ch2_2 = new_val >> 8; break;
232  case 3: adc1ch3_1 = new_val; adc1ch3_2 = new_val >> 4; break;
233  }
234  }
235  }
int16_t adc
Definition: CRTFragment.hh:202

Member Data Documentation

word_t dune::ColdataSegment::adc0ch0_1

Definition at line 193 of file FelixFormat.hh.

word_t dune::ColdataSegment::adc0ch0_2

Definition at line 193 of file FelixFormat.hh.

word_t dune::ColdataSegment::adc0ch1_1

Definition at line 193 of file FelixFormat.hh.

word_t dune::ColdataSegment::adc0ch1_2

Definition at line 195 of file FelixFormat.hh.

word_t dune::ColdataSegment::adc0ch2_1

Definition at line 195 of file FelixFormat.hh.

word_t dune::ColdataSegment::adc0ch2_2

Definition at line 196 of file FelixFormat.hh.

word_t dune::ColdataSegment::adc0ch3_1

Definition at line 196 of file FelixFormat.hh.

word_t dune::ColdataSegment::adc0ch3_2

Definition at line 196 of file FelixFormat.hh.

word_t dune::ColdataSegment::adc1ch0_1

Definition at line 193 of file FelixFormat.hh.

word_t dune::ColdataSegment::adc1ch0_2

Definition at line 193 of file FelixFormat.hh.

word_t dune::ColdataSegment::adc1ch1_1

Definition at line 193 of file FelixFormat.hh.

word_t dune::ColdataSegment::adc1ch1_2

Definition at line 195 of file FelixFormat.hh.

word_t dune::ColdataSegment::adc1ch2_1

Definition at line 195 of file FelixFormat.hh.

word_t dune::ColdataSegment::adc1ch2_2

Definition at line 196 of file FelixFormat.hh.

word_t dune::ColdataSegment::adc1ch3_1

Definition at line 196 of file FelixFormat.hh.

word_t dune::ColdataSegment::adc1ch3_2

Definition at line 196 of file FelixFormat.hh.


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