Public Member Functions | Protected Member Functions | List of all members
dune::FelixFragmentUnordered Class Reference

#include <FelixFragment.hh>

Inheritance diagram for dune::FelixFragmentUnordered:
dune::FelixFragmentBase

Public Member Functions

uint8_t sof (const unsigned &frame_ID=0) const
 
uint8_t version (const unsigned &frame_ID=0) const
 
uint8_t fiber_no (const unsigned &frame_ID=0) const
 
uint8_t slot_no (const unsigned &frame_ID=0) const
 
uint8_t crate_no (const unsigned &frame_ID=0) const
 
uint8_t mm (const unsigned &frame_ID=0) const
 
uint8_t oos (const unsigned &frame_ID=0) const
 
uint16_t wib_errors (const unsigned &frame_ID=0) const
 
uint64_t timestamp (const unsigned &frame_ID=0) const
 
uint16_t wib_counter (const unsigned &frame_ID=0) const
 
uint8_t s1_error (const unsigned &frame_ID, const uint8_t &block_num) const
 
uint8_t s2_error (const unsigned &frame_ID, const uint8_t &block_num) const
 
uint16_t checksum_a (const unsigned &frame_ID, const uint8_t &block_num) const
 
uint16_t checksum_b (const unsigned &frame_ID, const uint8_t &block_num) const
 
uint16_t coldata_convert_count (const unsigned &frame_ID, const uint8_t &block_num) const
 
uint16_t error_register (const unsigned &frame_ID, const uint8_t &block_num) const
 
uint8_t hdr (const unsigned &frame_ID, const uint8_t &block_num, const uint8_t &hdr_num) const
 
adc_t get_ADC (const unsigned &frame_ID, const uint8_t channel_ID) const
 
void print_timestamps () const
 
void print (const unsigned i) const
 
void print_frames () const
 
 FelixFragmentUnordered (artdaq::Fragment const &fragment)
 
size_t total_words () const
 
size_t total_frames () const
 
size_t total_adc_values () const
 
- Public Member Functions inherited from dune::FelixFragmentBase
 FelixFragmentBase (const artdaq::Fragment &fragment)
 
virtual ~FelixFragmentBase ()
 
virtual size_t adc_range (int daq_adc_bits=12)
 
const uint8_t * dataBeginBytes () const
 
size_t dataSizeBytes () const
 

Protected Member Functions

FelixFrame const * frame_ (const unsigned &frame_num=0) const
 

Additional Inherited Members

- Protected Attributes inherited from dune::FelixFragmentBase
Metadata meta_
 
const void * artdaq_Fragment_
 
size_t sizeBytes_
 

Detailed Description

Definition at line 203 of file FelixFragment.hh.

Constructor & Destructor Documentation

dune::FelixFragmentUnordered::FelixFragmentUnordered ( artdaq::Fragment const &  fragment)
inline

Definition at line 288 of file FelixFragment.hh.

289  : FelixFragmentBase(fragment) {}
FelixFragmentBase(const artdaq::Fragment &fragment)

Member Function Documentation

uint16_t dune::FelixFragmentUnordered::checksum_a ( const unsigned &  frame_ID,
const uint8_t &  block_num 
) const
inlinevirtual

Implements dune::FelixFragmentBase.

Definition at line 244 of file FelixFragment.hh.

245  {
246  return frame_(frame_ID)->checksum_a(block_num);
247  }
FelixFrame const * frame_(const unsigned &frame_num=0) const
uint16_t checksum_a(const uint8_t block_num) const
Definition: FelixFormat.hh:349
uint16_t dune::FelixFragmentUnordered::checksum_b ( const unsigned &  frame_ID,
const uint8_t &  block_num 
) const
inlinevirtual

Implements dune::FelixFragmentBase.

Definition at line 248 of file FelixFragment.hh.

249  {
250  return frame_(frame_ID)->checksum_b(block_num);
251  }
uint16_t checksum_b(const uint8_t block_num) const
Definition: FelixFormat.hh:352
FelixFrame const * frame_(const unsigned &frame_num=0) const
uint16_t dune::FelixFragmentUnordered::coldata_convert_count ( const unsigned &  frame_ID,
const uint8_t &  block_num 
) const
inlinevirtual

Implements dune::FelixFragmentBase.

Definition at line 252 of file FelixFragment.hh.

253  {
254  return frame_(frame_ID)->coldata_convert_count(block_num);
255  }
FelixFrame const * frame_(const unsigned &frame_num=0) const
uint16_t coldata_convert_count(const uint8_t block_num) const
Definition: FelixFormat.hh:355
uint8_t dune::FelixFragmentUnordered::crate_no ( const unsigned &  frame_ID = 0) const
inlinevirtual

Implements dune::FelixFragmentBase.

Definition at line 218 of file FelixFragment.hh.

