#ifndef ConfigurationRecord_HH
#define ConfigurationRecord_HH

#include <ctime>

#include "Configuration.hh"

class ConfigurationRecord : public RunRecord {

 public:
  ConfigurationRecord() : RunRecord() {}

  /*
  unsigned recordType() const {
    return _recordType;
  }

  void recordType(unsigned n) {
    _recordType=n;
  }

  unsigned recordTime() const {
    return _recordTime;
  }

  void recordTime(unsigned t=time(0)) {
    _recordTime=t;
  }
  */

  unsigned configurationNumber() const {
    return _configurationNumber;
  }

  void configurationNumber(unsigned n) {
    _configurationNumber=n;
  }

  unsigned numberOfEvents() const {
    return _numberOfEvents;
  }

  void numberOfEvents(unsigned n) {
    _numberOfEvents=n;
  }

  unsigned numberOfConfigurationEvents() const {
    return _numberOfConfigurationEvents;
  }

  void numberOfConfigurationEvents(unsigned n) {
    _numberOfConfigurationEvents=n;
  }

  /*
  unsigned numberOfShortWords() const {
    return _numberOfShortWords;
  }
  */
  void numberOfShortWords(unsigned n=(sizeof(Configuration)+1)/2) {
    _numberOfShortWords=n;
  }

  const Configuration* configuration() const {
    return &_configuration;
  }

  bool configuration(const Configuration *c) {
    if(c==0) return false;
    _configuration = (*c);
    return true;
  }


 private:
  unsigned _recordType;
  unsigned _recordTime;
  unsigned _configurationNumber;
  unsigned _numberOfEvents;
  unsigned _numberOfConfigurationEvents;
  unsigned _numberOfShortWords;
  Configuration _configuration;
};

#endif
