FRIBParallelanalysis  1.0
FrameworkforMPIParalleldataanalysisatFRIB
Public Member Functions | List of all members
frib::analysis::CMPIParameterFarmer Class Reference

#include <MPIParameterFarmer.h>

Public Member Functions

 CMPIParameterFarmer (int argc, char **argv, AbstractApplication &app)
 
virtual ~CMPIParameterFarmer ()
 
void operator() ()
 

Detailed Description

This can be instantiated in the farmer method of thee CAbstractApplication specialization to farm parameter data items from workers and sort them before handing them off to the outputter.

Normal usage might be:

*     CMPIParameterFarmer farmer(argc, argv, pApp);
*     farmer();
* 

The outputter rank will receive the items sent to us sorted by trigger number. Once all workers have sent us ends, we'll flush any remaining unflushed items and then send an end to the outputter. The unflushed items will be in trigger order but will probably have at least one skip (else they already would have been emitted).

Constructor & Destructor Documentation

◆ CMPIParameterFarmer()

frib::analysis::CMPIParameterFarmer::CMPIParameterFarmer ( int  argc,
char **  argv,
AbstractApplication app 
)

constructor Simply save the argc/argv in case we later need it (this implementation does not but later we might have some blocking factors). Save the application so that we can get at the pre-built data types.

The idea is that there's construction of the proceess and then, by calling the object as a functor, the process rus.

Parameters
argc,argv- the command line parameters.
app- References the application object.

◆ ~CMPIParameterFarmer()

frib::analysis::CMPIParameterFarmer::~CMPIParameterFarmer ( )
virtual

Destructor kill the buffer:

Member Function Documentation

◆ operator()()

void frib::analysis::CMPIParameterFarmer::operator() ( )

operator()

  • Figure out how many workers there are so we can count down m_nEndsLeft.
  • Instantiate a CMPITriggerSorter to re-order the triggers properly.
  • Accept header/data pairs (or just headers in the case of an end) until all of the workers have sent ends - then flush the sorter and send an end to the outputter.

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