VAPOR3 3.9.4
Classes | Public Member Functions | List of all members
VAPoR::DataStatus Class Reference

A class for describing the currently loaded dataset. More...

#include <DataStatus.h>

Public Member Functions

 DataStatus (size_t cacheSize, int nThreads=0)
 
 DataStatus ()
 
virtual ~DataStatus ()
 
int Open (const std::vector< string > &files, const std::vector< string > &options, string name, string format)
 
void Close (string name)
 
DataMgrGetDataMgr (string name) const
 
vector< string > GetDataMgrNames () const
 
void GetActiveExtents (const ParamsMgr *paramsMgr, string winName, string datasetName, size_t ts, CoordType &minExts, CoordType &maxExts) const
 
void GetActiveExtents (const ParamsMgr *paramsMgr, string winName, size_t ts, CoordType &minExts, CoordType &maxExts) const
 
void GetActiveExtents (const ParamsMgr *paramsMgr, size_t ts, CoordType &minExts, CoordType &maxExts) const
 
const vector< double > & GetTimeCoordinates () const
 
const vector< string > & GetTimeCoordsFormatted () const
 
size_t MapGlobalToLocalTimeStep (string dataSetName, size_t ts) const
 
void MapLocalToGlobalTimeRange (string dataSetName, size_t local_ts, size_t &min_ts, size_t &max_ts) const
 
void SetNumThreads (size_t nthreads)
 
size_t GetNumThreads () const
 
void SetCacheSize (size_t sizeMB)
 
string GetMapProjection () const
 
string GetMapProjectionDefault (string dataSetName) const
 
size_t getMinTimestep ()
 
size_t getMaxTimestep ()
 

Detailed Description

A class for describing the currently loaded dataset.

Author
Alan Norton
Version
3.0
Date
January 2016

The DataStatus class keeps track of available variables, timesteps, resolutions, and data ranges. It is constructed by the Session whenever a new metadata is loaded. It keeps a lazily evaluated value of min/max of each variable for each timestep. Variables can be referenced using the variable name, the session variable num (a numbering all the variables in the session) or by the active variable num. Active variables are all those in the metadata plus all the derived variables, and are a subset of the session variables. Session variables are those that were specified in the session plus those that are derived, and these may not all be available in the metadata. To support using active variables and session variable nums, mappings are provided between active names/nums and session nums, and also between variable names and their 2D and 3D session variable numbers and active variable numbers.

Definition at line 50 of file DataStatus.h.

Constructor & Destructor Documentation

◆ DataStatus() [1/2]

VAPoR::DataStatus::DataStatus ( size_t  cacheSize,
int  nThreads = 0 
)

◆ DataStatus() [2/2]

VAPoR::DataStatus::DataStatus ( )
inline

Definition at line 53 of file DataStatus.h.

References DataStatus().

Referenced by DataStatus().

◆ ~DataStatus()

virtual VAPoR::DataStatus::~DataStatus ( )
virtual

Member Function Documentation

◆ Close()

void VAPoR::DataStatus::Close ( string  name)

◆ GetActiveExtents() [1/3]

void VAPoR::DataStatus::GetActiveExtents ( const ParamsMgr paramsMgr,
size_t  ts,
CoordType minExts,
CoordType maxExts 
) const

◆ GetActiveExtents() [2/3]

void VAPoR::DataStatus::GetActiveExtents ( const ParamsMgr paramsMgr,
string  winName,
size_t  ts,
CoordType minExts,
CoordType maxExts 
) const

◆ GetActiveExtents() [3/3]

void VAPoR::DataStatus::GetActiveExtents ( const ParamsMgr paramsMgr,
string  winName,
string  datasetName,
size_t  ts,
CoordType minExts,
CoordType maxExts 
) const

Get domain extents for all active variables

This method returns the union of the domain extents for all active variables on the window named by winName. A variable is considered active if it it currrently in use by an enabled RenderParams instance.

