NSCL DDAS  12.1-001
Support for XIA DDAS at FRIB
Public Member Functions | List of all members
DAQ::DDAS::ModEvtFileParser Class Reference

A parser for the modevtlen.txt file. More...

#include <ModEvtFileParser.h>

Public Member Functions

 ModEvtFileParser ()=default
 Constructor. More...
 
void parse (std::istream &input, Configuration &config)
 Parse and store the contents of the modevtlen.txt file in a configuration object. More...
 

Detailed Description

A parser for the modevtlen.txt file.

The modevtlen.txt contains the length of each event to expect from each module. For each channel in a digitizer, the assumption is that the of the same length will be emitted. That implies that each channel will be configured to have the same settngs for trace capture, QDC, energy summing, and external clock. If that is not the case, Readout programs will fail miserably!

The structure of the file is very simple. There should be a line for each module in the crate with a single integer value representing the length of the event in units of 32-bit integers. The minimum value any line can have is 4, because that is the minimum length of data a module can output for each channel.

It is not an error for the file to contain more lines than there are modules in the system. It IS an error for the file to contain fewer lines than there are in the system.

Constructor & Destructor Documentation

◆ ModEvtFileParser()

DAQ::DDAS::ModEvtFileParser::ModEvtFileParser ( )
default

Constructor.

Member Function Documentation

◆ parse()

void DAQ::DDAS::ModEvtFileParser::parse ( std::istream &  input,
Configuration config 
)

Parse and store the contents of the modevtlen.txt file in a configuration object.

Parameters
inputInput stream for reading.
configThe configuration to store the results in.
Exceptions
std::runtime_errorFewer lines in modevtlen.txt than installed modules.
std::runtime_errorEvent length < 4.

The parser will read in as many lines as the value returned by config.getNumberOfModules(). For that reason, the caller must have already set the number of modules in the configuration object.


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