|
OPeNDAP Hyrax Back End Server (BES)
Updated for version 3.8.3
|
class GridAggregateOnOuterDimension : public GridAggregationBase More...
#include <GridAggregateOnOuterDimension.h>


Public Member Functions | |
| virtual const AMDList & | getDatasetList () const |
| Accessor for the dataset description list that describes this aggregation. More... | |
| GridAggregateOnOuterDimension (const Grid &proto, const Dimension &newDim, const AMDList &memberDatasets, const DDSLoader &loaderProto) | |
| Create the new Grid from the template proto... More... | |
| GridAggregateOnOuterDimension (const GridAggregateOnOuterDimension &proto) | |
| GridAggregateOnOuterDimension & | operator= (const GridAggregateOnOuterDimension &rhs) |
| virtual GridAggregateOnOuterDimension * | ptr_duplicate () |
| virtual bool | read () |
| Read in only those datasets that are in the constrained output making sure to apply the internal dimension constraints to the member datasets properly before reading them! Stream the data into the output buffer correctly. More... | |
| void | setShapeFrom (const libdap::Grid &protoSubGrid, bool addMaps) |
| Use the data array and maps from protoSubGrid as the initial point for the shape of the Grid. More... | |
| BaseType * | transform_to_dap4 (libdap::D4Group *root, libdap::Constructor *container) |
| virtual | ~GridAggregateOnOuterDimension () |
Protected Member Functions | |
| void | copyProtoMapsIntoThisGrid (const Dimension &aggDim) |
| Copy the template's read in subgrid maps into this. More... | |
| virtual const Dimension & | getAggregationDimension () const |
| Get the contained aggregation dimension info. More... | |
| Grid * | getSubGridTemplate () |
| Reveals the raw ptr, but only to subclasses. More... | |
| void | printConstraints (const libdap::Array &fromArray) |
| virtual void | readAndAggregateConstrainedMapsHook () |
| Called from read()! Invokes the user hooks eventually. More... | |
| void | readProtoSubGrid () |
| Transfer constraints properly from this object's maps and read in the proto subgrid entirely (respecting constraints) More... | |
| virtual void | transferConstraintsToSubGridHook (Grid *pSubGrid) |
| For the data array and all maps, transfer the constraints from the super grid (ie this) to all the grids in the given prototype subgrid. More... | |
class GridAggregateOnOuterDimension : public GridAggregationBase
Grid that performs a joinNew aggregation by taking an ordered list of datatsets which contain Grid's with matching signatures (ie array name, dimensions, maps) and creating a new outer dimension with cardinality the number of datasets in the aggregation.
The resulting aggregated grid will be one plus the rank of the array's of the member dataset Grids.
We assume we have created the proper shape of this Grid so that the map vectors in the Grid superclass are correct (as loaded from the first dataset!)
The data itself will be loaded as needed during serialize based on the response.
TODO OPTIMIZE One major issue is we create one of these objects per aggregation variable, even if these vars are in the same dataset. So when we read, we load the dataset for each variable! Does the BES cache them or something? Maybe we can avoid doing this with some smarts? Not sure... I get the feeling the other handlers do the same sort of thing, but can be smarter about seeking, etc.
Definition at line 84 of file GridAggregateOnOuterDimension.h.
| agg_util::GridAggregateOnOuterDimension::GridAggregateOnOuterDimension | ( | const Grid & | proto, |
| const Dimension & | newDim, | ||
| const AMDList & | memberDatasets, | ||
| const DDSLoader & | loaderProto | ||
| ) |
Create the new Grid from the template proto...
we'll have the same name, dimension and attributes.
| proto | template to use, will be the aggVar from the FIRST member dataset! |
| memberDatasets | descriptors for the dataset members of the aggregation. ASSUMED that the contained DDS will have a Grid var with name proto.name() that matches rank and maps, etc!! |
| loaderProto | loaded template to use (borrow dhi from) to load the datasets |
Definition at line 67 of file GridAggregateOnOuterDimension.cc.
References BESDEBUG.
Referenced by ptr_duplicate().
| agg_util::GridAggregateOnOuterDimension::GridAggregateOnOuterDimension | ( | const GridAggregateOnOuterDimension & | proto | ) |
Definition at line 81 of file GridAggregateOnOuterDimension.cc.
References BESDEBUG.
|
virtual |
Definition at line 107 of file GridAggregateOnOuterDimension.cc.
References BESDEBUG.
|
protectedinherited |
Copy the template's read in subgrid maps into this.
Skip any map found in the subgrid named aggDim.name since we handle the aggregation dimension map specially.
| aggDim | a map with aggDim.name is NOT copied. |
Definition at line 305 of file GridAggregationBase.cc.
References BESDEBUG_FUNC, agg_util::AggregationUtil::findMapByName(), agg_util::GridAggregationBase::getSubGridTemplate(), agg_util::Dimension::name, NCML_ASSERT_MSG, agg_util::GridAggregationBase::printConstraints(), and VALID_PTR.
Referenced by agg_util::GridAggregationBase::readAndAggregateConstrainedMapsHook().

