#ifndef STLOGGER_HH
#define STLOGGER_HH

/****************************************************************************
 *
 * Basic class for logging binary data.
 *
 ****************************************************************************/

#include "DataLogWriter.h"
#include <vector>

class STLogger :public DataLogWriter {
public:
  STLogger();
  ~STLogger();

  void addElement(int id,char *name);
  void setValue(int id, double val);
  // call DataLogWriter::write() if there's new data.
  void callWrite();

protected:
  // This is just a dummy, we set the fields in setValue.  The
  // setFields method is designed to be called from the write()
  // function, which means it would require a pointer to the
  // dtSimpleThreshold object to get info.  Makes more sense to me to
  // have the logger be a slave to the other guy.
  void setFields(){};

private:
  typedef struct{
    int id; // typecast the ssd type.
    DoubleData *dptr;
  }slval_t;
  typedef std::vector<slval_t>::iterator sli_t;
  std::vector<slval_t> dat;
  bool isnew;
}; // STLogger

#endif // STLOGGER_HH
