/////////////////////////////////////////////////////////////////////////////////
//
// PURPOSE:  DropWeight Log Class.
// AUTHOR:   Rob McEwen.
// DATE:     01/3/9
// COMMENTS: 
//
////////////////////////////////////////////////////////////////////////////////
//

#ifndef ADAPTIVESAMPLERLOG_H
#define ADAPTIVESAMPLERLOG_H

#define AdaptiveSamplerLogName "AdaptiveSampler"

#include "DataLogWriter.h"
#include "IntegerData.h"
//#include "CharData.h"
#include "ShortData.h"
#include "DoubleData.h"
#include "TimeTag.h"
#include "ArmTheGulper.h"

#define MAXSTOREDDEPTHS 10
#define MAXSTOREDPROFILES 20
#define MAXNUMPEAKSIGNALS 2

class AdaptiveSampler;

class AdaptiveSamplerLog: public DataLogWriter {

public:

  ///////////////////////////////////////////////////////////////////
  // Constructor
  // [input] fileFormat: Specifies either DataLog::AsciiFormat or 
  //         DataLog::BinaryFormat.
  AdaptiveSamplerLog(AdaptiveSampler *adaptiveSampler, 
		     DataLog::FileFormat fileFormat);

  ~AdaptiveSamplerLog();

protected:
  AdaptiveSampler *_adaptiveSampler;
  
  ShortData *_gulper[NGULPERS]; 
  ShortData *_gnum, *_depthCheck, *_tempCheck, *_salCheck, *_fl676Check, *_bb470Check, *_bb676Check, *_peakCheck[MAXNUMPEAKSIGNALS], *_pk_ctrl[MAXNUMPEAKSIGNALS], *_upwellingCheck, *_frontCheck;
  DoubleData *_lat, *_lon, *_sal, *_temp, *_depth, *_fl676, *_bb470, *_bb676, *_rhod;
  DoubleData *_fl676_bkgnd, *_bb470_bkgnd, *_bb676_bkgnd, *_rhod_bkgnd, *_fl676_lp, *_bb470_lp, *_bb676_lp, *_rhod_lp;
  DoubleData *_peak_baseline[MAXNUMPEAKSIGNALS], *_peak_saved[MAXNUMPEAKSIGNALS];
  DoubleData *_tempDep[MAXSTOREDDEPTHS], *_temp_diff[MAXSTOREDPROFILES], *_temp_diff_lp[MAXSTOREDPROFILES], *_flMaxOnPrecedingProfile, *_dep_flMaxOnPrecedingProfile, *_flMaxOnProfile_avg, *_rhodMaxOnPrecedingProfile, *_dep_rhodMaxOnPrecedingProfile;

  char strName[64];


  ///////////////////////////////////////////////////////////////////
  // Set values in record array elements. This virtual method is called
  // by DataLogWriter::write()
  virtual void setFields();
};

#endif
