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

An interactive event processor integrated in the traceview GUI. More...

#include <DDASDecoder.h>

Public Member Functions

 DDASDecoder ()
 Constructor.
 
 ~DDASDecoder ()
 Destructor.
 
void createDataSource (std::string src)
 Create a file data source from the input string. More...
 
std::vector< ddastoys::DDASFitHitgetEvent ()
 Get the next unpacked PHYSICS_EVENT. More...
 
int skip (int nevts)
 Skip events in the currently loaded data file. More...
 
int getEventCount ()
 Return the number of PHYSCIS_EVENTs. More...
 
int getEventIndex ()
 Return the PHYSICS_EVENT index. More...
 
std::string getFilePath ()
 Return the path of the file data source. More...
 

Detailed Description

An interactive event processor integrated in the traceview GUI.

An event processor class broken into parts performing specific actions like creating a data source or getting the next PHYSICS_EVENT. These functions can be hooked into the signal and slot framework used by Qt. See latest $DAQROOT/share/recipes/process/process.cpp for a more general example.

Member Function Documentation

◆ createDataSource()

void DDASDecoder::createDataSource ( std::string  src)

Create a file data source from the input string.

Parameters
srcName of the file we will create a data source from.

◆ getEvent()

std::vector< DDASFitHit > DDASDecoder::getEvent ( )

Get the next unpacked PHYSICS_EVENT.

Returns
The event data. The vector is empty if the end of the data file is encountered.

An event is a collection of DDASFitHits stored in a vector.

◆ getEventCount()

int DDASDecoder::getEventCount ( )
inline

Return the number of PHYSCIS_EVENTs.

Returns
Number of PHYSICS_EVENTs in the file.

◆ getEventIndex()

int DDASDecoder::getEventIndex ( )
inline

Return the PHYSICS_EVENT index.

Returns
Index of the event. Trivially m_count-1.

◆ getFilePath()

std::string DDASDecoder::getFilePath ( )

Return the path of the file data source.

Returns
The file path. Returns an empty string if the data source has not been created.

◆ skip()

int DDASDecoder::skip ( int  nevts)

Skip events in the currently loaded data file.

Parameters
nevtsNumber of PHYSICS_EVENTS to skip.
Returns
int
Return values
0END_RUN state change event is not encountered when skipping.
-1END_RUN state change event is encountered when skipping.

Skip forward by nevts PHYSICS_EVENTS where nevts is provided as an argument.


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