218  {
219  return frame_(frame_ID)->crate_no();
220  }
FelixFrame const * frame_(const unsigned &frame_num=0) const
uint8_t crate_no() const
Definition: FelixFormat.hh:312
uint16_t dune::FelixFragmentUnordered::error_register ( const unsigned &  frame_ID,
const uint8_t &  block_num 
) const
inlinevirtual

Implements dune::FelixFragmentBase.

Definition at line 256 of file FelixFragment.hh.

257  {
258  return frame_(frame_ID)->error_register(block_num);
259  }
uint16_t error_register(const uint8_t block_num) const
Definition: FelixFormat.hh:358
FelixFrame const * frame_(const unsigned &frame_num=0) const
uint8_t dune::FelixFragmentUnordered::fiber_no ( const unsigned &  frame_ID = 0) const
inlinevirtual

Implements dune::FelixFragmentBase.

Definition at line 212 of file FelixFragment.hh.

212  {
213  return frame_(frame_ID)->fiber_no();
214  }
uint8_t fiber_no() const
Definition: FelixFormat.hh:311
FelixFrame const * frame_(const unsigned &frame_num=0) const
FelixFrame const* dune::FelixFragmentUnordered::frame_ ( const unsigned &  frame_num = 0) const
inlineprotected

Definition at line 302 of file FelixFragment.hh.

302  {
303  // WARNING: CUSTOM OFFSET OF EIGHT WORDS FOR DEBUGGING -- backed out as it
304  // was not needed
305  // return reinterpret_cast<dune::FelixFrame const*>(static_cast<uint32_t
306  // const*>(artdaq_Fragment_)+8) + frame_num;
307  return reinterpret_cast<dune::FelixFrame const*>(
308  static_cast<uint32_t const*>(artdaq_Fragment_)) +
309  frame_num;
310  }
const void * artdaq_Fragment_
adc_t dune::FelixFragmentUnordered::get_ADC ( const unsigned &  frame_ID,
const uint8_t  channel_ID 
) const
inlinevirtual

Implements dune::FelixFragmentBase.

Definition at line 266 of file FelixFragment.hh.

266  {
267  return frame_(frame_ID)->channel(channel_ID);
268  }
FelixFrame const * frame_(const unsigned &frame_num=0) const
uint16_t channel(const uint8_t block_num, const uint8_t adc, const uint8_t ch) const
Definition: FelixFormat.hh:387
uint8_t dune::FelixFragmentUnordered::hdr ( const unsigned &  frame_ID,
const uint8_t &  block_num,
const uint8_t &  hdr_num 
) const
inlinevirtual

Implements dune::FelixFragmentBase.

Definition at line 260 of file FelixFragment.hh.

261  {
262  return frame_(frame_ID)->hdr(block_num, hdr_num);
263  }
uint8_t hdr(const uint8_t block_num, const uint8_t i) const
Definition: FelixFormat.hh:361
FelixFrame const * frame_(const unsigned &frame_num=0) const
uint8_t dune::FelixFragmentUnordered::mm ( const unsigned &  frame_ID = 0) const
inlinevirtual

Implements dune::FelixFragmentBase.

Definition at line 221 of file FelixFragment.hh.

221  {
222  return frame_(frame_ID)->mm();
223  }
uint8_t mm() const
Definition: FelixFormat.hh:314
FelixFrame const * frame_(const unsigned &frame_num=0) const
uint8_t dune::FelixFragmentUnordered::oos ( const unsigned &  frame_ID = 0) const
inlinevirtual

Implements dune::FelixFragmentBase.

Definition at line 224 of file FelixFragment.hh.

224  {
225  return frame_(frame_ID)->oos();
226  }
FelixFrame const * frame_(const unsigned &frame_num=0) const
uint8_t oos() const
Definition: FelixFormat.hh:315
void dune::FelixFragmentUnordered::print ( const unsigned  i) const
inlinevirtual

Implements dune::FelixFragmentBase.

Definition at line 278 of file FelixFragment.hh.

278 { frame_(i)->print(); }
void print() const
Definition: FelixFormat.hh:413
FelixFrame const * frame_(const unsigned &frame_num=0) const
void dune::FelixFragmentUnordered::print_frames ( ) const
inlinevirtual

Implements dune::FelixFragmentBase.

Definition at line 280 of file FelixFragment.hh.

280  {
281  for (unsigned i = 0; i < total_frames(); i++) {
282  frame_(i)->print();
283  }
284  }
void print() const
Definition: FelixFormat.hh:413
FelixFrame const * frame_(const unsigned &frame_num=0) const
void dune::FelixFragmentUnordered::print_timestamps ( ) const
inlinevirtual

Implements dune::FelixFragmentBase.

Definition at line 271 of file FelixFragment.hh.