|
protectedvirtual |
Get the contained aggregation dimension info.
Implements agg_util::GridAggregationBase.
Definition at line 168 of file GridAggregateOnOuterDimension.cc.
|
virtualinherited |
Accessor for the dataset description list that describes this aggregation.
Definition at line 185 of file GridAggregationBase.cc.
Referenced by agg_util::GridJoinExistingAggregation::makeAggregatedOuterMapVector().
|
protectedinherited |
Reveals the raw ptr, but only to subclasses.
Don't delete it, but can be changed etc.
Definition at line 230 of file GridAggregationBase.cc.
Referenced by agg_util::GridAggregationBase::copyProtoMapsIntoThisGrid(), agg_util::GridJoinExistingAggregation::makeAggregatedOuterMapVector(), and agg_util::GridAggregationBase::readProtoSubGrid().
| GridAggregateOnOuterDimension & agg_util::GridAggregateOnOuterDimension::operator= | ( | const GridAggregateOnOuterDimension & | rhs | ) |
Definition at line 96 of file GridAggregateOnOuterDimension.cc.
References agg_util::GridAggregationBase::operator=().

|
protectedinherited |
Definition at line 277 of file GridAggregationBase.cc.
References BESDEBUG, and agg_util::AggregationUtil::printConstraints().
Referenced by agg_util::GridAggregationBase::copyProtoMapsIntoThisGrid(), and agg_util::GridAggregationBase::read().

|
virtual |
Definition at line 90 of file GridAggregateOnOuterDimension.cc.
References GridAggregateOnOuterDimension().

|
virtualinherited |
Read in only those datasets that are in the constrained output making sure to apply the internal dimension constraints to the member datasets properly before reading them! Stream the data into the output buffer correctly.
NOTE: Subclasses should implement the protected hooks if possible rather than overriding this function!
Definition at line 192 of file GridAggregationBase.cc.
References BESDEBUG_FUNC, agg_util::GridAggregationBase::printConstraints(), agg_util::GridAggregationBase::readAndAggregateConstrainedMapsHook(), and VALID_PTR.

|
protectedvirtualinherited |
Called from read()! Invokes the user hooks eventually.
Can be overridden, but default calls should suffice for now.
Definition at line 259 of file GridAggregationBase.cc.
References agg_util::GridAggregationBase::copyProtoMapsIntoThisGrid(), agg_util::GridAggregationBase::getAggregationDimension(), and agg_util::GridAggregationBase::readProtoSubGrid().
Referenced by agg_util::GridAggregationBase::read().

|
protectedinherited |
Transfer constraints properly from this object's maps and read in the proto subgrid entirely (respecting constraints)
Definition at line 285 of file GridAggregationBase.cc.
References agg_util::GridAggregationBase::getSubGridTemplate(), agg_util::GridAggregationBase::transferConstraintsToSubGridHook(), and VALID_PTR.
Referenced by agg_util::GridAggregationBase::readAndAggregateConstrainedMapsHook().

|
inherited |
Use the data array and maps from protoSubGrid as the initial point for the shape of the Grid.
It may still not be complete until the callers adds maps, etc.
| protoSubGrid | describes the data array and map templates to use for the granules (modulo any agg subclass changes). |
| addMaps | if true, add's all the maps in protoSubGrid into this. if false, does not. |
Definition at line 153 of file GridAggregationBase.cc.
References VALID_PTR.
|
protectedvirtual |
For the data array and all maps, transfer the constraints from the super grid (ie this) to all the grids in the given prototype subgrid.
Note that this Grid has one more outer dimension than the subgrid, so the first one on this will clearly be skipped.
| pToGrid |
Reimplemented from agg_util::GridAggregationBase.
Definition at line 159 of file GridAggregateOnOuterDimension.cc.
References VALID_PTR.
|
inherited |
Definition at line 108 of file GridAggregationBase.cc.