bes Updated for version 3.20.13
agg_util::ArrayAggregationBase Class Reference

#include <ArrayAggregationBase.h>

Collaboration diagram for agg_util::ArrayAggregationBase:
Collaboration graph

Public Member Functions

 ArrayAggregationBase (const ArrayAggregationBase &rhs)
 
 ArrayAggregationBase (const libdap::Array &granuleProto, AMDList memberDatasets, std::unique_ptr< ArrayGetterInterface > arrayGetter)
 
const AMDList & getDatasetList () const
 
ArrayAggregationBaseoperator= (const ArrayAggregationBase &rhs)
 
ArrayAggregationBaseptr_duplicate () override
 
bool read () override
 

Protected Member Functions

const ArrayGetterInterfacegetArrayGetterInterface () const
 
libdap::Array & getGranuleTemplateArray ()
 
void printConstraints (const Array &fromArray)
 
virtual void readConstrainedGranuleArraysAndAggregateDataHook ()
 
virtual void transferOutputConstraintsIntoGranuleTemplateHook ()
 

Detailed Description

Base class for subclasses of libdap::Array which perform aggregation on a list of AggMemberDatasets when asked.

Definition at line 51 of file ArrayAggregationBase.h.

Constructor & Destructor Documentation

◆ ArrayAggregationBase() [1/2]

agg_util::ArrayAggregationBase::ArrayAggregationBase ( const libdap::Array &  granuleProto,
AMDList  memberDatasets,
std::unique_ptr< ArrayGetterInterface arrayGetter 
)

Construct the base class using the given parameters. Used for join aggregation concrete subclasses.

Parameters
granulePrototemplate describing the data array of for a granule (member) of the join agg. Note: for joinExisting the array size may not be correct!
memberDatasetsthe granules to use in the agg
arrayGetterunique_ptr to the data array getter for the variable. Note the unique_ptr ref is sunk by the ctor so don't delete/release from the caller.
Returns

Definition at line 52 of file ArrayAggregationBase.cc.

◆ ArrayAggregationBase() [2/2]

agg_util::ArrayAggregationBase::ArrayAggregationBase ( const ArrayAggregationBase rhs)

Definition at line 58 of file ArrayAggregationBase.cc.

◆ ~ArrayAggregationBase()

agg_util::ArrayAggregationBase::~ArrayAggregationBase ( )
override

Definition at line 68 of file ArrayAggregationBase.cc.

Member Function Documentation

◆ getArrayGetterInterface()

const ArrayGetterInterface & agg_util::ArrayAggregationBase::getArrayGetterInterface ( ) const
protected

Accessor for subclasses Note this is protected, so not const! Subclasses may mutate the return hence this, but should not delete it, hence the reference.

Definition at line 165 of file ArrayAggregationBase.cc.

◆ getDatasetList()

const AMDList & agg_util::ArrayAggregationBase::getDatasetList ( ) const

Get the list of AggMemberDataset's that comprise this aggregation

Definition at line 143 of file ArrayAggregationBase.cc.

◆ getGranuleTemplateArray()

libdap::Array & agg_util::ArrayAggregationBase::getGranuleTemplateArray ( )
protected

Accessor for subclasses Note this is protected, so not const! Subclasses may mutate the return hence this, but should not delete it, hence the reference.

Definition at line 158 of file ArrayAggregationBase.cc.

◆ operator=()

ArrayAggregationBase & agg_util::ArrayAggregationBase::operator= ( const ArrayAggregationBase rhs)

Definition at line 74 of file ArrayAggregationBase.cc.

◆ printConstraints()

void agg_util::ArrayAggregationBase::printConstraints ( const Array &  fromArray)
protected

Print out the constraints on fromArray to the debug channel

Definition at line 150 of file ArrayAggregationBase.cc.

◆ ptr_duplicate()

ArrayAggregationBase * agg_util::ArrayAggregationBase::ptr_duplicate ( )
override

virtual constructor i.e. clone

Definition at line 86 of file ArrayAggregationBase.cc.

◆ read()

bool agg_util::ArrayAggregationBase::read ( )
override

Base implementation that works for both joinNew and joinExisting. Sets ups constraints and things and then calls the subclass helper readAndAggregateGranules() for the specialized subclass behaviors.

Note
This implementation of read() will read all of the data for an aggregated variable. Child classes of this class can use specialized versions of serialize() to implement a different behavior so that data that are read in parts (e.g. slices of an Array) can also be written in parts. This can reduce access latency.
Exceptions
Canthrow BESError, minimally
Returns
whether it works

Definition at line 97 of file ArrayAggregationBase.cc.

◆ readConstrainedGranuleArraysAndAggregateDataHook()

void agg_util::ArrayAggregationBase::readConstrainedGranuleArraysAndAggregateDataHook ( )
protectedvirtual

The meat of the subclass impl of read(). Called from read() once this base class state is ready for the granule data.

Reimplemented in agg_util::ArrayJoinExistingAggregation, and agg_util::ArrayAggregateOnOuterDimension.

Definition at line 198 of file ArrayAggregationBase.cc.

◆ transferOutputConstraintsIntoGranuleTemplateHook()

void agg_util::ArrayAggregationBase::transferOutputConstraintsIntoGranuleTemplateHook ( )
protectedvirtual

subclass hook from read() to setup constraints on inner dims correctly

Reimplemented in agg_util::ArrayJoinExistingAggregation, and agg_util::ArrayAggregateOnOuterDimension.

Definition at line 190 of file ArrayAggregationBase.cc.


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