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

Fit trace data with the template fitting functions. More...

#include <FitEditorTemplate.h>

Inheritance diagram for ddastoys::FitEditorTemplate:
Inheritance graph
[legend]
Collaboration diagram for ddastoys::FitEditorTemplate:
Collaboration graph
[legend]

Public Member Functions

 FitEditorTemplate ()
 Constructor. More...
 
 FitEditorTemplate (const FitEditorTemplate &rhs)
 Copy constructor. More...
 
 FitEditorTemplate (FitEditorTemplate &&rhs) noexcept
 Move constructor. More...
 
FitEditorTemplateoperator= (const FitEditorTemplate &rhs)
 Copy assignment operator. More...
 
FitEditorTemplateoperator= (FitEditorTemplate &&rhs) noexcept
 Move assignment operator. More...
 
virtual ~FitEditorTemplate ()
 Destructor. More...
 
virtual std::vector< CBuiltRingItemEditor::BodySegment > operator() (pRingItemHeader pHdr, pBodyHeader pBHdr, size_t bodySize, void *pBody)
 Perform the fit and create a fit extension for a single fragment. More...
 
virtual void free (iovec &e)
 Free the dynamic fit extension descriptor(s). More...
 

Detailed Description

Fit trace data with the template fitting functions.

Editing the hit overwrites any existing extension. This class is intended for use with the EventEditor framework providing a complete description of the new event body.

Constructor & Destructor Documentation

◆ FitEditorTemplate() [1/3]

FitEditorTemplate::FitEditorTemplate ( )

Constructor.

Sets up the configuration manager to parse config files and manage configuration data. Read the fit configuration file and the template file on creation.

Todo:
(ASC 9/17/24): Define a per-channel template. Requires getting the template for a crate/slot/channel combo rather than one template for the entire analysis. See comments in Configuration.h.

◆ FitEditorTemplate() [2/3]

FitEditorTemplate::FitEditorTemplate ( const FitEditorTemplate rhs)

Copy constructor.

Parameters
rhsObject to copy construct.

◆ FitEditorTemplate() [3/3]

FitEditorTemplate::FitEditorTemplate ( FitEditorTemplate &&  rhs)
noexcept

Move constructor.

Parameters
rhsObject to move construct.

Constructs using move assignment.

◆ ~FitEditorTemplate()

FitEditorTemplate::~FitEditorTemplate ( )
virtual

Destructor.

Delete the Configuration object managed by this class.

Member Function Documentation

◆ free()

void FitEditorTemplate::free ( iovec &  e)
virtual

Free the dynamic fit extension descriptor(s).

Parameters
eIOvec we need to free.

◆ operator()()

std::vector< CBuiltRingItemEditor::BodySegment > FitEditorTemplate::operator() ( pRingItemHeader  pHdr,
pBodyHeader  pBHdr,
size_t  bodySize,
void *  pBody 
)
virtual

Perform the fit and create a fit extension for a single fragment.

Parameters
pHdrPointer to the ring item header of the hit.
pBHdrPointer to the body header pointer for the hit.
bodySizeNumber of bytes in the body.
pBodyPointer to the body.
Returns
Final segment descriptors.

This is the hook into the FitEditorTemplate class. Here we:

  • Parse the fragment into a hit.
  • Produce a IOvec element for the existing hit (without any fit that might have been there).
  • See if the configuration manager says we should fit and if so, create the trace.
  • Get the fit limits and saturation value.
  • Get the number of pulses to fit.
  • Do the fits.
  • Create an IOvec entry for the extension we created (dynamic).

◆ operator=() [1/2]

FitEditorTemplate & FitEditorTemplate::operator= ( const FitEditorTemplate rhs)

Copy assignment operator.

Parameters
rhsObject to copy assign.
Returns
Reference to created object.

◆ operator=() [2/2]

FitEditorTemplate & FitEditorTemplate::operator= ( FitEditorTemplate &&  rhs)
noexcept

Move assignment operator.

Parameters
rhsObject to move assign.
Returns
Reference to created object.

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