271  {
272  for (unsigned int i = 0; i < total_frames(); i++) {
273  std::cout << std::hex << frame_(i)->timestamp() << '\t' << std::dec << i
274  << std::endl;
275  }
276  }
QTextStream & hex(QTextStream &s)
FelixFrame const * frame_(const unsigned &frame_num=0) const
QTextStream & dec(QTextStream &s)
uint64_t timestamp() const
Definition: FelixFormat.hh:317
QTextStream & endl(QTextStream &s)
uint8_t dune::FelixFragmentUnordered::s1_error ( const unsigned &  frame_ID,
const uint8_t &  block_num 
) const
inlinevirtual

Implements dune::FelixFragmentBase.

Definition at line 238 of file FelixFragment.hh.

238  {
239  return frame_(frame_ID)->s1_error(block_num);
240  }
FelixFrame const * frame_(const unsigned &frame_num=0) const
uint8_t s1_error(const uint8_t block_num) const
Definition: FelixFormat.hh:343
uint8_t dune::FelixFragmentUnordered::s2_error ( const unsigned &  frame_ID,
const uint8_t &  block_num 
) const
inlinevirtual

Implements dune::FelixFragmentBase.

Definition at line 241 of file FelixFragment.hh.

241  {
242  return frame_(frame_ID)->s2_error(block_num);
243  }
uint8_t s2_error(const uint8_t block_num) const
Definition: FelixFormat.hh:346
FelixFrame const * frame_(const unsigned &frame_num=0) const
uint8_t dune::FelixFragmentUnordered::slot_no ( const unsigned &  frame_ID = 0) const
inlinevirtual

Implements dune::FelixFragmentBase.

Definition at line 215 of file FelixFragment.hh.

215  {
216  return frame_(frame_ID)->slot_no();
217  }
uint8_t slot_no() const
Definition: FelixFormat.hh:313
FelixFrame const * frame_(const unsigned &frame_num=0) const
uint8_t dune::FelixFragmentUnordered::sof ( const unsigned &  frame_ID = 0) const
inlinevirtual

Implements dune::FelixFragmentBase.

Definition at line 206 of file FelixFragment.hh.

206  {
207  return frame_(frame_ID)->sof();
208  }
uint8_t sof() const
Definition: FelixFormat.hh:308
FelixFrame const * frame_(const unsigned &frame_num=0) const
uint64_t dune::FelixFragmentUnordered::timestamp ( const unsigned &  frame_ID = 0) const
inlinevirtual

Implements dune::FelixFragmentBase.

Definition at line 230 of file FelixFragment.hh.

230  {
231  return frame_(frame_ID)->timestamp();
232  }
FelixFrame const * frame_(const unsigned &frame_num=0) const
uint64_t timestamp() const
Definition: FelixFormat.hh:317
size_t dune::FelixFragmentUnordered::total_adc_values ( ) const
inlinevirtual

Implements dune::FelixFragmentBase.

Definition at line 296 of file FelixFragment.hh.

296  {
298  }
static constexpr size_t num_ch_per_frame
Definition: FelixFormat.hh:298
size_t dune::FelixFragmentUnordered::total_frames ( ) const
inlinevirtual

Implements dune::FelixFragmentBase.

Definition at line 294 of file FelixFragment.hh.

size_t dune::FelixFragmentUnordered::total_words ( ) const
inlinevirtual

Implements dune::FelixFragmentBase.

Definition at line 292 of file FelixFragment.hh.

292 { return sizeBytes_ / sizeof(word_t); }
uint32_t word_t
Definition: FelixFormat.hh:17
uint8_t dune::FelixFragmentUnordered::version ( const unsigned &  frame_ID = 0) const
inlinevirtual

Implements dune::FelixFragmentBase.

Definition at line 209 of file FelixFragment.hh.

209  {
210  return frame_(frame_ID)->version();
211  }
uint8_t version() const
Definition: FelixFormat.hh:310
FelixFrame const * frame_(const unsigned &frame_num=0) const
uint16_t dune::FelixFragmentUnordered::wib_counter ( const unsigned &  frame_ID = 0) const
inlinevirtual

Implements dune::FelixFragmentBase.

Definition at line 233 of file FelixFragment.hh.

233  {
234  return frame_(frame_ID)->wib_counter();
235  }
FelixFrame const * frame_(const unsigned &frame_num=0) const
uint16_t wib_counter() const
Definition: FelixFormat.hh:318
uint16_t dune::FelixFragmentUnordered::wib_errors ( const unsigned &  frame_ID = 0) const
inlinevirtual

Implements dune::FelixFragmentBase.

Definition at line 227 of file FelixFragment.hh.

227  {
228  return frame_(frame_ID)->wib_errors();
229  }
uint16_t wib_errors() const
Definition: FelixFormat.hh:316
FelixFrame const * frame_(const unsigned &frame_num=0) const

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