#include "mussa_class.hh"
#include "time.h"
+
int main(int argc, char **argv)
{
Mussa overlord;
+ char run_mode;
char * para_file, * ana_file;
- string an_arg;
time_t t1, t2, begin, end;
double setuptime, seqloadtime, seqcomptime, nwaytime, savetime, totaltime;
- string run_mode;
int seq_num;
begin = time(NULL);
- // need more sophisticated arg reading structure
- // support -w and -t override options...other stuff??
- an_arg = * ++argv;
-
- if (an_arg == "-v")
- {
- seq_num = atoi(* ++argv);
- ana_file = * ++argv;
- run_mode = "v";
- }
- else
- {
- para_file = (char*) an_arg.c_str();
- run_mode = "f";
- }
+ run_mode = overlord.parse_args(argc, argv);
- if (run_mode == "v")
- {
- cout << "load file = " << ana_file << " seq num = " << seq_num << endl;
- overlord.load_old(ana_file, seq_num);
- }
- else if (run_mode == "f")
+ if ((run_mode == 'f') || (run_mode == 'n'))
{
t1 = time(NULL);
- overlord.setup(para_file);
+ overlord.setup();
t2 = time(NULL);
setuptime = difftime(t2, t1);
cout << "fum\n";
t1 = time(NULL);
- overlord.save_old();
+ overlord.save();
t2 = time(NULL);
savetime = difftime(t2, t1);
cout << totaltime << "\n";
}
+ if (run_mode == 'v')
+ overlord.load();
- if (run_mode == "v")
+ if ((run_mode == 'f') || (run_mode == 'v'))
overlord.FuckingPieceOfShit(1000,500);
}