NSCL DDAS  12.1-001
Support for XIA DDAS at FRIB
Functions
ddasSort.cpp File Reference

Main program to sort DDAS hits. More...

#include "DDASSorter.h"
#include <stdexcept>
#include <string>
#include <iostream>
#include <stdlib.h>
#include <memory>
#include <CRingBuffer.h>
#include <CRemoteAccess.h>
#include <Exception.h>
#include "ddasSortOptions.h"
Include dependency graph for ddasSort.cpp:

Functions

int main (int argc, char **argv)
 Entry point to the sorter: process comand line arguments, instantiates and invokes the application class with appropriate parameters. More...
 

Detailed Description

Main program to sort DDAS hits.

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Entry point to the sorter: process comand line arguments, instantiates and invokes the application class with appropriate parameters.

In order to get best performance from DDASReadout, sorting of the resulting hits has been pushed downstream. This program reads ring items that consist of multiple hits from boards and outputs ring items that consist of single hits from all boards in an experiment sorted by time. Ring item bodies we take as input look like:

+---------------------------------------------------—+ | Size of the body in 16 bit words (uint32_t) | +---------------------------------------------------—+ | Module ID uint32_t (note bit 21 says use ext clock) | +---------------------------------------------------—+ | Clock scale factor (double precision) | +---------------------------------------------------—+ | Hit 1, Hit 2, ... | | ... |

Todo:
(ASC 3/18/24): Sometimes the sorter fails to create its sort ring. In my attempts to resurrect the sorter tests, I had some issues making multiple createAndProduce calls from within the same function. Here it had better be making that call only once. Is this more reliable if I call CRingBuffer::create() and new CRingBuffer() similar to whats done in sortertests.cpp?