RepastHPC  2.3.1
Public Member Functions | List of all members
repast::NCDataSetBuilder Class Reference

Used to build NCDataSets to record data in NetCDF format. More...

#include <NCDataSetBuilder.h>

Public Member Functions

 NCDataSetBuilder (std::string file, const Schedule &schedule)
 Creates an NCDataSetBuilder that will write to the specified file and get its tick counts from the specified schedule. More...
 
NCDataSetBuilderaddDataSource (NCDataSource *source)
 Adds a NCDataSource to this NCDataSetBuilder. More...
 
NCDataSetcreateDataSet ()
 Creates the NCDataSet defined by this NCDataSetBuilder. More...
 

Detailed Description

Used to build NCDataSets to record data in NetCDF format.

Steps for use are:

  1. Create a NCDataSetBuilder.
  2. Add NCDataSources to the builder using the createNCDataSource functions. Each DataSource defines a variable and where the data for that variable will be retrieved. Recording data on the NCDataSet produced by the builder will record this data for each variable.
  3. Call createDataSet to create the NCDataSet.
  4. Schedule calls to record and write on the NCDataSet.

Constructor & Destructor Documentation

◆ NCDataSetBuilder()

repast::NCDataSetBuilder::NCDataSetBuilder ( std::string  file,
const Schedule schedule 
)

Creates an NCDataSetBuilder that will write to the specified file and get its tick counts from the specified schedule.

Parameters
filethe name of the file to write to. Only rank 0 will actually write to this file.
schedulethe schedule to get tick counts from

Member Function Documentation

◆ addDataSource()

NCDataSetBuilder & repast::NCDataSetBuilder::addDataSource ( NCDataSource source)

Adds a NCDataSource to this NCDataSetBuilder.

The added NCDataSource defines a variable and where the data for that variable will be retrieved. Recording data on the NCDataSet produced by this builder will record this data for each variable.

◆ createDataSet()

NCDataSet * repast::NCDataSetBuilder::createDataSet ( )

Creates the NCDataSet defined by this NCDataSetBuilder.

The caller is responsible for properly deleting the returned pointer.

Returns
the created NCDataSet.

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