NSCL DDAS  1.0
Support for XIA DDAS at the NSCL
 All Classes Namespaces Files Functions Variables Macros Pages
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

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.

Member Function Documentation

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
inputthe stream from which the contents of the file are read
configthe configuration to store the results in
Exceptions
std::runtime_errorif fewer lines than there are modules are found
std::runtime_errorif a line is encountered with a value less than 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: