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

Abstract base class to support type-independent ring-item processing. More...

#include <CRingItemProcessor.h>

Inheritance diagram for CRingItemProcessor:
Inheritance graph
[legend]

Public Member Functions

 CRingItemProcessor ()
 Constructor.
 
virtual ~CRingItemProcessor ()
 Destructor.
 
virtual void processScalerItem (CRingScalerItem &item)
 Output an abbreviated scaler dump to stdout. More...
 
virtual void processStateChangeItem (CRingStateChangeItem &item)
 Output a state change item to stdout. More...
 
virtual void processTextItem (CRingTextItem &item)
 Output a text item to stdout. More...
 
virtual void processEvent (CPhysicsEventItem &item)
 Output a physics event item to stdout. More...
 
virtual void processEventCount (CRingPhysicsEventCountItem &item)
 Output an event count item to stdout. More...
 
virtual void processFormat (CDataFormatItem &item)
 Output the ring item format to stdout. More...
 
virtual void processGlomParams (CGlomParameters &item)
 Output a glom parameters item to stdout. More...
 
virtual void processUnknownItemType (CRingItem &item)
 Output a ring item with unknown type to stdout. More...
 

Detailed Description

Abstract base class to support type-independent ring-item processing.

The concept of this class is really simple. A virtual method for each ring-item type that we differentiate between. Similarly a virtual method for ring-item types that we don't break out. The default behavior for each type is to do a formatted dump to stdout.

Member Function Documentation

◆ processEvent()

void CRingItemProcessor::processEvent ( CPhysicsEventItem &  item)
virtual

Output a physics event item to stdout.

Parameters
itemReference the physics event item.

Here we "analyze" a physics event by dumping it to stdout. Derived classes can implement their own event processing using this function.

Reimplemented in TraceViewProcessor, and ProcessToRootSink.

◆ processEventCount()

void CRingItemProcessor::processEventCount ( CRingPhysicsEventCountItem &  item)
virtual

Output an event count item to stdout.

Parameters
itemReferences the CPhysicsEventCountItem being dumped.

Event count items are used to describe, for a given data source, the number of triggers that occured since the last instance of that item. This can be used both to determine the rough event rate as well as the fraction of data analyzed (more complicated for built events) in a program sampling physics events. We'll dump out information about the item.

Reimplemented in TraceViewProcessor.

◆ processFormat()

void CRingItemProcessor::processFormat ( CDataFormatItem &  item)
virtual

Output the ring item format to stdout.

Parameters
itemReferences the format item.

FRIBDAQ runs have, as their first record an event format record that indicates hat the data format (11.0, 12.0, etc.)

◆ processGlomParams()

void CRingItemProcessor::processGlomParams ( CGlomParameters &  item)
virtual

Output a glom parameters item to stdout.

Parameters
itemReferences the glom parameter record.

When the data source is the output of an event building pipeline, the glom stage of that pipeline will insert a glom parameters record into the output data. This record type will indicate whether or not glom is building events (or acting in passthrough mode) and the coincidence interval in clock ticks used when in build mode, as well as how the timestamp is computed from the fragments that make up each event.

Reimplemented in TraceViewProcessor.

◆ processScalerItem()

void CRingItemProcessor::processScalerItem ( CRingScalerItem &  item)
virtual

Output an abbreviated scaler dump to stdout.

Parameters
itemReference to the scaler ring item to process.

Your own processing should create a new class and override this if you want to process scalers. Note that this and all ring item types have a toString() method that returns the string the NSCLDAQ dumper outputs for each item type.

Reimplemented in TraceViewProcessor.

◆ processStateChangeItem()

void CRingItemProcessor::processStateChangeItem ( CRingStateChangeItem &  item)
virtual

Output a state change item to stdout.

Parameters
itemReference to the state change item.

Again we're just going to do a partial dump:

  • BEGIN/END run we'll give the timestamp, run number and title, and time offset into the run.
  • PAUSE_RESUME we'll just give the time and time into the run.

◆ processTextItem()

void CRingItemProcessor::processTextItem ( CRingTextItem &  item)
virtual

Output a text item to stdout.

Parameters
itemRefereinces the CRingTextItem we got.

Text items are items that contain documentation information in the form of strings. The currently defined text items are:

  • PACKET_TYPE - which contain documentation of any data packets that might be present. This is used by the SBS readout framework.
  • MONITORED_VARIABLES - used by all frameworks to give the values of tcl variables that are being injected during the run or are constant throughout the run. Again we format a dump of the item.

Reimplemented in TraceViewProcessor.

◆ processUnknownItemType()

void CRingItemProcessor::processUnknownItemType ( CRingItem &  item)
virtual

Output a ring item with unknown type to stdout.

Parameters
itemReferences the ring item for the event.

Process a ring item with an unknown item type. This can happen if we're seeing a ring item that we've not specified a handler for (unlikely) or the item types have expanded but the data format is the same (possible) or the user has defined and is using their own ring item type. We'll just dump the item.


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