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

Main program to use the format library to dump DDAS event files. Based on the unified format library evtdump example code. More...

#include <cstdlib>
#include <iostream>
#include <string>
#include <sstream>
#include <map>
#include <memory>
#include <algorithm>
#include <fstream>
#include <NSCLDAQFormatFactorySelector.h>
#include <DataFormat.h>
#include <RingItemFactoryBase.h>
#include <CRingItem.h>
#include <CAbnormalEndItem.h>
#include <CDataFormatItem.h>
#include <CGlomParameters.h>
#include <CPhysicsEventItem.h>
#include <CRingFragmentItem.h>
#include <CRingPhysicsEventCountItem.h>
#include <CRingScalerItem.h>
#include <CRingTextItem.h>
#include <CRingStateChangeItem.h>
#include <CUnknownFragment.h>
#include <URL.h>
#include "dumperargs.h"
#include "DataSource.h"
#include "FdDataSource.h"
#include "StreamDataSource.h"
#include "RootFileDataSink.h"
Include dependency graph for ddasdumper.cpp:

Functions

std::vector< uint32_t > makeExclusionList (const std::string &exclusions)
 Creates a vector of the ring item types to be excluded from the dump given a comma separated list of types. More...
 
DataSourcemakeDataSource (::ufmt::RingItemFactoryBase *pFactory, const std::string &strUrl)
 Parse the URI of the source and based on the parse create the underlying connection. Create the correct concrete instance of DataSource given all that. More...
 
int main (int argc, char *argv[])
 Setup, configure dumper settings and dump events. More...
 

Detailed Description

Main program to use the format library to dump DDAS event files. Based on the unified format library evtdump example code.

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

Setup, configure dumper settings and dump events.

Parameters
argc,argvArgument count and argument vector.
Returns
EXIT_SUCCESS Successful event dump
Note
All handled exceptions cause immidiate termination via std::exit(EXIT_FAILURE).

◆ makeDataSource()

DataSource* makeDataSource ( ::ufmt::RingItemFactoryBase *  pFactory,
const std::string &  strUrl 
)

Parse the URI of the source and based on the parse create the underlying connection. Create the correct concrete instance of DataSource given all that.

Parameters
pFactoryPointer to the ring item factory to use.
strUrlString URI of the connection.
Exceptions
std::invalid_argumentIf a ringbuffer data source is requested. The unified format library is incorporated into the NSCLDAQ, but does not have NSCLDAQ support enabled as its installed first.
Returns
Dynamically allocated data source.

◆ makeExclusionList()

std::vector<uint32_t> makeExclusionList ( const std::string &  exclusions)

Creates a vector of the ring item types to be excluded from the dump given a comma separated list of types.

Parameters
exclusions- string containing the exclusion list.
Exceptions
std::invalid_argumentan exclusion item is not a string and is not in the map of recognized item types.
Returns
Vector of items to exclude.

A type can be a string or a positive number. If it is a string, it is translated to the type id using TypeMap. If it is a number, it is used as is.