DDASToys for NSCLDAQ  6.2-000
Public Member Functions | List of all members
CEventProcessor Class Reference

Define an event processor for DDAS data. More...

#include <CEventProcessor.h>

Public Member Functions

 CEventProcessor ()
 Constructor. More...
 
 ~CEventProcessor ()
 Destructor.
 
int operator() (int argc, char *argv[])
 Entry point for the processor. More...
 

Detailed Description

Define an event processor for DDAS data.

The class defines a functor that can be created and invoked from main() to do the job of processing ring items from a source and handing them off to a data sink.

Constructor & Destructor Documentation

◆ CEventProcessor()

CEventProcessor::CEventProcessor ( )

Constructor.

No real action occurs until the operator() is called, as all of the interesting data must be determined by parsing the command line arguments.

Member Function Documentation

◆ operator()()

int CEventProcessor::operator() ( int  argc,
char *  argv[] 
)

Entry point for the processor.

Parameters
argcNumber of command line arguments.
argvCommand line arguments.
Exceptions
std::invalid_argumentIf the item skip count is invalid.
std::invalid_argumentIf the dump count is invalid.
...All other exceptions back to caller (main).
Returns
When done processing items.
Return values
EXIT_SUCCESSProcessing successful.

Here we:

  • Parse arguments,
  • Open the data source,
  • Read data event-by-event,
  • Invoke a processor to process the individual ring items.
Todo:
(ASC 1/20/23): Awkward way to process the sample and exclude types. Can we return a vector of uint16_t or whatever the CDataSourceFactory wants? Item type codes are uint32_t so why are we mixing between signed/unsigned ints and different bits?
Todo:
(ASC 3/10/23): To support different NSCLDAQ data formats, we need to read the version string from the args and create an appropriate ring item factory. The ROOT converter should be independent of the data format since we can hand it CPhysicsEventItems from the correct format type.

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