The domain extents returned are always 3D. I.e. minExts and maxExts will always have three elements.

If no variable is active all elements of minExts will be zero, and all elements of maxExts will be one.

Parameters
[in]datasetNameIf provided, will only return extents for that dataset.
[in]paramsMgrActive variables are determined by querying the ParamsMgr.
[out]minExts
See also
ParamsMgr::GetRenderParams()

◆ GetDataMgr()

DataMgr * VAPoR::DataStatus::GetDataMgr ( string  name) const

◆ GetDataMgrNames()

vector< string > VAPoR::DataStatus::GetDataMgrNames ( ) const

◆ GetMapProjection()

string VAPoR::DataStatus::GetMapProjection ( ) const

◆ GetMapProjectionDefault()

string VAPoR::DataStatus::GetMapProjectionDefault ( string  dataSetName) const

◆ getMaxTimestep()

size_t VAPoR::DataStatus::getMaxTimestep ( )
inline

Determine the maximum time step for which there is any data.

Return values
size_tvalue of largest time step

Definition at line 168 of file DataStatus.h.

◆ getMinTimestep()

size_t VAPoR::DataStatus::getMinTimestep ( )
inline

Determine the minimum time step for which there is any data.

Return values
size_tvalue of smallest time step

Definition at line 164 of file DataStatus.h.

◆ GetNumThreads()

size_t VAPoR::DataStatus::GetNumThreads ( ) const
inline

Definition at line 147 of file DataStatus.h.

◆ GetTimeCoordinates()

const vector< double > & VAPoR::DataStatus::GetTimeCoordinates ( ) const
inline

Return the aggregated time coordinates for all data sets

This method returns the aggregated time coordinates in user defined units for all of the currently opened data sets The time coordinates vector monotonically increasing, and contains no duplicates.

See also
GetTimeCoordsFormatted()

Definition at line 102 of file DataStatus.h.

◆ GetTimeCoordsFormatted()

const vector< string > & VAPoR::DataStatus::GetTimeCoordsFormatted ( ) const
inline

Returns a vector of formatted time coordinate strings

This method interprets the values returned by GetTimeCoordinates() as seconds since the EPOCH and uses UDUNITS2 to encode the values the values as year, month, day, hour, minute, second, which are then formatted as a date-time string.

Definition at line 111 of file DataStatus.h.

◆ MapGlobalToLocalTimeStep()

size_t VAPoR::DataStatus::MapGlobalToLocalTimeStep ( string  dataSetName,
size_t  ts 
) const

Map a global to a local time step

Map the global time step ts to the closest "local" time step in the data set named by dataSetName. If ts is greater than or equal to GetTimeCoordinates().size then the last time step in dataSetName is returned.

Returns
local_ts Returns the local time step, or zero if dataSetName is not recognized.
See also
GetTimeCoordinates().

◆ MapLocalToGlobalTimeRange()

void VAPoR::DataStatus::MapLocalToGlobalTimeRange ( string  dataSetName,
size_t  local_ts,
size_t &  min_ts,
size_t &  max_ts 
) const

Map a local time step to a global time step range

Map the local time step local_ts for the data set named dataSetName to the possible range of global

See also
GetTimeCoordinates().

◆ Open()

int VAPoR::DataStatus::Open ( const std::vector< string > &  files,
const std::vector< string > &  options,
string  name,
string  format 
)

◆ SetCacheSize()

void VAPoR::DataStatus::SetCacheSize ( size_t  sizeMB)
inline

Set the data cache size

Set the size of the data cache in MBs. Has no effect until the next data set is loaded.

See also
DataMgr

Definition at line 157 of file DataStatus.h.

◆ SetNumThreads()

void VAPoR::DataStatus::SetNumThreads ( size_t  nthreads)
inline

Set number of execution threads

Set the number of execution threads. If nThreads == 0, the default, the system will attempt to set the number of threads equal to the number of cores detected. Has no effect until the next data set is loaded.

Definition at line 145 of file DataStatus.h.


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