15 #include <sys/types.h>
21 #include <boost/filesystem/operations.hpp>
22 #include <boost/filesystem/path.hpp>
23 #include <boost/progress.hpp>
24 #include <boost/regex.hpp>
29 #ifndef __DATAGATHERER_H__
30 #define __DATAGATHERER_H__
97 datagatherer(boost::filesystem::path bdir, boost::filesystem::path fundir,
int numvar){
150 this->standardstep2 = 0;
152 this->buffersize = this->newfilethreshold = -1;
154 this->DataCollectedbase_dir =
"";
165 this->slavemap[filename] = blankinfo;
181 boost::filesystem::path called_dir);
194 timer & process_timer);
205 double *current_params,
217 double *current_params);
233 boost::filesystem::path target_file);
253 std::vector< point > & successful_resolves);
263 std::vector< point > current_data);
289 std::string & next_data,
290 std::map< int, point> successful_resolves);
306 std::vector < boost::filesystem::path > folders_with_data,
307 boost::filesystem::path run_to_analyze,
314 std::vector< boost::filesystem::path >
GetFoldersForData(boost::filesystem::path dir);
322 boost::filesystem::path base_output_folder_name,
323 int & output_folder_index);
332 boost::filesystem::path left_folder,
333 boost::filesystem::path right_folder,
334 boost::filesystem::path output_folder_name,
346 boost::filesystem::path base_output_folder_name,
int parser_index,
bool mergefailed);
357 void rest_of_files(std::ifstream & datafile, std::string & output_buffer, std::ofstream & outputfile,
358 std::vector < boost::filesystem::path > filelist,
int file_index,
int parser_index);
366 bool endoffile_stuff(std::ifstream & datafile,
int & file_index, std::vector < boost::filesystem::path > filelist);
374 bool ReadPoint(std::ifstream & fin, std::string & data,
int parser_index);
382 bool ReadPoint(std::ifstream & fin,
int & next_index, std::string & data,
int parser_index);
void MergeFolders(std::string file_to_gather, boost::filesystem::path left_folder, boost::filesystem::path right_folder, boost::filesystem::path output_folder_name, int parser_index)
std::map< int, point > ReadSuccessfulResolves()
std::vector< int > gather_parser_indices
bool ReadPoint(std::ifstream &fin, std::string &data, int parser_index)
void GatherDataFromMenu()
Class for caching/storing gathered temp output files.
std::vector< point > GatherFinalizedDataToMemory(boost::filesystem::path folder_with_data)
std::map< std::string, fileinfo > slavemap
boost::filesystem::path DataCollectedbase_dir
std::vector< std::string > ParamNames
boost::filesystem::path GetAvailableRuns()
datagatherer(int numvar, boost::filesystem::path loc)
std::string real_filename
void DataManagementMainMenu(runinfo ¶motopy_info)
std::vector< boost::filesystem::path > GetFoldersForData(boost::filesystem::path dir)
std::string runningfile
file text
void AppendOnlyPosReal(std::string orig_filename, double *current_params, ProgSettings ¶motopy_settings)
std::vector< std::string > gather_savefiles
bool GatherDataForFails(std::vector< point > terminal_fails, std::vector< point > &successful_resolves)
std::string ParseFailedPaths(std::ifstream &fin)
the parser for the failed_paths file type, which is output from bertini.
void rest_of_files(std::ifstream &datafile, std::string &output_buffer, std::ofstream &outputfile, std::vector< boost::filesystem::path > filelist, int file_index, int parser_index)
std::vector< point > CompareInitial_Gathered(std::vector< point > terminal_fails, std::vector< point > current_data)
int num_found_solns
the most recent number of found solutions.
boost::filesystem::path MakeTargetFilename(std::string filename)
int filesize
number of characters.
std::vector< std::vector< std::pair< std::string, std::string > > > ParseSolutionsFile_ActualSolutions(std::ifstream &fin)
bool SlaveCollectAndWriteData(double *current_params, ProgSettings ¶motopy_settings, timer &process_timer)
void CollectSpecificFiles(std::string file_to_gather, std::vector< boost::filesystem::path > folders_with_data, boost::filesystem::path run_to_analyze, int parser_index, bool mergefailed)
void WriteData(std::string outstring, boost::filesystem::path target_file)
void IncrementOutputFolder(boost::filesystem::path &output_folder_name, boost::filesystem::path base_output_folder_name, int &output_folder_index)
boost::filesystem::path base_dir
bool endoffile_stuff(std::ifstream &datafile, int &file_index, std::vector< boost::filesystem::path > filelist)
void SlaveSetup(ProgSettings ¶motopy_settings, runinfo ¶motopy_info, int myid, boost::filesystem::path called_dir)
void add_file_to_save(std::string filename)
std::string ParseSolutionsFile(std::ifstream &fin)
void CheckForResolvedFailedPoint(std::string file_to_gather, int next_index, std::string &next_data, std::map< int, point > successful_resolves)
int parser_index
the parser switch index.
void finalize_run_to_file(std::string file_to_gather, boost::filesystem::path source_folder, boost::filesystem::path base_output_folder_name, int parser_index, bool mergefailed)
Class for gathering data, from failed path analysis, and from completed runs.
void WriteUnsuccessfulResolves(std::map< int, point > successful_resolves)
A class that stores the general program settings of Paramotopy.
int filecount
current index of file. like 0 in real_solutions0
A class for the input file parser.
void AppendData(std::string orig_filename, double *current_params)
int GetFileParserIndex(std::string filename)
boost::filesystem::path fundamental_dir
datagatherer(boost::filesystem::path bdir, boost::filesystem::path fundir, int numvar)
Capable of timing arbitrary categories of processes, using a map of timer_data's. ...
boost::filesystem::path run_to_analyze