#ifndef FILE_MANAGER_H
#define FILE_MANAGER_H

#include <QString>
#include <QFile>
#include <qdir.h>

#include "protocol.h"

namespace FileManager{
const QString ExperimentDirPath  = QDir::currentPath()+"/../experiment_data";
const QString SampleDataFloder = ExperimentDirPath + "/sample_data";
const QString BaseLineFolder = ExperimentDirPath + "/base_line";
const QString AnalysisStateFolder = ExperimentDirPath + "/analysis_state";

struct ExperimentData {
    float sampleTemp;
    float dsc;
};

struct ExpeInfo
{
    QString sampleName;
    float sampleWeight;
    QString date;
    QString userName;
};

extern ExpeInfo _expeInfo;
extern QFile _expeFile;

void createExperimentFile();
void writeExperimentFile(const CommonData&);
void close();

void readExperimentFile(const QString fileName,QVector<ExperimentData>&);

void test();
};

#endif
