Skip to content

Commit

Permalink
fixed stage atl08 in icesat2 parms
Browse files Browse the repository at this point in the history
  • Loading branch information
jpswinski committed Oct 14, 2024
1 parent 2eaaeac commit 0da7124
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
6 changes: 6 additions & 0 deletions datasets/icesat2/package/Icesat2Fields.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,12 @@ void Icesat2Fields::fromLua (lua_State* L, int index)
stages[STAGE_YAPC] = true;
}

// handle atl08 class options
if(atl08Class.anyEnabled())
{
stages[STAGE_ATL08] = true;
}

// handle PhoREAL options
if(phoreal.provided)
{
Expand Down
15 changes: 15 additions & 0 deletions packages/core/FieldEnumeration.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class FieldEnumeration: public Field
virtual ~FieldEnumeration (void) override = default;

bool enabled (int i) const;
bool anyEnabled (void) const;

FieldEnumeration<T,N>& operator= (const FieldEnumeration<T,N>& array);
bool operator[] (T i) const;
Expand Down Expand Up @@ -154,6 +155,20 @@ bool FieldEnumeration<T,N>::enabled(int i) const
return values[i];
}

/*----------------------------------------------------------------------------
* anyEnabled
*----------------------------------------------------------------------------*/
template <class T, int N>
bool FieldEnumeration<T,N>::anyEnabled(void) const
{
bool status = false;
for(int i = 0; i < N; i++)
{
status = status || values[i];
}
return status;
}

/*----------------------------------------------------------------------------
* operator=
*----------------------------------------------------------------------------*/
Expand Down

0 comments on commit 0da7124

Please sign in to comment.