#ifndef AP_RAW_DATA_H
#define AP_RAW_DATA_H

#include<string>

namespace Astropulse {

const int NUM_SAMPLES_TO_COPY = 32768 * 2;

std::string make_raw_data_string(std::string wufilename, long peak_bin);
int ap_signal_to_miniwufile(ap_signal& signal, std::string& wufilename, int no_peak_bin_in_name, std::string dir_prefix);
int update_ap_signal_db_with_raw_data(long signalid, std::string raw_data);
// std::string fetch_raw_data_from_ap_signal(long signalid);
std::string get_outfilename(std::string wufilename, int peak_bin);
std::string get_wu_header(FILE * wufile);
std::string get_wu_raw_data(FILE * wufile, long peak_bin);
bool get_xml(FILE * file, int& type, std::string& tag, std::string& content, std::string& whole_xml);
char getc_err_on_EOF(FILE* file);

}

#endif
