diff --git a/datasets/icesat2/package/Icesat2Fields.cpp b/datasets/icesat2/package/Icesat2Fields.cpp index ec82fdfd..e3632857 100644 --- a/datasets/icesat2/package/Icesat2Fields.cpp +++ b/datasets/icesat2/package/Icesat2Fields.cpp @@ -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) { diff --git a/packages/core/FieldEnumeration.h b/packages/core/FieldEnumeration.h index efb843db..d50243e0 100644 --- a/packages/core/FieldEnumeration.h +++ b/packages/core/FieldEnumeration.h @@ -59,6 +59,7 @@ class FieldEnumeration: public Field virtual ~FieldEnumeration (void) override = default; bool enabled (int i) const; + bool anyEnabled (void) const; FieldEnumeration& operator= (const FieldEnumeration& array); bool operator[] (T i) const; @@ -154,6 +155,20 @@ bool FieldEnumeration::enabled(int i) const return values[i]; } +/*---------------------------------------------------------------------------- + * anyEnabled + *----------------------------------------------------------------------------*/ +template +bool FieldEnumeration::anyEnabled(void) const +{ + bool status = false; + for(int i = 0; i < N; i++) + { + status = status || values[i]; + } + return status; +} + /*---------------------------------------------------------------------------- * operator= *----------------------------------------------------------------------------*/