NSCL DDAS  1.0
Support for XIA DDAS at the NSCL
 All Classes Namespaces Files Functions Variables Macros Pages
Public Member Functions | Protected Member Functions | List of all members
DAQ::DDAS::CDDASUnpacker Class Reference

Raw data unpacker for unbuilt data. More...

#include <DDASUnpacker.h>

Inheritance diagram for DAQ::DDAS::CDDASUnpacker:

Public Member Functions

 CDDASUnpacker (CParameterMapper &rParameterMapper)
 Constructor. More...
 
 ~CDDASUnpacker ()
 
void setParameterMapper (CParameterMapper &pParameterMapper)
 Pass in a different parameter mapper. More...
 
CParameterMappergetParameterMapper () const
 
virtual Bool_t operator() (const Address_t pEvent, CEvent &rEvent, CAnalyzer &rAnalyzer, CBufferDecoder &rDecoder)
 Process the raw data and call user's mapper. More...
 

Protected Member Functions

void setEventSize (const Address_t pEvent, CBufferDecoder &rDecoder, CAnalyzer &rAnalyzer)
 

Detailed Description

Raw data unpacker for unbuilt data.

The user should use this to process data upstream of or in the absence of the event builder. This processes raw data and generates one DDASHit object per event. The user is expected to derive a class from the ParameterMapper base class and pass that object to this unpacker to call at the end of parsing each event. In that way, this class will deal with the raw data and allow the user to interact with it at a much higher level. This class will take ownership of the user's mapper and will attempt to delete it at the time of destruction. For that reason, it is important that the user dynamically allocates their mapper on the heap. A proper way to do this is:

CDDASUnpacker unpacker(*pMapper);

This unpacker does not support byte-swapping. Don't worry, it is not likely to be an issue in the future unless you try to analyze your system on a computer with a strange architecture.

Constructor & Destructor Documentation

DAQ::DDAS::CDDASUnpacker::CDDASUnpacker ( CParameterMapper rParameterMapper)

Constructor.

Parameters
rParameterMapperuser's mapper (must be dynamically allocated, ownership transfers to class)
DAQ::DDAS::CDDASUnpacker::~CDDASUnpacker ( )

Destructor

Member Function Documentation

CParameterMapper & DAQ::DDAS::CDDASUnpacker::getParameterMapper ( ) const

Retrieve the active parameter

Bool_t DAQ::DDAS::CDDASUnpacker::operator() ( const Address_t  pEvent,
CEvent &  rEvent,
CAnalyzer &  rAnalyzer,
CBufferDecoder &  rDecoder 
)
virtual

Process the raw data and call user's mapper.

This is designed to process data from the DDAS readout program. See the documentation in readout to understand the structure.

This sets the event size in the CEvent.

Parameters
pEventaddress in buffer to begin parsing at
rEventcurrent SpecTcl event
rAnalyzerthe analyzer
rDecodercurrent buffer decoder
void DAQ::DDAS::CDDASUnpacker::setParameterMapper ( CParameterMapper pParameterMapper)

Pass in a different parameter mapper.

The user must allocate the parameter dynamically before passing it in. For example:

auto pMapper = new MyParameterMapper;
unpacker.setParameterMapper(*pMapper);

Ownership of the mapper is transferred into this object.

Parameters
rParameterMapperthe user's parameter mapper

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