VAPOR3 3.9.4
|
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) |
DataMgr * | GetDataMgr (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 () |
A class for describing the currently loaded dataset.
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.
VAPoR::DataStatus::DataStatus | ( | size_t | cacheSize, |
int | nThreads = 0 |
||
) |
|
inline |
|
virtual |
void VAPoR::DataStatus::Close | ( | string | name | ) |
void VAPoR::DataStatus::GetActiveExtents | ( | const ParamsMgr * | paramsMgr, |
size_t | ts, | ||
CoordType & | minExts, | ||
CoordType & | maxExts | ||
) | const |
void VAPoR::DataStatus::GetActiveExtents | ( | const ParamsMgr * | paramsMgr, |
string | winName, | ||
size_t | ts, | ||
CoordType & | minExts, | ||
CoordType & | maxExts | ||
) | const |
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.
[in] | datasetName | If provided, will only return extents for that dataset. |
[in] | paramsMgr | Active variables are determined by querying the ParamsMgr. |
[out] | minExts |
DataMgr * VAPoR::DataStatus::GetDataMgr | ( | string | name | ) | const |
vector< string > VAPoR::DataStatus::GetDataMgrNames | ( | ) | const |
string VAPoR::DataStatus::GetMapProjection | ( | ) | const |
string VAPoR::DataStatus::GetMapProjectionDefault | ( | string | dataSetName | ) | const |
|
inline |
Determine the maximum time step for which there is any data.
size_t | value of largest time step |
Definition at line 168 of file DataStatus.h.
|
inline |
Determine the minimum time step for which there is any data.
size_t | value of smallest time step |
Definition at line 164 of file DataStatus.h.
|
inline |
Definition at line 147 of file DataStatus.h.
|
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.
Definition at line 102 of file DataStatus.h.
|
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.
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.
dataSetName
is not recognized.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
int VAPoR::DataStatus::Open | ( | const std::vector< string > & | files, |
const std::vector< string > & | options, | ||
string | name, | ||
string | format | ||
) |
|
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.
Definition at line 157 of file DataStatus.h.
|
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.