[boinc-app-seti] 01/03: Imported Upstream version 7.28~svn3013
Gianfranco Costamagna
locutusofborg-guest at moszumanska.debian.org
Fri Aug 7 08:52:20 UTC 2015
This is an automated email from the git hooks/post-receive script.
locutusofborg-guest pushed a commit to branch master
in repository boinc-app-seti.
commit 6c6b6d2190af6ff5ffc4ee953a3ab7b49fb44730
Author: Gianfranco Costamagna <costamagnagianfranco at yahoo.it>
Date: Fri Aug 7 10:27:25 2015 +0200
Imported Upstream version 7.28~svn3013
---
assimilator/sah_assimilate_handler.cpp | 18 +-
configure.ac | 3 +-
db/schema_master.cpp | 2180 +++++++++++++-------------------
db/schema_master.h | 141 ++-
db/schema_to_class.awk | 3 +-
db/sqlrow.cpp | 21 +-
db/sqlrow.h | 3 +-
m4/sah_check_cfitsio.m4 | 52 +
m4/sah_check_seti_gbt.m4 | 50 +
splitter_pfb/angdist.cpp | 79 --
splitter_pfb/angdist.h | 33 -
splitter_pfb/coordcvt.cpp | 179 ---
splitter_pfb/coordcvt.h | 40 -
splitter_pfb/db_fns.cpp | 199 ---
splitter_pfb/db_fns.h | 48 -
splitter_pfb/dotransform.cpp | 218 ----
splitter_pfb/dotransform.h | 56 -
splitter_pfb/encode.cpp | 93 --
splitter_pfb/encode.h | 39 -
splitter_pfb/fftw.h | 413 ------
splitter_pfb/four1.cpp | 88 --
splitter_pfb/four1.h | 31 -
splitter_pfb/hr_min_sec.cpp | 131 --
splitter_pfb/hr_min_sec.h | 106 --
splitter_pfb/makebufs.cpp | 139 --
splitter_pfb/makebufs.h | 38 -
splitter_pfb/mb_read_blocks_dr2.cpp | 8 +-
splitter_pfb/mb_splittypes.h | 114 --
splitter_pfb/mb_validrun.cpp | 2 +-
splitter_pfb/mb_wufiles.cpp | 18 +-
splitter_pfb/polyphase.cpp | 149 ---
splitter_pfb/polyphase.h | 26 -
splitter_pfb/randomdata.cpp | 77 --
splitter_pfb/readheader.cpp | 225 ----
splitter_pfb/readheader.h | 42 -
splitter_pfb/readtape.cpp | 333 -----
splitter_pfb/readtape.h | 85 --
splitter_pfb/splitter.cpp | 717 -----------
splitter_pfb/splitter.h | 132 --
splitter_pfb/squarewave.cpp | 75 --
splitter_pfb/uttolst.h | 2 -
splitter_pfb/validrun.cpp | 181 ---
splitter_pfb/validrun.h | 33 -
splitter_pfb/writeheader.cpp | 105 --
splitter_pfb/writeheader.h | 39 -
splitter_pfb/wufiles.cpp | 679 ----------
splitter_pfb/wufiles.h | 39 -
validate/sah_validate.cpp | 72 +-
48 files changed, 1214 insertions(+), 6340 deletions(-)
diff --git a/assimilator/sah_assimilate_handler.cpp b/assimilator/sah_assimilate_handler.cpp
index 9f682ee..35a9079 100644
--- a/assimilator/sah_assimilate_handler.cpp
+++ b/assimilator/sah_assimilate_handler.cpp
@@ -178,7 +178,7 @@ int assimilate_handler(
if (boinc_wu.canonical_resultid) {
log_messages.printf(SCHED_MSG_LOG::MSG_DEBUG,
- "[%s] Canonical result is %d. SETI workunit ID is %lld.\n",
+ "[%s] Canonical result is %ld. SETI workunit ID is %lld.\n",
boinc_wu.name, boinc_wu.canonical_resultid, seti_wu_id
);
} else {
@@ -241,7 +241,7 @@ int assimilate_handler(
}
}
log_messages.printf(SCHED_MSG_LOG::MSG_DEBUG,
- "[%s] Result %ld : using receiver_cfg %d and analysis_cfg %d\n",
+ "[%s] Result %ld : using receiver_cfg %ld and analysis_cfg %ld\n",
boinc_wu.name, boinc_wu.canonical_resultid, receiver_cfg.id, analysis_cfg.id);
// Insert a sah result
@@ -249,20 +249,20 @@ int assimilate_handler(
sah_result_id = sah_result.insert();
if (sah_result_id) {
log_messages.printf(SCHED_MSG_LOG::MSG_NORMAL,
- "[%s] Inserted result. Boinc result id is %d. Sah result id is %lld.\n",
+ "[%s] Inserted result. Boinc result id is %ld. Sah result id is %lld.\n",
boinc_wu.name, boinc_canonical_result.id,
(long long)sah_result_id
);
} else {
if (sql_last_error_code() == -239 || sql_last_error_code() == -268) {
log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,
- "[%s] Could not insert duplicate result. SQLCODE is %ld. SQLMSG is %s.\n",
+ "[%s] Could not insert duplicate result. SQLCODE is %d. SQLMSG is %s.\n",
boinc_wu.name, sql_last_error_code(), sql_error_message()
);
return 0; // non-fatal - we will never see this result again
} else {
log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,
- "[%s] Could not insert result. SQLCODE is %ld. SQLMSG is %s.\n",
+ "[%s] Could not insert result. SQLCODE is %d. SQLMSG is %s.\n",
boinc_wu.name, sql_last_error_code(), sql_error_message()
);
return -1; // fatal - non-dup error
@@ -400,7 +400,7 @@ int insert_signals( T& signal,
"[%s] Inserted %d out of %d %s(s) for sah result %"INT8_FMT" \n",
wu_name, signal_inserted_count, signal_count, signal_name, INT8_PRINT_CAST(sah_result_id)
);
-
+ return 0;
}
@@ -521,11 +521,10 @@ int get_science_configs(WORKUNIT& boinc_wu, long long seti_wu_id, receiver_confi
static int first_time=1, current_settings_id=0, current_analysis_config_id=0, current_receiver_config_id=0;
settings settings;
-#if 1
settings_id = parse_settings_id(boinc_wu);
if (settings_id) {
log_messages.printf(SCHED_MSG_LOG::MSG_DEBUG,
- "[%s] Name string contains settings id %ld\n",
+ "[%s] Name string contains settings id %d\n",
boinc_wu.name, settings_id
);
} else {
@@ -534,7 +533,6 @@ int get_science_configs(WORKUNIT& boinc_wu, long long seti_wu_id, receiver_confi
boinc_wu.name
);
}
-#endif
#if 0
// temp hack
@@ -566,7 +564,7 @@ int get_science_configs(WORKUNIT& boinc_wu, long long seti_wu_id, receiver_confi
);
} else {
log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,
- "[%s] Could not obtain science master DB row for settings table id %ld. SQLCODE is %d\n",
+ "[%s] Could not obtain science master DB row for settings table id %d. SQLCODE is %d\n",
boinc_wu.name, settings_id, sql_last_error_code()
);
return(-1);
diff --git a/configure.ac b/configure.ac
index a9844d7..f8c4a89 100644
--- a/configure.ac
+++ b/configure.ac
@@ -379,7 +379,8 @@ SAH_SERVER_REQUIRES([mysql],[SAH_CHECK_MYSQL],["${no_mysql}" = yes])
SAH_SERVER_REQUIRES([informix],[SAH_CHECK_INFORMIX],["${no_informix}" = yes])
SAH_SERVER_REQUIRES([setilib],[SAH_FIND_SETILIB],["${no_setilib}" = yes])
SAH_SERVER_REQUIRES([healpix],[SAH_CHECK_HEALPIX],["${no_healpix}" = yes])
-
+SAH_SERVER_REQUIRES([cfitsio],[SAH_CHECK_CFITSIO],["${no_cfitsio}" = yes])
+SAH_SERVER_REQUIRES([seti_gbt],[SAH_CHECK_SETI_GBT],["${no_seti_gbt}" = yes])
# Checks for header files.
AC_HEADER_STDC
diff --git a/db/schema_master.cpp b/db/schema_master.cpp
index 504ea9b..47516e4 100644
--- a/db/schema_master.cpp
+++ b/db/schema_master.cpp
@@ -28,10 +28,10 @@ using namespace ifx;
const char *db_name="sah2b at sah_master_tcp";
int db_is_open;
-template <> const char *const db_type<coordinate_t>::type_name="coordinate_t";
-template <> const char *db_type<coordinate_t>::_search_tag=type_name;
+template <> const char * const db_type<coordinate_t>::type_name="coordinate_t";
+template <> const char * db_type<coordinate_t>::_search_tag=type_name;
template <> const int db_type<coordinate_t>::_nfields=3;
-template <> const char *const db_type<coordinate_t>::column_names[3]= {"time","ra","dec"};
+template <> const char * const db_type<coordinate_t>::column_names[3]= {"time","ra","dec"};
coordinate_t::coordinate_t() :
db_type<coordinate_t>(*this),
@@ -83,9 +83,7 @@ std::string coordinate_t::update_format() const {
std::ostringstream rv("");
rv << "ROW(";
- for (int i=1; i<3; i++) {
- rv << "?,";
- }
+ for (int i=1; i<3; i++) rv << "?,";
rv << "?";
rv << ")";
@@ -99,9 +97,7 @@ std::string coordinate_t::insert_format() const {
std::string coordinate_t::select_format() const {
std::string rv("");
- for (int i=0; i<2; i++) {
- rv+="?,";
- }
+ for (int i=0; i<2; i++) rv+="?,";
rv+="?";
return rv;
}
@@ -144,7 +140,7 @@ void coordinate_t::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> time;
}
@@ -152,7 +148,7 @@ void coordinate_t::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> ra;
}
@@ -160,7 +156,7 @@ void coordinate_t::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> dec;
}
@@ -187,10 +183,10 @@ void coordinate_t::parse(const std::string &s) {
parse(row);
}
-template <> const char *const db_type<chirp_parameter_t>::type_name="chirp_parameter_t";
-template <> const char *db_type<chirp_parameter_t>::_search_tag=type_name;
+template <> const char * const db_type<chirp_parameter_t>::type_name="chirp_parameter_t";
+template <> const char * db_type<chirp_parameter_t>::_search_tag=type_name;
template <> const int db_type<chirp_parameter_t>::_nfields=2;
-template <> const char *const db_type<chirp_parameter_t>::column_names[2]= {"chirp_limit","fft_len_flags"};
+template <> const char * const db_type<chirp_parameter_t>::column_names[2]= {"chirp_limit","fft_len_flags"};
chirp_parameter_t::chirp_parameter_t() :
db_type<chirp_parameter_t>(*this),
@@ -239,9 +235,7 @@ std::string chirp_parameter_t::update_format() const {
std::ostringstream rv("");
rv << "ROW(";
- for (int i=1; i<2; i++) {
- rv << "?,";
- }
+ for (int i=1; i<2; i++) rv << "?,";
rv << "?";
rv << ")";
@@ -255,9 +249,7 @@ std::string chirp_parameter_t::insert_format() const {
std::string chirp_parameter_t::select_format() const {
std::string rv("");
- for (int i=0; i<1; i++) {
- rv+="?,";
- }
+ for (int i=0; i<1; i++) rv+="?,";
rv+="?";
return rv;
}
@@ -297,7 +289,7 @@ void chirp_parameter_t::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> chirp_limit;
}
@@ -305,7 +297,7 @@ void chirp_parameter_t::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> fft_len_flags;
}
@@ -328,10 +320,10 @@ void chirp_parameter_t::parse(const std::string &s) {
parse(row);
}
-template <> const char *const db_type<subband_description_t>::type_name="subband_description_t";
-template <> const char *db_type<subband_description_t>::_search_tag=type_name;
+template <> const char * const db_type<subband_description_t>::type_name="subband_description_t";
+template <> const char * db_type<subband_description_t>::_search_tag=type_name;
template <> const int db_type<subband_description_t>::_nfields=4;
-template <> const char *const db_type<subband_description_t>::column_names[4]= {"number","center","base","sample_rate"};
+template <> const char * const db_type<subband_description_t>::column_names[4]= {"number","center","base","sample_rate"};
subband_description_t::subband_description_t() :
db_type<subband_description_t>(*this),
@@ -386,9 +378,7 @@ std::string subband_description_t::update_format() const {
std::ostringstream rv("");
rv << "ROW(";
- for (int i=1; i<4; i++) {
- rv << "?,";
- }
+ for (int i=1; i<4; i++) rv << "?,";
rv << "?";
rv << ")";
@@ -402,9 +392,7 @@ std::string subband_description_t::insert_format() const {
std::string subband_description_t::select_format() const {
std::string rv("");
- for (int i=0; i<3; i++) {
- rv+="?,";
- }
+ for (int i=0; i<3; i++) rv+="?,";
rv+="?";
return rv;
}
@@ -450,7 +438,7 @@ void subband_description_t::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> number;
}
@@ -458,7 +446,7 @@ void subband_description_t::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> center;
}
@@ -466,7 +454,7 @@ void subband_description_t::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> base;
}
@@ -474,7 +462,7 @@ void subband_description_t::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> sample_rate;
}
@@ -505,10 +493,10 @@ void subband_description_t::parse(const std::string &s) {
parse(row);
}
-template <> const char *const db_type<data_description_t>::type_name="data_description_t";
-template <> const char *db_type<data_description_t>::_search_tag=type_name;
+template <> const char * const db_type<data_description_t>::type_name="data_description_t";
+template <> const char * db_type<data_description_t>::_search_tag=type_name;
template <> const int db_type<data_description_t>::_nfields=9;
-template <> const char *const db_type<data_description_t>::column_names[9]= {"start_ra","start_dec","end_ra","end_dec","true_angle_range","time_recorded","time_recorded_jd","nsamples","coords"};
+template <> const char * const db_type<data_description_t>::column_names[9]= {"start_ra","start_dec","end_ra","end_dec","true_angle_range","time_recorded","time_recorded_jd","nsamples","coords"};
data_description_t::data_description_t() :
db_type<data_description_t>(*this),
@@ -584,9 +572,7 @@ std::string data_description_t::update_format() const {
std::ostringstream rv("");
rv << "ROW(";
- for (int i=1; i<9; i++) {
- rv << "?,";
- }
+ for (int i=1; i<9; i++) rv << "?,";
rv << "?";
rv << ")";
@@ -600,9 +586,7 @@ std::string data_description_t::insert_format() const {
std::string data_description_t::select_format() const {
std::string rv("");
- for (int i=0; i<8; i++) {
- rv+="?,";
- }
+ for (int i=0; i<8; i++) rv+="?,";
rv+="?";
return rv;
}
@@ -687,7 +671,7 @@ void data_description_t::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> start_ra;
}
@@ -695,7 +679,7 @@ void data_description_t::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> start_dec;
}
@@ -703,7 +687,7 @@ void data_description_t::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> end_ra;
}
@@ -711,7 +695,7 @@ void data_description_t::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> end_dec;
}
@@ -719,7 +703,7 @@ void data_description_t::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> true_angle_range;
}
@@ -727,14 +711,10 @@ void data_description_t::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::string::size_type epos=sub.find("<",pos);
- if (epos==std::string::npos) {
- epos=sub.find('\n',pos);
- }
- if (epos==std::string::npos) {
- epos=pos+strlen(sub.c_str()+pos);
- }
+ if (epos==std::string::npos) epos=sub.find('\n',pos);
+ if (epos==std::string::npos) epos=pos+strlen(sub.c_str()+pos);
std::vector<unsigned char> in(xml_decode_string<unsigned char>((const char *)sub.c_str()+pos,epos-pos));
strncpy(time_recorded,(const char *)&(in.front()),std::min(in.size(),(size_t)255));
time_recorded[std::min(in.size(),(size_t)254)]=0;
@@ -743,7 +723,7 @@ void data_description_t::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> time_recorded_jd;
}
@@ -751,7 +731,7 @@ void data_description_t::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> nsamples;
}
@@ -816,10 +796,10 @@ void data_description_t::parse(const std::string &s) {
parse(row);
}
-template <> const char *const db_table<receiver_config>::table_name="receiver_config";
-template <> const char *db_table<receiver_config>::_search_tag=table_name;
+template <> const char * const db_table<receiver_config>::table_name="receiver_config";
+template <> const char * db_table<receiver_config>::_search_tag=table_name;
template <> const int db_table<receiver_config>::_nfields=16;
-template <> const char *const db_table<receiver_config>::column_names[16]= {"id","s4_id","name","beam_width","center_freq","latitude","longitude","elevation","diameter","az_orientation","az_corr_coeff","zen_corr_coeff","array_az_ellipse","array_za_ellipse","array_angle","min_vgc"};
+template <> const char * const db_table<receiver_config>::column_names[16]= {"id","s4_id","name","beam_width","center_freq","latitude","longitude","elevation","diameter","az_orientation","az_corr_coeff","zen_corr_coeff","array_az_ellipse","array_za_ellipse","array_angle","min_vgc"};
receiver_config::receiver_config() :
db_table<receiver_config>(*this,-1),
@@ -921,9 +901,7 @@ receiver_config &receiver_config::operator =(const receiver_config &a) {
std::string receiver_config::update_format() const {
std::ostringstream rv("");
- for (int i=2; i<16; i++) {
- rv << "?,";
- }
+ for (int i=2; i<16; i++) rv << "?,";
rv << "?";
return rv.str();
}
@@ -935,9 +913,7 @@ std::string receiver_config::insert_format() const {
std::string receiver_config::select_format() const {
std::string rv("");
- for (int i=0; i<15; i++) {
- rv+="?,";
- }
+ for (int i=0; i<15; i++) rv+="?,";
rv+="?";
return rv;
}
@@ -946,9 +922,7 @@ std::string receiver_config::print(int full_subtables, int show_ids, int no_refs
std::ostringstream rv("");
rv.precision(14);
- if (show_ids) {
- rv << id;
- }
+ if (show_ids) rv << id;
rv << ',';
rv << s4_id;
rv << ',';
@@ -1011,9 +985,7 @@ std::string receiver_config::print_xml(int full_subtables, int show_ids, int no_
rv.precision(14);
rv << xml_indent() << '<' << tag << ">\n";
xml_indent(2);
- if (show_ids) {
- rv << xml_indent() << "<id>" << id << "</id>\n";
- }
+ if (show_ids) rv << xml_indent() << "<id>" << id << "</id>\n";
rv << xml_indent() << "<s4_id>" << s4_id << "</s4_id>\n";
{
std::string enc_field=xml_encode_string(name,std::min(strlen(name),sizeof(name)));
@@ -1063,7 +1035,7 @@ void receiver_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> id;
}
@@ -1071,7 +1043,7 @@ void receiver_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> s4_id;
}
@@ -1079,14 +1051,10 @@ void receiver_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::string::size_type epos=sub.find("<",pos);
- if (epos==std::string::npos) {
- epos=sub.find('\n',pos);
- }
- if (epos==std::string::npos) {
- epos=pos+strlen(sub.c_str()+pos);
- }
+ if (epos==std::string::npos) epos=sub.find('\n',pos);
+ if (epos==std::string::npos) epos=pos+strlen(sub.c_str()+pos);
std::vector<unsigned char> in(xml_decode_string<unsigned char>((const char *)sub.c_str()+pos,epos-pos));
strncpy(name,(const char *)&(in.front()),std::min(in.size(),(size_t)255));
name[std::min(in.size(),(size_t)254)]=0;
@@ -1095,7 +1063,7 @@ void receiver_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> beam_width;
}
@@ -1103,7 +1071,7 @@ void receiver_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> center_freq;
}
@@ -1111,7 +1079,7 @@ void receiver_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> latitude;
}
@@ -1119,7 +1087,7 @@ void receiver_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> longitude;
}
@@ -1127,7 +1095,7 @@ void receiver_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> elevation;
}
@@ -1135,7 +1103,7 @@ void receiver_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> diameter;
}
@@ -1143,7 +1111,7 @@ void receiver_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> az_orientation;
}
@@ -1181,7 +1149,7 @@ void receiver_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> array_az_ellipse;
}
@@ -1189,7 +1157,7 @@ void receiver_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> array_za_ellipse;
}
@@ -1197,7 +1165,7 @@ void receiver_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> array_angle;
}
@@ -1205,7 +1173,7 @@ void receiver_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> min_vgc;
}
@@ -1300,10 +1268,10 @@ void receiver_config::parse(const std::string &s) {
parse(row);
}
-template <> const char *const db_table<recorder_config>::table_name="recorder_config";
-template <> const char *db_table<recorder_config>::_search_tag=table_name;
+template <> const char * const db_table<recorder_config>::table_name="recorder_config";
+template <> const char * db_table<recorder_config>::_search_tag=table_name;
template <> const int db_table<recorder_config>::_nfields=6;
-template <> const char *const db_table<recorder_config>::column_names[6]= {"id","name","bits_per_sample","sample_rate","beams","version"};
+template <> const char * const db_table<recorder_config>::column_names[6]= {"id","name","bits_per_sample","sample_rate","beams","version"};
recorder_config::recorder_config() :
db_table<recorder_config>(*this,-1),
@@ -1363,9 +1331,7 @@ recorder_config &recorder_config::operator =(const recorder_config &a) {
std::string recorder_config::update_format() const {
std::ostringstream rv("");
- for (int i=2; i<6; i++) {
- rv << "?,";
- }
+ for (int i=2; i<6; i++) rv << "?,";
rv << "?";
return rv.str();
}
@@ -1377,9 +1343,7 @@ std::string recorder_config::insert_format() const {
std::string recorder_config::select_format() const {
std::string rv("");
- for (int i=0; i<5; i++) {
- rv+="?,";
- }
+ for (int i=0; i<5; i++) rv+="?,";
rv+="?";
return rv;
}
@@ -1388,9 +1352,7 @@ std::string recorder_config::print(int full_subtables, int show_ids, int no_refs
std::ostringstream rv("");
rv.precision(14);
- if (show_ids) {
- rv << id;
- }
+ if (show_ids) rv << id;
rv << ',';
rv << "'" << name << "'";
rv << ',';
@@ -1411,9 +1373,7 @@ std::string recorder_config::print_xml(int full_subtables, int show_ids, int no_
rv.precision(14);
rv << xml_indent() << '<' << tag << ">\n";
xml_indent(2);
- if (show_ids) {
- rv << xml_indent() << "<id>" << id << "</id>\n";
- }
+ if (show_ids) rv << xml_indent() << "<id>" << id << "</id>\n";
{
std::string enc_field=xml_encode_string(name,std::min(strlen(name),sizeof(name)));
rv << xml_indent() << "<name>";
@@ -1437,7 +1397,7 @@ void recorder_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> id;
}
@@ -1445,14 +1405,10 @@ void recorder_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::string::size_type epos=sub.find("<",pos);
- if (epos==std::string::npos) {
- epos=sub.find('\n',pos);
- }
- if (epos==std::string::npos) {
- epos=pos+strlen(sub.c_str()+pos);
- }
+ if (epos==std::string::npos) epos=sub.find('\n',pos);
+ if (epos==std::string::npos) epos=pos+strlen(sub.c_str()+pos);
std::vector<unsigned char> in(xml_decode_string<unsigned char>((const char *)sub.c_str()+pos,epos-pos));
strncpy(name,(const char *)&(in.front()),std::min(in.size(),(size_t)64));
name[std::min(in.size(),(size_t)63)]=0;
@@ -1461,7 +1417,7 @@ void recorder_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> bits_per_sample;
}
@@ -1469,7 +1425,7 @@ void recorder_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> sample_rate;
}
@@ -1477,7 +1433,7 @@ void recorder_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> beams;
}
@@ -1485,7 +1441,7 @@ void recorder_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> version;
}
@@ -1524,10 +1480,10 @@ void recorder_config::parse(const std::string &s) {
parse(row);
}
-template <> const char *const db_table<splitter_config>::table_name="splitter_config";
-template <> const char *db_table<splitter_config>::_search_tag=table_name;
+template <> const char * const db_table<splitter_config>::table_name="splitter_config";
+template <> const char * db_table<splitter_config>::_search_tag=table_name;
template <> const int db_table<splitter_config>::_nfields=12;
-template <> const char *const db_table<splitter_config>::column_names[12]= {"id","version","data_type","fft_len","ifft_len","filter","window","samples_per_wu","highpass","blanker_filter","pfb_ntaps","pfb_width_factor"};
+template <> const char * const db_table<splitter_config>::column_names[12]= {"id","version","data_type","fft_len","ifft_len","filter","window","samples_per_wu","highpass","blanker_filter","pfb_ntaps","pfb_width_factor"};
splitter_config::splitter_config() :
db_table<splitter_config>(*this,-1),
@@ -1605,9 +1561,7 @@ splitter_config &splitter_config::operator =(const splitter_config &a) {
std::string splitter_config::update_format() const {
std::ostringstream rv("");
- for (int i=2; i<12; i++) {
- rv << "?,";
- }
+ for (int i=2; i<12; i++) rv << "?,";
rv << "?";
return rv.str();
}
@@ -1619,9 +1573,7 @@ std::string splitter_config::insert_format() const {
std::string splitter_config::select_format() const {
std::string rv("");
- for (int i=0; i<11; i++) {
- rv+="?,";
- }
+ for (int i=0; i<11; i++) rv+="?,";
rv+="?";
return rv;
}
@@ -1630,9 +1582,7 @@ std::string splitter_config::print(int full_subtables, int show_ids, int no_refs
std::ostringstream rv("");
rv.precision(14);
- if (show_ids) {
- rv << id;
- }
+ if (show_ids) rv << id;
rv << ',';
rv << version;
rv << ',';
@@ -1665,9 +1615,7 @@ std::string splitter_config::print_xml(int full_subtables, int show_ids, int no_
rv.precision(14);
rv << xml_indent() << '<' << tag << ">\n";
xml_indent(2);
- if (show_ids) {
- rv << xml_indent() << "<id>" << id << "</id>\n";
- }
+ if (show_ids) rv << xml_indent() << "<id>" << id << "</id>\n";
rv << xml_indent() << "<version>" << version << "</version>\n";
{
std::string enc_field=xml_encode_string(data_type,std::min(strlen(data_type),sizeof(data_type)));
@@ -1709,7 +1657,7 @@ void splitter_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> id;
}
@@ -1717,7 +1665,7 @@ void splitter_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> version;
}
@@ -1725,14 +1673,10 @@ void splitter_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::string::size_type epos=sub.find("<",pos);
- if (epos==std::string::npos) {
- epos=sub.find('\n',pos);
- }
- if (epos==std::string::npos) {
- epos=pos+strlen(sub.c_str()+pos);
- }
+ if (epos==std::string::npos) epos=sub.find('\n',pos);
+ if (epos==std::string::npos) epos=pos+strlen(sub.c_str()+pos);
std::vector<unsigned char> in(xml_decode_string<unsigned char>((const char *)sub.c_str()+pos,epos-pos));
strncpy(data_type,(const char *)&(in.front()),std::min(in.size(),(size_t)64));
data_type[std::min(in.size(),(size_t)63)]=0;
@@ -1741,7 +1685,7 @@ void splitter_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> fft_len;
}
@@ -1749,7 +1693,7 @@ void splitter_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> ifft_len;
}
@@ -1757,14 +1701,10 @@ void splitter_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::string::size_type epos=sub.find("<",pos);
- if (epos==std::string::npos) {
- epos=sub.find('\n',pos);
- }
- if (epos==std::string::npos) {
- epos=pos+strlen(sub.c_str()+pos);
- }
+ if (epos==std::string::npos) epos=sub.find('\n',pos);
+ if (epos==std::string::npos) epos=pos+strlen(sub.c_str()+pos);
std::vector<unsigned char> in(xml_decode_string<unsigned char>((const char *)sub.c_str()+pos,epos-pos));
strncpy(filter,(const char *)&(in.front()),std::min(in.size(),(size_t)64));
filter[std::min(in.size(),(size_t)63)]=0;
@@ -1773,14 +1713,10 @@ void splitter_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::string::size_type epos=sub.find("<",pos);
- if (epos==std::string::npos) {
- epos=sub.find('\n',pos);
- }
- if (epos==std::string::npos) {
- epos=pos+strlen(sub.c_str()+pos);
- }
+ if (epos==std::string::npos) epos=sub.find('\n',pos);
+ if (epos==std::string::npos) epos=pos+strlen(sub.c_str()+pos);
std::vector<unsigned char> in(xml_decode_string<unsigned char>((const char *)sub.c_str()+pos,epos-pos));
strncpy(window,(const char *)&(in.front()),std::min(in.size(),(size_t)64));
window[std::min(in.size(),(size_t)63)]=0;
@@ -1789,7 +1725,7 @@ void splitter_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> samples_per_wu;
}
@@ -1797,7 +1733,7 @@ void splitter_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> highpass;
}
@@ -1805,14 +1741,10 @@ void splitter_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::string::size_type epos=sub.find("<",pos);
- if (epos==std::string::npos) {
- epos=sub.find('\n',pos);
- }
- if (epos==std::string::npos) {
- epos=pos+strlen(sub.c_str()+pos);
- }
+ if (epos==std::string::npos) epos=sub.find('\n',pos);
+ if (epos==std::string::npos) epos=pos+strlen(sub.c_str()+pos);
std::vector<unsigned char> in(xml_decode_string<unsigned char>((const char *)sub.c_str()+pos,epos-pos));
strncpy(blanker_filter,(const char *)&(in.front()),std::min(in.size(),(size_t)64));
blanker_filter[std::min(in.size(),(size_t)63)]=0;
@@ -1821,7 +1753,7 @@ void splitter_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> pfb_ntaps;
}
@@ -1829,7 +1761,7 @@ void splitter_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> pfb_width_factor;
}
@@ -1892,10 +1824,10 @@ void splitter_config::parse(const std::string &s) {
parse(row);
}
-template <> const char *const db_table<analysis_config>::table_name="analysis_config";
-template <> const char *db_table<analysis_config>::_search_tag=table_name;
+template <> const char * const db_table<analysis_config>::table_name="analysis_config";
+template <> const char * db_table<analysis_config>::_search_tag=table_name;
template <> const int db_table<analysis_config>::_nfields=39;
-template <> const char *const db_table<analysis_config>::column_names[39]= {"id","spike_thresh","spikes_per_spectrum","autocorr_thresh","autocorr_per_spectrum","autocorr_fftlen","gauss_null_chi_sq_thresh","gauss_chi_sq_thresh","gauss_power_thresh","gauss_peak_power_thresh","gauss_pot_length","pulse_thresh","pulse_display_thresh","pulse_max","pulse_min","pulse_fft_max","pulse_pot_length","triplet_thresh","triplet_max","triplet_min","triplet_pot_length","pot_overlap_factor","pot_t_offset", [...]
+template <> const char * const db_table<analysis_config>::column_names[39]= {"id","spike_thresh","spikes_per_spectrum","autocorr_thresh","autocorr_per_spectrum","autocorr_fftlen","gauss_null_chi_sq_thresh","gauss_chi_sq_thresh","gauss_power_thresh","gauss_peak_power_thresh","gauss_pot_length","pulse_thresh","pulse_display_thresh","pulse_max","pulse_min","pulse_fft_max","pulse_pot_length","triplet_thresh","triplet_max","triplet_min","triplet_pot_length","pot_overlap_factor","pot_t_offset" [...]
analysis_config::analysis_config() :
db_table<analysis_config>(*this,-1),
@@ -2060,9 +1992,7 @@ analysis_config &analysis_config::operator =(const analysis_config &a) {
std::string analysis_config::update_format() const {
std::ostringstream rv("");
- for (int i=2; i<39; i++) {
- rv << "?,";
- }
+ for (int i=2; i<39; i++) rv << "?,";
rv << "?";
return rv.str();
}
@@ -2074,9 +2004,7 @@ std::string analysis_config::insert_format() const {
std::string analysis_config::select_format() const {
std::string rv("");
- for (int i=0; i<38; i++) {
- rv+="?,";
- }
+ for (int i=0; i<38; i++) rv+="?,";
rv+="?";
return rv;
}
@@ -2085,9 +2013,7 @@ std::string analysis_config::print(int full_subtables, int show_ids, int no_refs
std::ostringstream rv("");
rv.precision(14);
- if (show_ids) {
- rv << id;
- }
+ if (show_ids) rv << id;
rv << ',';
rv << spike_thresh;
rv << ',';
@@ -2185,9 +2111,7 @@ std::string analysis_config::print_xml(int full_subtables, int show_ids, int no_
rv.precision(14);
rv << xml_indent() << '<' << tag << ">\n";
xml_indent(2);
- if (show_ids) {
- rv << xml_indent() << "<id>" << id << "</id>\n";
- }
+ if (show_ids) rv << xml_indent() << "<id>" << id << "</id>\n";
rv << xml_indent() << "<spike_thresh>" << spike_thresh << "</spike_thresh>\n";
rv << xml_indent() << "<spikes_per_spectrum>" << spikes_per_spectrum << "</spikes_per_spectrum>\n";
rv << xml_indent() << "<autocorr_thresh>" << autocorr_thresh << "</autocorr_thresh>\n";
@@ -2249,7 +2173,7 @@ void analysis_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> id;
}
@@ -2257,7 +2181,7 @@ void analysis_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> spike_thresh;
}
@@ -2265,7 +2189,7 @@ void analysis_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> spikes_per_spectrum;
}
@@ -2273,7 +2197,7 @@ void analysis_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> autocorr_thresh;
}
@@ -2281,7 +2205,7 @@ void analysis_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> autocorr_per_spectrum;
}
@@ -2289,7 +2213,7 @@ void analysis_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> autocorr_fftlen;
}
@@ -2297,7 +2221,7 @@ void analysis_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> gauss_null_chi_sq_thresh;
}
@@ -2305,7 +2229,7 @@ void analysis_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> gauss_chi_sq_thresh;
}
@@ -2313,7 +2237,7 @@ void analysis_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> gauss_power_thresh;
}
@@ -2321,7 +2245,7 @@ void analysis_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> gauss_peak_power_thresh;
}
@@ -2329,7 +2253,7 @@ void analysis_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> gauss_pot_length;
}
@@ -2337,7 +2261,7 @@ void analysis_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> pulse_thresh;
}
@@ -2345,7 +2269,7 @@ void analysis_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> pulse_display_thresh;
}
@@ -2353,7 +2277,7 @@ void analysis_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> pulse_max;
}
@@ -2361,7 +2285,7 @@ void analysis_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> pulse_min;
}
@@ -2369,7 +2293,7 @@ void analysis_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> pulse_fft_max;
}
@@ -2377,7 +2301,7 @@ void analysis_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> pulse_pot_length;
}
@@ -2385,7 +2309,7 @@ void analysis_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> triplet_thresh;
}
@@ -2393,7 +2317,7 @@ void analysis_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> triplet_max;
}
@@ -2401,7 +2325,7 @@ void analysis_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> triplet_min;
}
@@ -2409,7 +2333,7 @@ void analysis_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> triplet_pot_length;
}
@@ -2417,7 +2341,7 @@ void analysis_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> pot_overlap_factor;
}
@@ -2425,7 +2349,7 @@ void analysis_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> pot_t_offset;
}
@@ -2433,7 +2357,7 @@ void analysis_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> pot_min_slew;
}
@@ -2441,7 +2365,7 @@ void analysis_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> pot_max_slew;
}
@@ -2449,7 +2373,7 @@ void analysis_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> chirp_resolution;
}
@@ -2457,7 +2381,7 @@ void analysis_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> analysis_fft_lengths;
}
@@ -2465,7 +2389,7 @@ void analysis_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> bsmooth_boxcar_length;
}
@@ -2473,7 +2397,7 @@ void analysis_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> bsmooth_chunk_size;
}
@@ -2490,7 +2414,7 @@ void analysis_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> pulse_beams;
}
@@ -2498,7 +2422,7 @@ void analysis_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> max_signals;
}
@@ -2506,7 +2430,7 @@ void analysis_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> max_spikes;
}
@@ -2514,7 +2438,7 @@ void analysis_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> max_autocorr;
}
@@ -2522,7 +2446,7 @@ void analysis_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> max_gaussians;
}
@@ -2530,7 +2454,7 @@ void analysis_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> max_pulses;
}
@@ -2538,7 +2462,7 @@ void analysis_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> max_triplets;
}
@@ -2546,7 +2470,7 @@ void analysis_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> keyuniq;
}
@@ -2554,7 +2478,7 @@ void analysis_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> credit_rate;
}
@@ -2730,10 +2654,10 @@ void analysis_config::parse(const std::string &s) {
parse(row);
}
-template <> const char *const db_table<science_config>::table_name="science_config";
-template <> const char *db_table<science_config>::_search_tag=table_name;
+template <> const char * const db_table<science_config>::table_name="science_config";
+template <> const char * db_table<science_config>::_search_tag=table_name;
template <> const int db_table<science_config>::_nfields=29;
-template <> const char *const db_table<science_config>::column_names[29]= {"id","active","qpix_scheme","qpix_nside","fpix_width","total_bandwidth","freq_uncertainty","fwhm_beamwidth","sky_disc_radius","observable_sky","epoch","bary_chirp_window","bary_freq_window","nonbary_freq_window","spike_obs_duration","spike_obs_interval","gauss_obs_duration","gauss_obs_interval","pulse_obs_duration","pulse_obs_interval","triplet_obs_duration","triplet_obs_interval","min_spike_id","min_autocorr_id", [...]
+template <> const char * const db_table<science_config>::column_names[29]= {"id","active","qpix_scheme","qpix_nside","fpix_width","total_bandwidth","freq_uncertainty","fwhm_beamwidth","sky_disc_radius","observable_sky","epoch","bary_chirp_window","bary_freq_window","nonbary_freq_window","spike_obs_duration","spike_obs_interval","gauss_obs_duration","gauss_obs_interval","pulse_obs_duration","pulse_obs_interval","triplet_obs_duration","triplet_obs_interval","min_spike_id","min_autocorr_id" [...]
science_config::science_config() :
db_table<science_config>(*this,-1),
@@ -2862,9 +2786,7 @@ science_config &science_config::operator =(const science_config &a) {
std::string science_config::update_format() const {
std::ostringstream rv("");
- for (int i=2; i<29; i++) {
- rv << "?,";
- }
+ for (int i=2; i<29; i++) rv << "?,";
rv << "?";
return rv.str();
}
@@ -2876,9 +2798,7 @@ std::string science_config::insert_format() const {
std::string science_config::select_format() const {
std::string rv("");
- for (int i=0; i<28; i++) {
- rv+="?,";
- }
+ for (int i=0; i<28; i++) rv+="?,";
rv+="?";
return rv;
}
@@ -2887,9 +2807,7 @@ std::string science_config::print(int full_subtables, int show_ids, int no_refs)
std::ostringstream rv("");
rv.precision(14);
- if (show_ids) {
- rv << id;
- }
+ if (show_ids) rv << id;
rv << ',';
rv << active;
rv << ',';
@@ -2956,9 +2874,7 @@ std::string science_config::print_xml(int full_subtables, int show_ids, int no_r
rv.precision(14);
rv << xml_indent() << '<' << tag << ">\n";
xml_indent(2);
- if (show_ids) {
- rv << xml_indent() << "<id>" << id << "</id>\n";
- }
+ if (show_ids) rv << xml_indent() << "<id>" << id << "</id>\n";
rv << xml_indent() << "<active>" << active << "</active>\n";
{
std::string enc_field=xml_encode_string(qpix_scheme,std::min(strlen(qpix_scheme),sizeof(qpix_scheme)));
@@ -3009,7 +2925,7 @@ void science_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> id;
}
@@ -3017,7 +2933,7 @@ void science_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> active;
}
@@ -3025,14 +2941,10 @@ void science_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::string::size_type epos=sub.find("<",pos);
- if (epos==std::string::npos) {
- epos=sub.find('\n',pos);
- }
- if (epos==std::string::npos) {
- epos=pos+strlen(sub.c_str()+pos);
- }
+ if (epos==std::string::npos) epos=sub.find('\n',pos);
+ if (epos==std::string::npos) epos=pos+strlen(sub.c_str()+pos);
std::vector<unsigned char> in(xml_decode_string<unsigned char>((const char *)sub.c_str()+pos,epos-pos));
strncpy(qpix_scheme,(const char *)&(in.front()),std::min(in.size(),(size_t)16));
qpix_scheme[std::min(in.size(),(size_t)15)]=0;
@@ -3041,7 +2953,7 @@ void science_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> qpix_nside;
}
@@ -3049,7 +2961,7 @@ void science_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> fpix_width;
}
@@ -3057,7 +2969,7 @@ void science_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> total_bandwidth;
}
@@ -3065,7 +2977,7 @@ void science_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> freq_uncertainty;
}
@@ -3073,7 +2985,7 @@ void science_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> fwhm_beamwidth;
}
@@ -3081,7 +2993,7 @@ void science_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> sky_disc_radius;
}
@@ -3089,7 +3001,7 @@ void science_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> observable_sky;
}
@@ -3097,7 +3009,7 @@ void science_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> epoch;
}
@@ -3105,7 +3017,7 @@ void science_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> bary_chirp_window;
}
@@ -3113,7 +3025,7 @@ void science_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> bary_freq_window;
}
@@ -3121,7 +3033,7 @@ void science_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> nonbary_freq_window;
}
@@ -3129,7 +3041,7 @@ void science_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> spike_obs_duration;
}
@@ -3137,7 +3049,7 @@ void science_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> spike_obs_interval;
}
@@ -3145,7 +3057,7 @@ void science_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> gauss_obs_duration;
}
@@ -3153,7 +3065,7 @@ void science_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> gauss_obs_interval;
}
@@ -3161,7 +3073,7 @@ void science_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> pulse_obs_duration;
}
@@ -3169,7 +3081,7 @@ void science_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> pulse_obs_interval;
}
@@ -3177,7 +3089,7 @@ void science_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> triplet_obs_duration;
}
@@ -3185,7 +3097,7 @@ void science_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> triplet_obs_interval;
}
@@ -3193,7 +3105,7 @@ void science_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> min_spike_id;
}
@@ -3201,7 +3113,7 @@ void science_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> min_autocorr_id;
}
@@ -3209,7 +3121,7 @@ void science_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> min_gaussian_id;
}
@@ -3217,7 +3129,7 @@ void science_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> min_pulse_id;
}
@@ -3225,7 +3137,7 @@ void science_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> min_triplet_id;
}
@@ -3233,7 +3145,7 @@ void science_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> min_app_version;
}
@@ -3241,14 +3153,10 @@ void science_config::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::string::size_type epos=sub.find("<",pos);
- if (epos==std::string::npos) {
- epos=sub.find('\n',pos);
- }
- if (epos==std::string::npos) {
- epos=pos+strlen(sub.c_str()+pos);
- }
+ if (epos==std::string::npos) epos=sub.find('\n',pos);
+ if (epos==std::string::npos) epos=pos+strlen(sub.c_str()+pos);
std::vector<unsigned char> in(xml_decode_string<unsigned char>((const char *)sub.c_str()+pos,epos-pos));
strncpy(info_xml,(const char *)&(in.front()),std::min(in.size(),(size_t)255));
info_xml[std::min(in.size(),(size_t)254)]=0;
@@ -3380,10 +3288,10 @@ void science_config::parse(const std::string &s) {
parse(row);
}
-template <> const char *const db_type<candidate_t>::type_name="candidate_t";
-template <> const char *db_type<candidate_t>::_search_tag=type_name;
+template <> const char * const db_type<candidate_t>::type_name="candidate_t";
+template <> const char * db_type<candidate_t>::_search_tag=type_name;
template <> const int db_type<candidate_t>::_nfields=5;
-template <> const char *const db_type<candidate_t>::column_names[5]= {"type","id","num_obs","score","is_rfi"};
+template <> const char * const db_type<candidate_t>::column_names[5]= {"type","id","num_obs","score","is_rfi"};
candidate_t::candidate_t() :
db_type<candidate_t>(*this),
@@ -3441,9 +3349,7 @@ std::string candidate_t::update_format() const {
std::ostringstream rv("");
rv << "ROW(";
- for (int i=1; i<5; i++) {
- rv << "?,";
- }
+ for (int i=1; i<5; i++) rv << "?,";
rv << "?";
rv << ")";
@@ -3457,9 +3363,7 @@ std::string candidate_t::insert_format() const {
std::string candidate_t::select_format() const {
std::string rv("");
- for (int i=0; i<4; i++) {
- rv+="?,";
- }
+ for (int i=0; i<4; i++) rv+="?,";
rv+="?";
return rv;
}
@@ -3508,7 +3412,7 @@ void candidate_t::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> type;
}
@@ -3516,7 +3420,7 @@ void candidate_t::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> id;
}
@@ -3524,7 +3428,7 @@ void candidate_t::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> num_obs;
}
@@ -3532,7 +3436,7 @@ void candidate_t::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> score;
}
@@ -3540,7 +3444,7 @@ void candidate_t::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> is_rfi;
}
@@ -3575,10 +3479,10 @@ void candidate_t::parse(const std::string &s) {
parse(row);
}
-template <> const char *const db_table<meta_candidate>::table_name="meta_candidate";
-template <> const char *db_table<meta_candidate>::_search_tag=table_name;
+template <> const char * const db_table<meta_candidate>::table_name="meta_candidate";
+template <> const char * db_table<meta_candidate>::_search_tag=table_name;
template <> const int db_table<meta_candidate>::_nfields=32;
-template <> const char *const db_table<meta_candidate>::column_names[32]= {"id","version","time_last_updated","num_spikes","num_spike_b_multiplets","best_spike_b_mp_score","num_spike_nb_multiplets","best_spike_nb_mp_score","spike_high_id","num_gaussians","num_gaussian_b_multiplets","best_gaussian_b_mp_score","num_gaussian_nb_multiplets","best_gaussian_nb_mp_score","gaussian_high_id","num_pulses","num_pulse_b_multiplets","best_pulse_b_mp_score","num_pulse_nb_multiplets","best_pulse_nb_mp_ [...]
+template <> const char * const db_table<meta_candidate>::column_names[32]= {"id","version","time_last_updated","num_spikes","num_spike_b_multiplets","best_spike_b_mp_score","num_spike_nb_multiplets","best_spike_nb_mp_score","spike_high_id","num_gaussians","num_gaussian_b_multiplets","best_gaussian_b_mp_score","num_gaussian_nb_multiplets","best_gaussian_nb_mp_score","gaussian_high_id","num_pulses","num_pulse_b_multiplets","best_pulse_b_mp_score","num_pulse_nb_multiplets","best_pulse_nb_mp [...]
meta_candidate::meta_candidate() :
db_table<meta_candidate>(*this,-1),
@@ -3716,9 +3620,7 @@ meta_candidate &meta_candidate::operator =(const meta_candidate &a) {
std::string meta_candidate::update_format() const {
std::ostringstream rv("");
- for (int i=2; i<32; i++) {
- rv << "?,";
- }
+ for (int i=2; i<32; i++) rv << "?,";
rv << "?";
return rv.str();
}
@@ -3730,9 +3632,7 @@ std::string meta_candidate::insert_format() const {
std::string meta_candidate::select_format() const {
std::string rv("");
- for (int i=0; i<31; i++) {
- rv+="?,";
- }
+ for (int i=0; i<31; i++) rv+="?,";
rv+="?";
return rv;
}
@@ -3741,9 +3641,7 @@ std::string meta_candidate::print(int full_subtables, int show_ids, int no_refs)
std::ostringstream rv("");
rv.precision(14);
- if (show_ids) {
- rv << id;
- }
+ if (show_ids) rv << id;
rv << ',';
rv << version;
rv << ',';
@@ -3816,9 +3714,7 @@ std::string meta_candidate::print_xml(int full_subtables, int show_ids, int no_r
rv.precision(14);
rv << xml_indent() << '<' << tag << ">\n";
xml_indent(2);
- if (show_ids) {
- rv << xml_indent() << "<id>" << id << "</id>\n";
- }
+ if (show_ids) rv << xml_indent() << "<id>" << id << "</id>\n";
rv << xml_indent() << "<version>" << version << "</version>\n";
rv << xml_indent() << "<time_last_updated>" << time_last_updated << "</time_last_updated>\n";
rv << xml_indent() << "<num_spikes>" << num_spikes << "</num_spikes>\n";
@@ -3864,7 +3760,7 @@ void meta_candidate::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> id;
}
@@ -3872,7 +3768,7 @@ void meta_candidate::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> version;
}
@@ -3880,7 +3776,7 @@ void meta_candidate::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> time_last_updated;
}
@@ -3888,7 +3784,7 @@ void meta_candidate::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> num_spikes;
}
@@ -3896,7 +3792,7 @@ void meta_candidate::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> num_spike_b_multiplets;
}
@@ -3904,7 +3800,7 @@ void meta_candidate::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> best_spike_b_mp_score;
}
@@ -3912,7 +3808,7 @@ void meta_candidate::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> num_spike_nb_multiplets;
}
@@ -3920,7 +3816,7 @@ void meta_candidate::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> best_spike_nb_mp_score;
}
@@ -3928,7 +3824,7 @@ void meta_candidate::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> spike_high_id;
}
@@ -3936,7 +3832,7 @@ void meta_candidate::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> num_gaussians;
}
@@ -3944,7 +3840,7 @@ void meta_candidate::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> num_gaussian_b_multiplets;
}
@@ -3952,7 +3848,7 @@ void meta_candidate::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> best_gaussian_b_mp_score;
}
@@ -3960,7 +3856,7 @@ void meta_candidate::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> num_gaussian_nb_multiplets;
}
@@ -3968,7 +3864,7 @@ void meta_candidate::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> best_gaussian_nb_mp_score;
}
@@ -3976,7 +3872,7 @@ void meta_candidate::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> gaussian_high_id;
}
@@ -3984,7 +3880,7 @@ void meta_candidate::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> num_pulses;
}
@@ -3992,7 +3888,7 @@ void meta_candidate::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> num_pulse_b_multiplets;
}
@@ -4000,7 +3896,7 @@ void meta_candidate::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> best_pulse_b_mp_score;
}
@@ -4008,7 +3904,7 @@ void meta_candidate::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> num_pulse_nb_multiplets;
}
@@ -4016,7 +3912,7 @@ void meta_candidate::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> best_pulse_nb_mp_score;
}
@@ -4024,7 +3920,7 @@ void meta_candidate::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> pulse_high_id;
}
@@ -4032,7 +3928,7 @@ void meta_candidate::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> num_triplets;
}
@@ -4040,7 +3936,7 @@ void meta_candidate::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> num_triplet_b_multiplets;
}
@@ -4048,7 +3944,7 @@ void meta_candidate::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> best_triplet_b_mp_score;
}
@@ -4056,7 +3952,7 @@ void meta_candidate::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> num_triplet_nb_multiplets;
}
@@ -4064,7 +3960,7 @@ void meta_candidate::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> best_triplet_nb_mp_score;
}
@@ -4072,7 +3968,7 @@ void meta_candidate::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> triplet_high_id;
}
@@ -4080,7 +3976,7 @@ void meta_candidate::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> num_stars;
}
@@ -4088,7 +3984,7 @@ void meta_candidate::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> best_star_score;
}
@@ -4096,7 +3992,7 @@ void meta_candidate::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> meta_score;
}
@@ -4104,7 +4000,7 @@ void meta_candidate::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> rfi_clean;
}
@@ -4112,7 +4008,7 @@ void meta_candidate::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> state;
}
@@ -4255,10 +4151,10 @@ void meta_candidate::parse(const std::string &s) {
parse(row);
}
-template <> const char *const db_table<multiplet>::table_name="multiplet";
-template <> const char *db_table<multiplet>::_search_tag=table_name;
+template <> const char * const db_table<multiplet>::table_name="multiplet";
+template <> const char * db_table<multiplet>::_search_tag=table_name;
template <> const int db_table<multiplet>::_nfields=25;
-template <> const char *const db_table<multiplet>::column_names[25]= {"id","version","signal_type","mp_type","qpix","freq_win","mean_ra","mean_decl","ra_stddev","decl_stddev","mean_angular_distance","angular_distance_stddev","mean_frequency","frequency_stddev","mean_chirp","chirp_stddev","mean_period","period_stddev","mean_snr","snr_stddev","mean_threshold","threshold_stddev","score","num_detections","signal_ids"};
+template <> const char * const db_table<multiplet>::column_names[25]= {"id","version","signal_type","mp_type","qpix","freq_win","mean_ra","mean_decl","ra_stddev","decl_stddev","mean_angular_distance","angular_distance_stddev","mean_frequency","frequency_stddev","mean_chirp","chirp_stddev","mean_period","period_stddev","mean_snr","snr_stddev","mean_threshold","threshold_stddev","score","num_detections","signal_ids"};
multiplet::multiplet() :
db_table<multiplet>(*this,-1),
@@ -4381,9 +4277,7 @@ multiplet &multiplet::operator =(const multiplet &a) {
std::string multiplet::update_format() const {
std::ostringstream rv("");
- for (int i=2; i<25; i++) {
- rv << "?,";
- }
+ for (int i=2; i<25; i++) rv << "?,";
rv << "?";
return rv.str();
}
@@ -4395,9 +4289,7 @@ std::string multiplet::insert_format() const {
std::string multiplet::select_format() const {
std::string rv("");
- for (int i=0; i<24; i++) {
- rv+="?,";
- }
+ for (int i=0; i<24; i++) rv+="?,";
rv+="?";
return rv;
}
@@ -4406,9 +4298,7 @@ std::string multiplet::print(int full_subtables, int show_ids, int no_refs) cons
std::ostringstream rv("");
rv.precision(14);
- if (show_ids) {
- rv << id;
- }
+ if (show_ids) rv << id;
rv << ',';
rv << version;
rv << ',';
@@ -4478,9 +4368,7 @@ std::string multiplet::print_xml(int full_subtables, int show_ids, int no_refs,c
rv.precision(14);
rv << xml_indent() << '<' << tag << ">\n";
xml_indent(2);
- if (show_ids) {
- rv << xml_indent() << "<id>" << id << "</id>\n";
- }
+ if (show_ids) rv << xml_indent() << "<id>" << id << "</id>\n";
rv << xml_indent() << "<version>" << version << "</version>\n";
rv << xml_indent() << "<signal_type>" << signal_type << "</signal_type>\n";
rv << xml_indent() << "<mp_type>" << mp_type << "</mp_type>\n";
@@ -4527,7 +4415,7 @@ void multiplet::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> id;
}
@@ -4535,7 +4423,7 @@ void multiplet::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> version;
}
@@ -4543,7 +4431,7 @@ void multiplet::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> signal_type;
}
@@ -4551,7 +4439,7 @@ void multiplet::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> mp_type;
}
@@ -4559,7 +4447,7 @@ void multiplet::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> qpix;
}
@@ -4567,7 +4455,7 @@ void multiplet::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> freq_win;
}
@@ -4575,7 +4463,7 @@ void multiplet::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> mean_ra;
}
@@ -4583,7 +4471,7 @@ void multiplet::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> mean_decl;
}
@@ -4591,7 +4479,7 @@ void multiplet::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> ra_stddev;
}
@@ -4599,7 +4487,7 @@ void multiplet::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> decl_stddev;
}
@@ -4607,7 +4495,7 @@ void multiplet::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> mean_angular_distance;
}
@@ -4615,7 +4503,7 @@ void multiplet::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> angular_distance_stddev;
}
@@ -4623,7 +4511,7 @@ void multiplet::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> mean_frequency;
}
@@ -4631,7 +4519,7 @@ void multiplet::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> frequency_stddev;
}
@@ -4639,7 +4527,7 @@ void multiplet::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> mean_chirp;
}
@@ -4647,7 +4535,7 @@ void multiplet::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> chirp_stddev;
}
@@ -4655,7 +4543,7 @@ void multiplet::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> mean_period;
}
@@ -4663,7 +4551,7 @@ void multiplet::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> period_stddev;
}
@@ -4671,7 +4559,7 @@ void multiplet::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> mean_snr;
}
@@ -4679,7 +4567,7 @@ void multiplet::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> snr_stddev;
}
@@ -4687,7 +4575,7 @@ void multiplet::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> mean_threshold;
}
@@ -4695,7 +4583,7 @@ void multiplet::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> threshold_stddev;
}
@@ -4703,7 +4591,7 @@ void multiplet::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> score;
}
@@ -4711,7 +4599,7 @@ void multiplet::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> num_detections;
}
@@ -4849,10 +4737,10 @@ void multiplet::parse(const std::string &s) {
parse(row);
}
-template <> const char *const db_table<star>::table_name="star";
-template <> const char *db_table<star>::_search_tag=table_name;
+template <> const char * const db_table<star>::table_name="star";
+template <> const char * db_table<star>::_search_tag=table_name;
template <> const int db_table<star>::_nfields=14;
-template <> const char *const db_table<star>::column_names[14]= {"id","object_type","catalog_name","catalog_number","object_name","ra","decl","qpix","v_mag","b_minus_v","parallax","stellar_type","planets","score"};
+template <> const char * const db_table<star>::column_names[14]= {"id","object_type","catalog_name","catalog_number","object_name","ra","decl","qpix","v_mag","b_minus_v","parallax","stellar_type","planets","score"};
star::star() :
db_table<star>(*this,-1),
@@ -4936,9 +4824,7 @@ star &star::operator =(const star &a) {
std::string star::update_format() const {
std::ostringstream rv("");
- for (int i=2; i<14; i++) {
- rv << "?,";
- }
+ for (int i=2; i<14; i++) rv << "?,";
rv << "?";
return rv.str();
}
@@ -4950,9 +4836,7 @@ std::string star::insert_format() const {
std::string star::select_format() const {
std::string rv("");
- for (int i=0; i<13; i++) {
- rv+="?,";
- }
+ for (int i=0; i<13; i++) rv+="?,";
rv+="?";
return rv;
}
@@ -4961,9 +4845,7 @@ std::string star::print(int full_subtables, int show_ids, int no_refs) const {
std::ostringstream rv("");
rv.precision(14);
- if (show_ids) {
- rv << id;
- }
+ if (show_ids) rv << id;
rv << ',';
rv << "'" << object_type << "'";
rv << ',';
@@ -5000,9 +4882,7 @@ std::string star::print_xml(int full_subtables, int show_ids, int no_refs,const
rv.precision(14);
rv << xml_indent() << '<' << tag << ">\n";
xml_indent(2);
- if (show_ids) {
- rv << xml_indent() << "<id>" << id << "</id>\n";
- }
+ if (show_ids) rv << xml_indent() << "<id>" << id << "</id>\n";
{
std::string enc_field=xml_encode_string(object_type,std::min(strlen(object_type),sizeof(object_type)));
rv << xml_indent() << "<object_type>";
@@ -5046,7 +4926,7 @@ void star::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> id;
}
@@ -5054,14 +4934,10 @@ void star::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::string::size_type epos=sub.find("<",pos);
- if (epos==std::string::npos) {
- epos=sub.find('\n',pos);
- }
- if (epos==std::string::npos) {
- epos=pos+strlen(sub.c_str()+pos);
- }
+ if (epos==std::string::npos) epos=sub.find('\n',pos);
+ if (epos==std::string::npos) epos=pos+strlen(sub.c_str()+pos);
std::vector<unsigned char> in(xml_decode_string<unsigned char>((const char *)sub.c_str()+pos,epos-pos));
strncpy(object_type,(const char *)&(in.front()),std::min(in.size(),(size_t)16));
object_type[std::min(in.size(),(size_t)15)]=0;
@@ -5070,14 +4946,10 @@ void star::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::string::size_type epos=sub.find("<",pos);
- if (epos==std::string::npos) {
- epos=sub.find('\n',pos);
- }
- if (epos==std::string::npos) {
- epos=pos+strlen(sub.c_str()+pos);
- }
+ if (epos==std::string::npos) epos=sub.find('\n',pos);
+ if (epos==std::string::npos) epos=pos+strlen(sub.c_str()+pos);
std::vector<unsigned char> in(xml_decode_string<unsigned char>((const char *)sub.c_str()+pos,epos-pos));
strncpy(catalog_name,(const char *)&(in.front()),std::min(in.size(),(size_t)64));
catalog_name[std::min(in.size(),(size_t)63)]=0;
@@ -5086,7 +4958,7 @@ void star::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> catalog_number;
}
@@ -5094,14 +4966,10 @@ void star::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::string::size_type epos=sub.find("<",pos);
- if (epos==std::string::npos) {
- epos=sub.find('\n',pos);
- }
- if (epos==std::string::npos) {
- epos=pos+strlen(sub.c_str()+pos);
- }
+ if (epos==std::string::npos) epos=sub.find('\n',pos);
+ if (epos==std::string::npos) epos=pos+strlen(sub.c_str()+pos);
std::vector<unsigned char> in(xml_decode_string<unsigned char>((const char *)sub.c_str()+pos,epos-pos));
strncpy(object_name,(const char *)&(in.front()),std::min(in.size(),(size_t)64));
object_name[std::min(in.size(),(size_t)63)]=0;
@@ -5110,7 +4978,7 @@ void star::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> ra;
}
@@ -5118,7 +4986,7 @@ void star::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> decl;
}
@@ -5126,7 +4994,7 @@ void star::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> qpix;
}
@@ -5134,7 +5002,7 @@ void star::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> v_mag;
}
@@ -5142,7 +5010,7 @@ void star::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> b_minus_v;
}
@@ -5150,7 +5018,7 @@ void star::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> parallax;
}
@@ -5158,14 +5026,10 @@ void star::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::string::size_type epos=sub.find("<",pos);
- if (epos==std::string::npos) {
- epos=sub.find('\n',pos);
- }
- if (epos==std::string::npos) {
- epos=pos+strlen(sub.c_str()+pos);
- }
+ if (epos==std::string::npos) epos=sub.find('\n',pos);
+ if (epos==std::string::npos) epos=pos+strlen(sub.c_str()+pos);
std::vector<unsigned char> in(xml_decode_string<unsigned char>((const char *)sub.c_str()+pos,epos-pos));
strncpy(stellar_type,(const char *)&(in.front()),std::min(in.size(),(size_t)32));
stellar_type[std::min(in.size(),(size_t)31)]=0;
@@ -5174,7 +5038,7 @@ void star::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> planets;
}
@@ -5182,7 +5046,7 @@ void star::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> score;
}
@@ -5253,10 +5117,10 @@ void star::parse(const std::string &s) {
parse(row);
}
-template <> const char *const db_table<candidate_count>::table_name="candidate_count";
-template <> const char *db_table<candidate_count>::_search_tag=table_name;
+template <> const char * const db_table<candidate_count>::table_name="candidate_count";
+template <> const char * db_table<candidate_count>::_search_tag=table_name;
template <> const int db_table<candidate_count>::_nfields=15;
-template <> const char *const db_table<candidate_count>::column_names[15]= {"id","spikes","gaussians","pulses","triplets","spike_barycentric_multiplets","gaussian_barycentric_multiplets","pulse_barycentric_multiplets","triplet_barycentric_multiplets","spike_nonbarycentric_multiplets","gaussian_nonbarycentric_multiplets","pulse_nonbarycentric_multiplets","triplet_nonbarycentric_multiplets","stars","time_last_updated"};
+template <> const char * const db_table<candidate_count>::column_names[15]= {"id","spikes","gaussians","pulses","triplets","spike_barycentric_multiplets","gaussian_barycentric_multiplets","pulse_barycentric_multiplets","triplet_barycentric_multiplets","spike_nonbarycentric_multiplets","gaussian_nonbarycentric_multiplets","pulse_nonbarycentric_multiplets","triplet_nonbarycentric_multiplets","stars","time_last_updated"};
candidate_count::candidate_count() :
db_table<candidate_count>(*this,-1),
@@ -5343,9 +5207,7 @@ candidate_count &candidate_count::operator =(const candidate_count &a) {
std::string candidate_count::update_format() const {
std::ostringstream rv("");
- for (int i=2; i<15; i++) {
- rv << "?,";
- }
+ for (int i=2; i<15; i++) rv << "?,";
rv << "?";
return rv.str();
}
@@ -5357,9 +5219,7 @@ std::string candidate_count::insert_format() const {
std::string candidate_count::select_format() const {
std::string rv("");
- for (int i=0; i<14; i++) {
- rv+="?,";
- }
+ for (int i=0; i<14; i++) rv+="?,";
rv+="?";
return rv;
}
@@ -5368,9 +5228,7 @@ std::string candidate_count::print(int full_subtables, int show_ids, int no_refs
std::ostringstream rv("");
rv.precision(14);
- if (show_ids) {
- rv << id;
- }
+ if (show_ids) rv << id;
rv << ',';
rv << spikes;
rv << ',';
@@ -5409,9 +5267,7 @@ std::string candidate_count::print_xml(int full_subtables, int show_ids, int no_
rv.precision(14);
rv << xml_indent() << '<' << tag << ">\n";
xml_indent(2);
- if (show_ids) {
- rv << xml_indent() << "<id>" << id << "</id>\n";
- }
+ if (show_ids) rv << xml_indent() << "<id>" << id << "</id>\n";
rv << xml_indent() << "<spikes>" << spikes << "</spikes>\n";
rv << xml_indent() << "<gaussians>" << gaussians << "</gaussians>\n";
rv << xml_indent() << "<pulses>" << pulses << "</pulses>\n";
@@ -5440,7 +5296,7 @@ void candidate_count::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> id;
}
@@ -5448,7 +5304,7 @@ void candidate_count::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> spikes;
}
@@ -5456,7 +5312,7 @@ void candidate_count::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> gaussians;
}
@@ -5464,7 +5320,7 @@ void candidate_count::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> pulses;
}
@@ -5472,7 +5328,7 @@ void candidate_count::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> triplets;
}
@@ -5480,7 +5336,7 @@ void candidate_count::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> spike_barycentric_multiplets;
}
@@ -5488,7 +5344,7 @@ void candidate_count::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> gaussian_barycentric_multiplets;
}
@@ -5496,7 +5352,7 @@ void candidate_count::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> pulse_barycentric_multiplets;
}
@@ -5504,7 +5360,7 @@ void candidate_count::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> triplet_barycentric_multiplets;
}
@@ -5512,7 +5368,7 @@ void candidate_count::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> spike_nonbarycentric_multiplets;
}
@@ -5520,7 +5376,7 @@ void candidate_count::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> gaussian_nonbarycentric_multiplets;
}
@@ -5528,7 +5384,7 @@ void candidate_count::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> pulse_nonbarycentric_multiplets;
}
@@ -5536,7 +5392,7 @@ void candidate_count::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> triplet_nonbarycentric_multiplets;
}
@@ -5544,7 +5400,7 @@ void candidate_count::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> stars;
}
@@ -5552,7 +5408,7 @@ void candidate_count::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> time_last_updated;
}
@@ -5627,10 +5483,10 @@ void candidate_count::parse(const std::string &s) {
parse(row);
}
-template <> const char *const db_table<tape>::table_name="tape";
-template <> const char *db_table<tape>::_search_tag=table_name;
+template <> const char * const db_table<tape>::table_name="tape";
+template <> const char * db_table<tape>::_search_tag=table_name;
template <> const int db_table<tape>::_nfields=8;
-template <> const char *const db_table<tape>::column_names[8]= {"id","name","start_time","last_block_time","last_block_done","missed","tape_quality","beam"};
+template <> const char * const db_table<tape>::column_names[8]= {"id","name","start_time","last_block_time","last_block_done","missed","tape_quality","beam"};
tape::tape() :
db_table<tape>(*this,-1),
@@ -5696,9 +5552,7 @@ tape &tape::operator =(const tape &a) {
std::string tape::update_format() const {
std::ostringstream rv("");
- for (int i=2; i<8; i++) {
- rv << "?,";
- }
+ for (int i=2; i<8; i++) rv << "?,";
rv << "?";
return rv.str();
}
@@ -5710,9 +5564,7 @@ std::string tape::insert_format() const {
std::string tape::select_format() const {
std::string rv("");
- for (int i=0; i<7; i++) {
- rv+="?,";
- }
+ for (int i=0; i<7; i++) rv+="?,";
rv+="?";
return rv;
}
@@ -5721,9 +5573,7 @@ std::string tape::print(int full_subtables, int show_ids, int no_refs) const {
std::ostringstream rv("");
rv.precision(14);
- if (show_ids) {
- rv << id;
- }
+ if (show_ids) rv << id;
rv << ',';
rv << "'" << name << "'";
rv << ',';
@@ -5748,9 +5598,7 @@ std::string tape::print_xml(int full_subtables, int show_ids, int no_refs,const
rv.precision(14);
rv << xml_indent() << '<' << tag << ">\n";
xml_indent(2);
- if (show_ids) {
- rv << xml_indent() << "<id>" << id << "</id>\n";
- }
+ if (show_ids) rv << xml_indent() << "<id>" << id << "</id>\n";
{
std::string enc_field=xml_encode_string(name,std::min(strlen(name),sizeof(name)));
rv << xml_indent() << "<name>";
@@ -5776,7 +5624,7 @@ void tape::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> id;
}
@@ -5784,14 +5632,10 @@ void tape::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::string::size_type epos=sub.find("<",pos);
- if (epos==std::string::npos) {
- epos=sub.find('\n',pos);
- }
- if (epos==std::string::npos) {
- epos=pos+strlen(sub.c_str()+pos);
- }
+ if (epos==std::string::npos) epos=sub.find('\n',pos);
+ if (epos==std::string::npos) epos=pos+strlen(sub.c_str()+pos);
std::vector<unsigned char> in(xml_decode_string<unsigned char>((const char *)sub.c_str()+pos,epos-pos));
strncpy(name,(const char *)&(in.front()),std::min(in.size(),(size_t)20));
name[std::min(in.size(),(size_t)19)]=0;
@@ -5800,7 +5644,7 @@ void tape::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> start_time;
}
@@ -5808,7 +5652,7 @@ void tape::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> last_block_time;
}
@@ -5816,7 +5660,7 @@ void tape::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> last_block_done;
}
@@ -5824,7 +5668,7 @@ void tape::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> missed;
}
@@ -5832,7 +5676,7 @@ void tape::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> tape_quality;
}
@@ -5840,7 +5684,7 @@ void tape::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> beam;
}
@@ -5887,10 +5731,10 @@ void tape::parse(const std::string &s) {
parse(row);
}
-template <> const char *const db_table<settings>::table_name="settings";
-template <> const char *db_table<settings>::_search_tag=table_name;
+template <> const char * const db_table<settings>::table_name="settings";
+template <> const char * db_table<settings>::_search_tag=table_name;
template <> const int db_table<settings>::_nfields=6;
-template <> const char *const db_table<settings>::column_names[6]= {"id","active","recorder_cfg","splitter_cfg","analysis_cfg","receiver_cfg"};
+template <> const char * const db_table<settings>::column_names[6]= {"id","active","recorder_cfg","splitter_cfg","analysis_cfg","receiver_cfg"};
settings::settings() :
db_table<settings>(*this,-1),
@@ -5950,9 +5794,7 @@ settings &settings::operator =(const settings &a) {
std::string settings::update_format() const {
std::ostringstream rv("");
- for (int i=2; i<6; i++) {
- rv << "?,";
- }
+ for (int i=2; i<6; i++) rv << "?,";
rv << "?";
return rv.str();
}
@@ -5964,9 +5806,7 @@ std::string settings::insert_format() const {
std::string settings::select_format() const {
std::string rv("");
- for (int i=0; i<5; i++) {
- rv+="?,";
- }
+ for (int i=0; i<5; i++) rv+="?,";
rv+="?";
return rv;
}
@@ -5975,9 +5815,7 @@ std::string settings::print(int full_subtables, int show_ids, int no_refs) const
std::ostringstream rv("");
rv.precision(14);
- if (show_ids) {
- rv << id;
- }
+ if (show_ids) rv << id;
rv << ',';
rv << active;
rv << ',';
@@ -6022,9 +5860,7 @@ std::string settings::print_xml(int full_subtables, int show_ids, int no_refs,co
rv.precision(14);
rv << xml_indent() << '<' << tag << ">\n";
xml_indent(2);
- if (show_ids) {
- rv << xml_indent() << "<id>" << id << "</id>\n";
- }
+ if (show_ids) rv << xml_indent() << "<id>" << id << "</id>\n";
rv << xml_indent() << "<active>" << active << "</active>\n";
if (!no_refs) {
if (full_subtables) {
@@ -6068,7 +5904,7 @@ void settings::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> id;
}
@@ -6076,7 +5912,7 @@ void settings::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> active;
}
@@ -6123,10 +5959,10 @@ void settings::parse(const std::string &s) {
parse(row);
}
-template <> const char *const db_table<workunit_grp>::table_name="workunit_grp";
-template <> const char *db_table<workunit_grp>::_search_tag=table_name;
+template <> const char * const db_table<workunit_grp>::table_name="workunit_grp";
+template <> const char * db_table<workunit_grp>::_search_tag=table_name;
template <> const int db_table<workunit_grp>::_nfields=11;
-template <> const char *const db_table<workunit_grp>::column_names[11]= {"id","tape_info","name","data_desc","receiver_cfg","recorder_cfg","splitter_cfg","analysis_cfg","sb_id","iq_modified","alfa_filter_bank"};
+template <> const char * const db_table<workunit_grp>::column_names[11]= {"id","tape_info","name","data_desc","receiver_cfg","recorder_cfg","splitter_cfg","analysis_cfg","sb_id","iq_modified","alfa_filter_bank"};
workunit_grp::workunit_grp() :
db_table<workunit_grp>(*this,-1),
@@ -6201,9 +6037,7 @@ workunit_grp &workunit_grp::operator =(const workunit_grp &a) {
std::string workunit_grp::update_format() const {
std::ostringstream rv("");
- for (int i=2; i<11; i++) {
- rv << "?,";
- }
+ for (int i=2; i<11; i++) rv << "?,";
rv << "?";
return rv.str();
}
@@ -6215,9 +6049,7 @@ std::string workunit_grp::insert_format() const {
std::string workunit_grp::select_format() const {
std::string rv("");
- for (int i=0; i<10; i++) {
- rv+="?,";
- }
+ for (int i=0; i<10; i++) rv+="?,";
rv+="?";
return rv;
}
@@ -6226,9 +6058,7 @@ std::string workunit_grp::print(int full_subtables, int show_ids, int no_refs) c
std::ostringstream rv("");
rv.precision(14);
- if (show_ids) {
- rv << id;
- }
+ if (show_ids) rv << id;
rv << ',';
if (!no_refs) {
if (full_subtables) {
@@ -6289,9 +6119,7 @@ std::string workunit_grp::print_xml(int full_subtables, int show_ids, int no_ref
rv.precision(14);
rv << xml_indent() << '<' << tag << ">\n";
xml_indent(2);
- if (show_ids) {
- rv << xml_indent() << "<id>" << id << "</id>\n";
- }
+ if (show_ids) rv << xml_indent() << "<id>" << id << "</id>\n";
if (!no_refs) {
if (full_subtables) {
rv << tape_info.print_xml(full_subtables,show_ids,no_refs,"tape_info");
@@ -6350,7 +6178,7 @@ void workunit_grp::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> id;
}
@@ -6361,14 +6189,10 @@ void workunit_grp::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::string::size_type epos=sub.find("<",pos);
- if (epos==std::string::npos) {
- epos=sub.find('\n',pos);
- }
- if (epos==std::string::npos) {
- epos=pos+strlen(sub.c_str()+pos);
- }
+ if (epos==std::string::npos) epos=sub.find('\n',pos);
+ if (epos==std::string::npos) epos=pos+strlen(sub.c_str()+pos);
std::vector<unsigned char> in(xml_decode_string<unsigned char>((const char *)sub.c_str()+pos,epos-pos));
strncpy(name,(const char *)&(in.front()),std::min(in.size(),(size_t)64));
name[std::min(in.size(),(size_t)63)]=0;
@@ -6392,7 +6216,7 @@ void workunit_grp::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> sb_id;
}
@@ -6400,7 +6224,7 @@ void workunit_grp::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> iq_modified;
}
@@ -6408,7 +6232,7 @@ void workunit_grp::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> alfa_filter_bank;
}
@@ -6461,10 +6285,10 @@ void workunit_grp::parse(const std::string &s) {
parse(row);
}
-template <> const char *const db_table<workunit_header>::table_name="workunit_header";
-template <> const char *db_table<workunit_header>::_search_tag=table_name;
+template <> const char * const db_table<workunit_header>::table_name="workunit_header";
+template <> const char * db_table<workunit_header>::_search_tag=table_name;
template <> const int db_table<workunit_header>::_nfields=5;
-template <> const char *const db_table<workunit_header>::column_names[5]= {"id","name","group_info","subband_desc","sb_id"};
+template <> const char * const db_table<workunit_header>::column_names[5]= {"id","name","group_info","subband_desc","sb_id"};
workunit_header::workunit_header() :
db_table<workunit_header>(*this,-1),
@@ -6521,9 +6345,7 @@ workunit_header &workunit_header::operator =(const workunit_header &a) {
std::string workunit_header::update_format() const {
std::ostringstream rv("");
- for (int i=2; i<5; i++) {
- rv << "?,";
- }
+ for (int i=2; i<5; i++) rv << "?,";
rv << "?";
return rv.str();
}
@@ -6535,9 +6357,7 @@ std::string workunit_header::insert_format() const {
std::string workunit_header::select_format() const {
std::string rv("");
- for (int i=0; i<4; i++) {
- rv+="?,";
- }
+ for (int i=0; i<4; i++) rv+="?,";
rv+="?";
return rv;
}
@@ -6546,9 +6366,7 @@ std::string workunit_header::print(int full_subtables, int show_ids, int no_refs
std::ostringstream rv("");
rv.precision(14);
- if (show_ids) {
- rv << id;
- }
+ if (show_ids) rv << id;
rv << ',';
rv << "'" << name << "'";
rv << ',';
@@ -6573,9 +6391,7 @@ std::string workunit_header::print_xml(int full_subtables, int show_ids, int no_
rv.precision(14);
rv << xml_indent() << '<' << tag << ">\n";
xml_indent(2);
- if (show_ids) {
- rv << xml_indent() << "<id>" << id << "</id>\n";
- }
+ if (show_ids) rv << xml_indent() << "<id>" << id << "</id>\n";
{
std::string enc_field=xml_encode_string(name,std::min(strlen(name),sizeof(name)));
rv << xml_indent() << "<name>";
@@ -6604,7 +6420,7 @@ void workunit_header::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> id;
}
@@ -6612,14 +6428,10 @@ void workunit_header::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::string::size_type epos=sub.find("<",pos);
- if (epos==std::string::npos) {
- epos=sub.find('\n',pos);
- }
- if (epos==std::string::npos) {
- epos=pos+strlen(sub.c_str()+pos);
- }
+ if (epos==std::string::npos) epos=sub.find('\n',pos);
+ if (epos==std::string::npos) epos=pos+strlen(sub.c_str()+pos);
std::vector<unsigned char> in(xml_decode_string<unsigned char>((const char *)sub.c_str()+pos,epos-pos));
strncpy(name,(const char *)&(in.front()),std::min(in.size(),(size_t)64));
name[std::min(in.size(),(size_t)63)]=0;
@@ -6634,7 +6446,7 @@ void workunit_header::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> sb_id;
}
@@ -6667,10 +6479,10 @@ void workunit_header::parse(const std::string &s) {
parse(row);
}
-template <> const char *const db_table<result>::table_name="result";
-template <> const char *db_table<result>::_search_tag=table_name;
+template <> const char * const db_table<result>::table_name="result";
+template <> const char * db_table<result>::_search_tag=table_name;
template <> const int db_table<result>::_nfields=10;
-template <> const char *const db_table<result>::column_names[10]= {"id","boinc_result","wuid","received","hostid","versionid","return_code","overflow","reserved","sb_id"};
+template <> const char * const db_table<result>::column_names[10]= {"id","boinc_result","wuid","received","hostid","versionid","return_code","overflow","reserved","sb_id"};
result::result() :
db_table<result>(*this,-1),
@@ -6742,9 +6554,7 @@ result &result::operator =(const result &a) {
std::string result::update_format() const {
std::ostringstream rv("");
- for (int i=2; i<10; i++) {
- rv << "?,";
- }
+ for (int i=2; i<10; i++) rv << "?,";
rv << "?";
return rv.str();
}
@@ -6756,9 +6566,7 @@ std::string result::insert_format() const {
std::string result::select_format() const {
std::string rv("");
- for (int i=0; i<9; i++) {
- rv+="?,";
- }
+ for (int i=0; i<9; i++) rv+="?,";
rv+="?";
return rv;
}
@@ -6767,9 +6575,7 @@ std::string result::print(int full_subtables, int show_ids, int no_refs) const {
std::ostringstream rv("");
rv.precision(14);
- if (show_ids) {
- rv << id;
- }
+ if (show_ids) rv << id;
rv << ',';
rv << boinc_result;
rv << ',';
@@ -6804,9 +6610,7 @@ std::string result::print_xml(int full_subtables, int show_ids, int no_refs,cons
rv.precision(14);
rv << xml_indent() << '<' << tag << ">\n";
xml_indent(2);
- if (show_ids) {
- rv << xml_indent() << "<id>" << id << "</id>\n";
- }
+ if (show_ids) rv << xml_indent() << "<id>" << id << "</id>\n";
rv << xml_indent() << "<boinc_result>" << boinc_result << "</boinc_result>\n";
if (!no_refs) {
if (full_subtables) {
@@ -6836,7 +6640,7 @@ void result::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> id;
}
@@ -6844,7 +6648,7 @@ void result::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> boinc_result;
}
@@ -6855,7 +6659,7 @@ void result::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> received;
}
@@ -6863,7 +6667,7 @@ void result::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> hostid;
}
@@ -6871,7 +6675,7 @@ void result::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> versionid;
}
@@ -6879,7 +6683,7 @@ void result::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> return_code;
}
@@ -6887,7 +6691,7 @@ void result::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> overflow;
}
@@ -6895,7 +6699,7 @@ void result::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> reserved;
}
@@ -6903,7 +6707,7 @@ void result::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> sb_id;
}
@@ -6957,10 +6761,10 @@ void result::parse(const std::string &s) {
parse(row);
}
-template <> const char *const db_table<triplet>::table_name="triplet";
-template <> const char *db_table<triplet>::_search_tag=table_name;
+template <> const char * const db_table<triplet>::table_name="triplet";
+template <> const char * db_table<triplet>::_search_tag=table_name;
template <> const int db_table<triplet>::_nfields=17;
-template <> const char *const db_table<triplet>::column_names[17]= {"id","result_id","peak_power","mean_power","time","ra","decl","q_pix","freq","detection_freq","barycentric_freq","fft_len","chirp_rate","rfi_checked","rfi_found","reserved","period"};
+template <> const char * const db_table<triplet>::column_names[17]= {"id","result_id","peak_power","mean_power","time","ra","decl","q_pix","freq","detection_freq","barycentric_freq","fft_len","chirp_rate","rfi_checked","rfi_found","reserved","period"};
triplet::triplet() :
db_table<triplet>(*this,-1),
@@ -7053,9 +6857,7 @@ triplet &triplet::operator =(const triplet &a) {
std::string triplet::update_format() const {
std::ostringstream rv("");
- for (int i=2; i<17; i++) {
- rv << "?,";
- }
+ for (int i=2; i<17; i++) rv << "?,";
rv << "?";
return rv.str();
}
@@ -7067,9 +6869,7 @@ std::string triplet::insert_format() const {
std::string triplet::select_format() const {
std::string rv("");
- for (int i=0; i<16; i++) {
- rv+="?,";
- }
+ for (int i=0; i<16; i++) rv+="?,";
rv+="?";
return rv;
}
@@ -7078,9 +6878,7 @@ std::string triplet::print(int full_subtables, int show_ids, int no_refs) const
std::ostringstream rv("");
rv.precision(14);
- if (show_ids) {
- rv << id;
- }
+ if (show_ids) rv << id;
rv << ',';
if (!no_refs) {
if (full_subtables) {
@@ -7129,9 +6927,7 @@ std::string triplet::print_xml(int full_subtables, int show_ids, int no_refs,con
rv.precision(14);
rv << xml_indent() << '<' << tag << ">\n";
xml_indent(2);
- if (show_ids) {
- rv << xml_indent() << "<id>" << id << "</id>\n";
- }
+ if (show_ids) rv << xml_indent() << "<id>" << id << "</id>\n";
if (!no_refs) {
if (full_subtables) {
rv << result_id.print_xml(full_subtables,show_ids,no_refs,"result_id");
@@ -7168,7 +6964,7 @@ void triplet::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> id;
}
@@ -7179,7 +6975,7 @@ void triplet::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> peak_power;
}
@@ -7187,7 +6983,7 @@ void triplet::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> mean_power;
}
@@ -7195,7 +6991,7 @@ void triplet::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> time;
}
@@ -7203,7 +6999,7 @@ void triplet::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> ra;
}
@@ -7211,7 +7007,7 @@ void triplet::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> decl;
}
@@ -7219,7 +7015,7 @@ void triplet::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> q_pix;
}
@@ -7227,7 +7023,7 @@ void triplet::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> freq;
}
@@ -7235,7 +7031,7 @@ void triplet::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> detection_freq;
}
@@ -7243,7 +7039,7 @@ void triplet::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> barycentric_freq;
}
@@ -7251,7 +7047,7 @@ void triplet::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> fft_len;
}
@@ -7259,7 +7055,7 @@ void triplet::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> chirp_rate;
}
@@ -7267,7 +7063,7 @@ void triplet::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> rfi_checked;
}
@@ -7275,7 +7071,7 @@ void triplet::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> rfi_found;
}
@@ -7283,7 +7079,7 @@ void triplet::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> reserved;
}
@@ -7291,7 +7087,7 @@ void triplet::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> period;
}
@@ -7373,10 +7169,10 @@ void triplet::parse(const std::string &s) {
parse(row);
}
-template <> const char *const db_table<triplet_small>::table_name="triplet_small";
-template <> const char *db_table<triplet_small>::_search_tag=table_name;
+template <> const char * const db_table<triplet_small>::table_name="triplet_small";
+template <> const char * db_table<triplet_small>::_search_tag=table_name;
template <> const int db_table<triplet_small>::_nfields=17;
-template <> const char *const db_table<triplet_small>::column_names[17]= {"id","result_id","peak_power","mean_power","time","ra","decl","q_pix","freq","detection_freq","barycentric_freq","fft_len","chirp_rate","rfi_checked","rfi_found","reserved","period"};
+template <> const char * const db_table<triplet_small>::column_names[17]= {"id","result_id","peak_power","mean_power","time","ra","decl","q_pix","freq","detection_freq","barycentric_freq","fft_len","chirp_rate","rfi_checked","rfi_found","reserved","period"};
triplet_small::triplet_small() :
db_table<triplet_small>(*this,-1),
@@ -7469,9 +7265,7 @@ triplet_small &triplet_small::operator =(const triplet_small &a) {
std::string triplet_small::update_format() const {
std::ostringstream rv("");
- for (int i=2; i<17; i++) {
- rv << "?,";
- }
+ for (int i=2; i<17; i++) rv << "?,";
rv << "?";
return rv.str();
}
@@ -7483,9 +7277,7 @@ std::string triplet_small::insert_format() const {
std::string triplet_small::select_format() const {
std::string rv("");
- for (int i=0; i<16; i++) {
- rv+="?,";
- }
+ for (int i=0; i<16; i++) rv+="?,";
rv+="?";
return rv;
}
@@ -7494,9 +7286,7 @@ std::string triplet_small::print(int full_subtables, int show_ids, int no_refs)
std::ostringstream rv("");
rv.precision(14);
- if (show_ids) {
- rv << id;
- }
+ if (show_ids) rv << id;
rv << ',';
if (!no_refs) {
if (full_subtables) {
@@ -7545,9 +7335,7 @@ std::string triplet_small::print_xml(int full_subtables, int show_ids, int no_re
rv.precision(14);
rv << xml_indent() << '<' << tag << ">\n";
xml_indent(2);
- if (show_ids) {
- rv << xml_indent() << "<id>" << id << "</id>\n";
- }
+ if (show_ids) rv << xml_indent() << "<id>" << id << "</id>\n";
if (!no_refs) {
if (full_subtables) {
rv << result_id.print_xml(full_subtables,show_ids,no_refs,"result_id");
@@ -7584,7 +7372,7 @@ void triplet_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> id;
}
@@ -7595,7 +7383,7 @@ void triplet_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> peak_power;
}
@@ -7603,7 +7391,7 @@ void triplet_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> mean_power;
}
@@ -7611,7 +7399,7 @@ void triplet_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> time;
}
@@ -7619,7 +7407,7 @@ void triplet_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> ra;
}
@@ -7627,7 +7415,7 @@ void triplet_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> decl;
}
@@ -7635,7 +7423,7 @@ void triplet_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> q_pix;
}
@@ -7643,7 +7431,7 @@ void triplet_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> freq;
}
@@ -7651,7 +7439,7 @@ void triplet_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> detection_freq;
}
@@ -7659,7 +7447,7 @@ void triplet_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> barycentric_freq;
}
@@ -7667,7 +7455,7 @@ void triplet_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> fft_len;
}
@@ -7675,7 +7463,7 @@ void triplet_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> chirp_rate;
}
@@ -7683,7 +7471,7 @@ void triplet_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> rfi_checked;
}
@@ -7691,7 +7479,7 @@ void triplet_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> rfi_found;
}
@@ -7699,7 +7487,7 @@ void triplet_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> reserved;
}
@@ -7707,7 +7495,7 @@ void triplet_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> period;
}
@@ -7789,10 +7577,10 @@ void triplet_small::parse(const std::string &s) {
parse(row);
}
-template <> const char *const db_table<gaussian>::table_name="gaussian";
-template <> const char *db_table<gaussian>::_search_tag=table_name;
+template <> const char * const db_table<gaussian>::table_name="gaussian";
+template <> const char * db_table<gaussian>::_search_tag=table_name;
template <> const int db_table<gaussian>::_nfields=22;
-template <> const char *const db_table<gaussian>::column_names[22]= {"id","result_id","peak_power","mean_power","time","ra","decl","q_pix","freq","detection_freq","barycentric_freq","fft_len","chirp_rate","rfi_checked","rfi_found","reserved","sigma","chisqr","null_chisqr","score","max_power","pot"};
+template <> const char * const db_table<gaussian>::column_names[22]= {"id","result_id","peak_power","mean_power","time","ra","decl","q_pix","freq","detection_freq","barycentric_freq","fft_len","chirp_rate","rfi_checked","rfi_found","reserved","sigma","chisqr","null_chisqr","score","max_power","pot"};
gaussian::gaussian() :
db_table<gaussian>(*this,-1),
@@ -7900,9 +7688,7 @@ gaussian &gaussian::operator =(const gaussian &a) {
std::string gaussian::update_format() const {
std::ostringstream rv("");
- for (int i=2; i<22; i++) {
- rv << "?,";
- }
+ for (int i=2; i<22; i++) rv << "?,";
rv << "?";
return rv.str();
}
@@ -7914,9 +7700,7 @@ std::string gaussian::insert_format() const {
std::string gaussian::select_format() const {
std::string rv("");
- for (int i=0; i<21; i++) {
- rv+="?,";
- }
+ for (int i=0; i<21; i++) rv+="?,";
rv+="?";
return rv;
}
@@ -7925,9 +7709,7 @@ std::string gaussian::print(int full_subtables, int show_ids, int no_refs) const
std::ostringstream rv("");
rv.precision(14);
- if (show_ids) {
- rv << id;
- }
+ if (show_ids) rv << id;
rv << ',';
if (!no_refs) {
if (full_subtables) {
@@ -7986,9 +7768,7 @@ std::string gaussian::print_xml(int full_subtables, int show_ids, int no_refs,co
rv.precision(14);
rv << xml_indent() << '<' << tag << ">\n";
xml_indent(2);
- if (show_ids) {
- rv << xml_indent() << "<id>" << id << "</id>\n";
- }
+ if (show_ids) rv << xml_indent() << "<id>" << id << "</id>\n";
if (!no_refs) {
if (full_subtables) {
rv << result_id.print_xml(full_subtables,show_ids,no_refs,"result_id");
@@ -8034,7 +7814,7 @@ void gaussian::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> id;
}
@@ -8045,7 +7825,7 @@ void gaussian::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> peak_power;
}
@@ -8053,7 +7833,7 @@ void gaussian::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> mean_power;
}
@@ -8061,7 +7841,7 @@ void gaussian::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> time;
}
@@ -8069,7 +7849,7 @@ void gaussian::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> ra;
}
@@ -8077,7 +7857,7 @@ void gaussian::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> decl;
}
@@ -8085,7 +7865,7 @@ void gaussian::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> q_pix;
}
@@ -8093,7 +7873,7 @@ void gaussian::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> freq;
}
@@ -8101,7 +7881,7 @@ void gaussian::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> detection_freq;
}
@@ -8109,7 +7889,7 @@ void gaussian::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> barycentric_freq;
}
@@ -8117,7 +7897,7 @@ void gaussian::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> fft_len;
}
@@ -8125,7 +7905,7 @@ void gaussian::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> chirp_rate;
}
@@ -8133,7 +7913,7 @@ void gaussian::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> rfi_checked;
}
@@ -8141,7 +7921,7 @@ void gaussian::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> rfi_found;
}
@@ -8149,7 +7929,7 @@ void gaussian::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> reserved;
}
@@ -8157,7 +7937,7 @@ void gaussian::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> sigma;
}
@@ -8165,7 +7945,7 @@ void gaussian::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> chisqr;
}
@@ -8173,7 +7953,7 @@ void gaussian::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> null_chisqr;
}
@@ -8181,7 +7961,7 @@ void gaussian::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> score;
}
@@ -8189,7 +7969,7 @@ void gaussian::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> max_power;
}
@@ -8294,10 +8074,10 @@ void gaussian::parse(const std::string &s) {
parse(row);
}
-template <> const char *const db_table<gaussian_small>::table_name="gaussian_small";
-template <> const char *db_table<gaussian_small>::_search_tag=table_name;
+template <> const char * const db_table<gaussian_small>::table_name="gaussian_small";
+template <> const char * db_table<gaussian_small>::_search_tag=table_name;
template <> const int db_table<gaussian_small>::_nfields=21;
-template <> const char *const db_table<gaussian_small>::column_names[21]= {"id","result_id","peak_power","mean_power","time","ra","decl","q_pix","freq","detection_freq","barycentric_freq","fft_len","chirp_rate","rfi_checked","rfi_found","reserved","sigma","chisqr","null_chisqr","score","max_power"};
+template <> const char * const db_table<gaussian_small>::column_names[21]= {"id","result_id","peak_power","mean_power","time","ra","decl","q_pix","freq","detection_freq","barycentric_freq","fft_len","chirp_rate","rfi_checked","rfi_found","reserved","sigma","chisqr","null_chisqr","score","max_power"};
gaussian_small::gaussian_small() :
db_table<gaussian_small>(*this,-1),
@@ -8402,9 +8182,7 @@ gaussian_small &gaussian_small::operator =(const gaussian_small &a) {
std::string gaussian_small::update_format() const {
std::ostringstream rv("");
- for (int i=2; i<21; i++) {
- rv << "?,";
- }
+ for (int i=2; i<21; i++) rv << "?,";
rv << "?";
return rv.str();
}
@@ -8416,9 +8194,7 @@ std::string gaussian_small::insert_format() const {
std::string gaussian_small::select_format() const {
std::string rv("");
- for (int i=0; i<20; i++) {
- rv+="?,";
- }
+ for (int i=0; i<20; i++) rv+="?,";
rv+="?";
return rv;
}
@@ -8427,9 +8203,7 @@ std::string gaussian_small::print(int full_subtables, int show_ids, int no_refs)
std::ostringstream rv("");
rv.precision(14);
- if (show_ids) {
- rv << id;
- }
+ if (show_ids) rv << id;
rv << ',';
if (!no_refs) {
if (full_subtables) {
@@ -8486,9 +8260,7 @@ std::string gaussian_small::print_xml(int full_subtables, int show_ids, int no_r
rv.precision(14);
rv << xml_indent() << '<' << tag << ">\n";
xml_indent(2);
- if (show_ids) {
- rv << xml_indent() << "<id>" << id << "</id>\n";
- }
+ if (show_ids) rv << xml_indent() << "<id>" << id << "</id>\n";
if (!no_refs) {
if (full_subtables) {
rv << result_id.print_xml(full_subtables,show_ids,no_refs,"result_id");
@@ -8529,7 +8301,7 @@ void gaussian_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> id;
}
@@ -8540,7 +8312,7 @@ void gaussian_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> peak_power;
}
@@ -8548,7 +8320,7 @@ void gaussian_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> mean_power;
}
@@ -8556,7 +8328,7 @@ void gaussian_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> time;
}
@@ -8564,7 +8336,7 @@ void gaussian_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> ra;
}
@@ -8572,7 +8344,7 @@ void gaussian_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> decl;
}
@@ -8580,7 +8352,7 @@ void gaussian_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> q_pix;
}
@@ -8588,7 +8360,7 @@ void gaussian_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> freq;
}
@@ -8596,7 +8368,7 @@ void gaussian_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> detection_freq;
}
@@ -8604,7 +8376,7 @@ void gaussian_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> barycentric_freq;
}
@@ -8612,7 +8384,7 @@ void gaussian_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> fft_len;
}
@@ -8620,7 +8392,7 @@ void gaussian_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> chirp_rate;
}
@@ -8628,7 +8400,7 @@ void gaussian_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> rfi_checked;
}
@@ -8636,7 +8408,7 @@ void gaussian_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> rfi_found;
}
@@ -8644,7 +8416,7 @@ void gaussian_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> reserved;
}
@@ -8652,7 +8424,7 @@ void gaussian_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> sigma;
}
@@ -8660,7 +8432,7 @@ void gaussian_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> chisqr;
}
@@ -8668,7 +8440,7 @@ void gaussian_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> null_chisqr;
}
@@ -8676,7 +8448,7 @@ void gaussian_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> score;
}
@@ -8684,7 +8456,7 @@ void gaussian_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> max_power;
}
@@ -8782,10 +8554,10 @@ void gaussian_small::parse(const std::string &s) {
parse(row);
}
-template <> const char *const db_table<pulse>::table_name="pulse";
-template <> const char *db_table<pulse>::_search_tag=table_name;
+template <> const char * const db_table<pulse>::table_name="pulse";
+template <> const char * db_table<pulse>::_search_tag=table_name;
template <> const int db_table<pulse>::_nfields=22;
-template <> const char *const db_table<pulse>::column_names[22]= {"id","result_id","peak_power","mean_power","time","ra","decl","q_pix","freq","detection_freq","barycentric_freq","fft_len","chirp_rate","rfi_checked","rfi_found","reserved","period","snr","thresh","score","len_prof","pot"};
+template <> const char * const db_table<pulse>::column_names[22]= {"id","result_id","peak_power","mean_power","time","ra","decl","q_pix","freq","detection_freq","barycentric_freq","fft_len","chirp_rate","rfi_checked","rfi_found","reserved","period","snr","thresh","score","len_prof","pot"};
pulse::pulse() :
db_table<pulse>(*this,-1),
@@ -8893,9 +8665,7 @@ pulse &pulse::operator =(const pulse &a) {
std::string pulse::update_format() const {
std::ostringstream rv("");
- for (int i=2; i<22; i++) {
- rv << "?,";
- }
+ for (int i=2; i<22; i++) rv << "?,";
rv << "?";
return rv.str();
}
@@ -8907,9 +8677,7 @@ std::string pulse::insert_format() const {
std::string pulse::select_format() const {
std::string rv("");
- for (int i=0; i<21; i++) {
- rv+="?,";
- }
+ for (int i=0; i<21; i++) rv+="?,";
rv+="?";
return rv;
}
@@ -8918,9 +8686,7 @@ std::string pulse::print(int full_subtables, int show_ids, int no_refs) const {
std::ostringstream rv("");
rv.precision(14);
- if (show_ids) {
- rv << id;
- }
+ if (show_ids) rv << id;
rv << ',';
if (!no_refs) {
if (full_subtables) {
@@ -8979,9 +8745,7 @@ std::string pulse::print_xml(int full_subtables, int show_ids, int no_refs,const
rv.precision(14);
rv << xml_indent() << '<' << tag << ">\n";
xml_indent(2);
- if (show_ids) {
- rv << xml_indent() << "<id>" << id << "</id>\n";
- }
+ if (show_ids) rv << xml_indent() << "<id>" << id << "</id>\n";
if (!no_refs) {
if (full_subtables) {
rv << result_id.print_xml(full_subtables,show_ids,no_refs,"result_id");
@@ -9027,7 +8791,7 @@ void pulse::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> id;
}
@@ -9038,7 +8802,7 @@ void pulse::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> peak_power;
}
@@ -9046,7 +8810,7 @@ void pulse::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> mean_power;
}
@@ -9054,7 +8818,7 @@ void pulse::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> time;
}
@@ -9062,7 +8826,7 @@ void pulse::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> ra;
}
@@ -9070,7 +8834,7 @@ void pulse::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> decl;
}
@@ -9078,7 +8842,7 @@ void pulse::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> q_pix;
}
@@ -9086,7 +8850,7 @@ void pulse::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> freq;
}
@@ -9094,7 +8858,7 @@ void pulse::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> detection_freq;
}
@@ -9102,7 +8866,7 @@ void pulse::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> barycentric_freq;
}
@@ -9110,7 +8874,7 @@ void pulse::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> fft_len;
}
@@ -9118,7 +8882,7 @@ void pulse::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> chirp_rate;
}
@@ -9126,7 +8890,7 @@ void pulse::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> rfi_checked;
}
@@ -9134,7 +8898,7 @@ void pulse::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> rfi_found;
}
@@ -9142,7 +8906,7 @@ void pulse::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> reserved;
}
@@ -9150,7 +8914,7 @@ void pulse::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> period;
}
@@ -9158,7 +8922,7 @@ void pulse::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> snr;
}
@@ -9166,7 +8930,7 @@ void pulse::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> thresh;
}
@@ -9174,7 +8938,7 @@ void pulse::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> score;
}
@@ -9182,7 +8946,7 @@ void pulse::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> len_prof;
}
@@ -9287,10 +9051,10 @@ void pulse::parse(const std::string &s) {
parse(row);
}
-template <> const char *const db_table<pulse_small>::table_name="pulse_small";
-template <> const char *db_table<pulse_small>::_search_tag=table_name;
+template <> const char * const db_table<pulse_small>::table_name="pulse_small";
+template <> const char * db_table<pulse_small>::_search_tag=table_name;
template <> const int db_table<pulse_small>::_nfields=20;
-template <> const char *const db_table<pulse_small>::column_names[20]= {"id","result_id","peak_power","mean_power","time","ra","decl","q_pix","freq","detection_freq","barycentric_freq","fft_len","chirp_rate","rfi_checked","rfi_found","reserved","period","snr","thresh","score"};
+template <> const char * const db_table<pulse_small>::column_names[20]= {"id","result_id","peak_power","mean_power","time","ra","decl","q_pix","freq","detection_freq","barycentric_freq","fft_len","chirp_rate","rfi_checked","rfi_found","reserved","period","snr","thresh","score"};
pulse_small::pulse_small() :
db_table<pulse_small>(*this,-1),
@@ -9392,9 +9156,7 @@ pulse_small &pulse_small::operator =(const pulse_small &a) {
std::string pulse_small::update_format() const {
std::ostringstream rv("");
- for (int i=2; i<20; i++) {
- rv << "?,";
- }
+ for (int i=2; i<20; i++) rv << "?,";
rv << "?";
return rv.str();
}
@@ -9406,9 +9168,7 @@ std::string pulse_small::insert_format() const {
std::string pulse_small::select_format() const {
std::string rv("");
- for (int i=0; i<19; i++) {
- rv+="?,";
- }
+ for (int i=0; i<19; i++) rv+="?,";
rv+="?";
return rv;
}
@@ -9417,9 +9177,7 @@ std::string pulse_small::print(int full_subtables, int show_ids, int no_refs) co
std::ostringstream rv("");
rv.precision(14);
- if (show_ids) {
- rv << id;
- }
+ if (show_ids) rv << id;
rv << ',';
if (!no_refs) {
if (full_subtables) {
@@ -9474,9 +9232,7 @@ std::string pulse_small::print_xml(int full_subtables, int show_ids, int no_refs
rv.precision(14);
rv << xml_indent() << '<' << tag << ">\n";
xml_indent(2);
- if (show_ids) {
- rv << xml_indent() << "<id>" << id << "</id>\n";
- }
+ if (show_ids) rv << xml_indent() << "<id>" << id << "</id>\n";
if (!no_refs) {
if (full_subtables) {
rv << result_id.print_xml(full_subtables,show_ids,no_refs,"result_id");
@@ -9516,7 +9272,7 @@ void pulse_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> id;
}
@@ -9527,7 +9283,7 @@ void pulse_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> peak_power;
}
@@ -9535,7 +9291,7 @@ void pulse_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> mean_power;
}
@@ -9543,7 +9299,7 @@ void pulse_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> time;
}
@@ -9551,7 +9307,7 @@ void pulse_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> ra;
}
@@ -9559,7 +9315,7 @@ void pulse_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> decl;
}
@@ -9567,7 +9323,7 @@ void pulse_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> q_pix;
}
@@ -9575,7 +9331,7 @@ void pulse_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> freq;
}
@@ -9583,7 +9339,7 @@ void pulse_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> detection_freq;
}
@@ -9591,7 +9347,7 @@ void pulse_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> barycentric_freq;
}
@@ -9599,7 +9355,7 @@ void pulse_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> fft_len;
}
@@ -9607,7 +9363,7 @@ void pulse_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> chirp_rate;
}
@@ -9615,7 +9371,7 @@ void pulse_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> rfi_checked;
}
@@ -9623,7 +9379,7 @@ void pulse_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> rfi_found;
}
@@ -9631,7 +9387,7 @@ void pulse_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> reserved;
}
@@ -9639,7 +9395,7 @@ void pulse_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> period;
}
@@ -9647,7 +9403,7 @@ void pulse_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> snr;
}
@@ -9655,7 +9411,7 @@ void pulse_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> thresh;
}
@@ -9663,7 +9419,7 @@ void pulse_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> score;
}
@@ -9757,10 +9513,10 @@ void pulse_small::parse(const std::string &s) {
parse(row);
}
-template <> const char *const db_table<sah_pointing>::table_name="sah_pointing";
-template <> const char *db_table<sah_pointing>::_search_tag=table_name;
+template <> const char * const db_table<sah_pointing>::table_name="sah_pointing";
+template <> const char * db_table<sah_pointing>::_search_tag=table_name;
template <> const int db_table<sah_pointing>::_nfields=7;
-template <> const char *const db_table<sah_pointing>::column_names[7]= {"time_id","time","ra","dec","q_pix","angle_range","bad"};
+template <> const char * const db_table<sah_pointing>::column_names[7]= {"time_id","time","ra","dec","q_pix","angle_range","bad"};
sah_pointing::sah_pointing() :
db_table<sah_pointing>(*this,-1),
@@ -9823,9 +9579,7 @@ sah_pointing &sah_pointing::operator =(const sah_pointing &a) {
std::string sah_pointing::update_format() const {
std::ostringstream rv("");
- for (int i=2; i<7; i++) {
- rv << "?,";
- }
+ for (int i=2; i<7; i++) rv << "?,";
rv << "?";
return rv.str();
}
@@ -9837,9 +9591,7 @@ std::string sah_pointing::insert_format() const {
std::string sah_pointing::select_format() const {
std::string rv("");
- for (int i=0; i<6; i++) {
- rv+="?,";
- }
+ for (int i=0; i<6; i++) rv+="?,";
rv+="?";
return rv;
}
@@ -9848,9 +9600,7 @@ std::string sah_pointing::print(int full_subtables, int show_ids, int no_refs) c
std::ostringstream rv("");
rv.precision(14);
- if (show_ids) {
- rv << time_id;
- }
+ if (show_ids) rv << time_id;
rv << ',';
rv << time;
rv << ',';
@@ -9873,9 +9623,7 @@ std::string sah_pointing::print_xml(int full_subtables, int show_ids, int no_ref
rv.precision(14);
rv << xml_indent() << '<' << tag << ">\n";
xml_indent(2);
- if (show_ids) {
- rv << xml_indent() << "<time_id>" << time_id << "</time_id>\n";
- }
+ if (show_ids) rv << xml_indent() << "<time_id>" << time_id << "</time_id>\n";
rv << xml_indent() << "<time>" << time << "</time>\n";
rv << xml_indent() << "<ra>" << ra << "</ra>\n";
rv << xml_indent() << "<dec>" << dec << "</dec>\n";
@@ -9896,7 +9644,7 @@ void sah_pointing::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> time_id;
}
@@ -9904,7 +9652,7 @@ void sah_pointing::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> time;
}
@@ -9912,7 +9660,7 @@ void sah_pointing::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> ra;
}
@@ -9920,7 +9668,7 @@ void sah_pointing::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> dec;
}
@@ -9928,7 +9676,7 @@ void sah_pointing::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> q_pix;
}
@@ -9936,7 +9684,7 @@ void sah_pointing::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> angle_range;
}
@@ -9944,7 +9692,7 @@ void sah_pointing::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> bad;
}
@@ -9987,10 +9735,10 @@ void sah_pointing::parse(const std::string &s) {
parse(row);
}
-template <> const char *const db_table<sky_map>::table_name="sky_map";
-template <> const char *db_table<sky_map>::_search_tag=table_name;
+template <> const char * const db_table<sky_map>::table_name="sky_map";
+template <> const char * db_table<sky_map>::_search_tag=table_name;
template <> const int db_table<sky_map>::_nfields=13;
-template <> const char *const db_table<sky_map>::column_names[13]= {"npix","qpix","fpix","spike_max_id","gaussian_max_id","pulse_max_id","triplet_max_id","spike_count","gaussian_count","pulse_count","triplet_count","new_data","score"};
+template <> const char * const db_table<sky_map>::column_names[13]= {"npix","qpix","fpix","spike_max_id","gaussian_max_id","pulse_max_id","triplet_max_id","spike_count","gaussian_count","pulse_count","triplet_count","new_data","score"};
sky_map::sky_map() :
db_table<sky_map>(*this,-1),
@@ -10071,9 +9819,7 @@ sky_map &sky_map::operator =(const sky_map &a) {
std::string sky_map::update_format() const {
std::ostringstream rv("");
- for (int i=2; i<13; i++) {
- rv << "?,";
- }
+ for (int i=2; i<13; i++) rv << "?,";
rv << "?";
return rv.str();
}
@@ -10085,9 +9831,7 @@ std::string sky_map::insert_format() const {
std::string sky_map::select_format() const {
std::string rv("");
- for (int i=0; i<12; i++) {
- rv+="?,";
- }
+ for (int i=0; i<12; i++) rv+="?,";
rv+="?";
return rv;
}
@@ -10096,9 +9840,7 @@ std::string sky_map::print(int full_subtables, int show_ids, int no_refs) const
std::ostringstream rv("");
rv.precision(14);
- if (show_ids) {
- rv << npix;
- }
+ if (show_ids) rv << npix;
rv << ',';
rv << qpix;
rv << ',';
@@ -10133,9 +9875,7 @@ std::string sky_map::print_xml(int full_subtables, int show_ids, int no_refs,con
rv.precision(14);
rv << xml_indent() << '<' << tag << ">\n";
xml_indent(2);
- if (show_ids) {
- rv << xml_indent() << "<npix>" << npix << "</npix>\n";
- }
+ if (show_ids) rv << xml_indent() << "<npix>" << npix << "</npix>\n";
rv << xml_indent() << "<qpix>" << qpix << "</qpix>\n";
rv << xml_indent() << "<fpix>" << fpix << "</fpix>\n";
rv << xml_indent() << "<spike_max_id>" << spike_max_id << "</spike_max_id>\n";
@@ -10162,7 +9902,7 @@ void sky_map::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> npix;
}
@@ -10170,7 +9910,7 @@ void sky_map::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> qpix;
}
@@ -10178,7 +9918,7 @@ void sky_map::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> fpix;
}
@@ -10186,7 +9926,7 @@ void sky_map::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> spike_max_id;
}
@@ -10194,7 +9934,7 @@ void sky_map::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> gaussian_max_id;
}
@@ -10202,7 +9942,7 @@ void sky_map::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> pulse_max_id;
}
@@ -10210,7 +9950,7 @@ void sky_map::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> triplet_max_id;
}
@@ -10218,7 +9958,7 @@ void sky_map::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> spike_count;
}
@@ -10226,7 +9966,7 @@ void sky_map::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> gaussian_count;
}
@@ -10234,7 +9974,7 @@ void sky_map::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> pulse_count;
}
@@ -10242,7 +9982,7 @@ void sky_map::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> triplet_count;
}
@@ -10250,7 +9990,7 @@ void sky_map::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> new_data;
}
@@ -10258,7 +9998,7 @@ void sky_map::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> score;
}
@@ -10325,10 +10065,10 @@ void sky_map::parse(const std::string &s) {
parse(row);
}
-template <> const char *const db_table<hotpix>::table_name="hotpix";
-template <> const char *db_table<hotpix>::_search_tag=table_name;
+template <> const char * const db_table<hotpix>::table_name="hotpix";
+template <> const char * db_table<hotpix>::_search_tag=table_name;
template <> const int db_table<hotpix>::_nfields=2;
-template <> const char *const db_table<hotpix>::column_names[2]= {"id","last_hit_time"};
+template <> const char * const db_table<hotpix>::column_names[2]= {"id","last_hit_time"};
hotpix::hotpix() :
db_table<hotpix>(*this,-1),
@@ -10376,9 +10116,7 @@ hotpix &hotpix::operator =(const hotpix &a) {
std::string hotpix::update_format() const {
std::ostringstream rv("");
- for (int i=2; i<2; i++) {
- rv << "?,";
- }
+ for (int i=2; i<2; i++) rv << "?,";
rv << "?";
return rv.str();
}
@@ -10390,9 +10128,7 @@ std::string hotpix::insert_format() const {
std::string hotpix::select_format() const {
std::string rv("");
- for (int i=0; i<1; i++) {
- rv+="?,";
- }
+ for (int i=0; i<1; i++) rv+="?,";
rv+="?";
return rv;
}
@@ -10401,9 +10137,7 @@ std::string hotpix::print(int full_subtables, int show_ids, int no_refs) const {
std::ostringstream rv("");
rv.precision(14);
- if (show_ids) {
- rv << id;
- }
+ if (show_ids) rv << id;
rv << ',';
rv << last_hit_time;
return rv.str();
@@ -10416,9 +10150,7 @@ std::string hotpix::print_xml(int full_subtables, int show_ids, int no_refs,cons
rv.precision(14);
rv << xml_indent() << '<' << tag << ">\n";
xml_indent(2);
- if (show_ids) {
- rv << xml_indent() << "<id>" << id << "</id>\n";
- }
+ if (show_ids) rv << xml_indent() << "<id>" << id << "</id>\n";
rv << xml_indent() << "<last_hit_time>" << last_hit_time << "</last_hit_time>\n";
xml_indent(-2);
rv << xml_indent() << "</" << tag << ">\n";
@@ -10434,7 +10166,7 @@ void hotpix::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> id;
}
@@ -10442,7 +10174,7 @@ void hotpix::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> last_hit_time;
}
@@ -10465,10 +10197,10 @@ void hotpix::parse(const std::string &s) {
parse(row);
}
-template <> const char *const db_table<spike>::table_name="spike";
-template <> const char *db_table<spike>::_search_tag=table_name;
+template <> const char * const db_table<spike>::table_name="spike";
+template <> const char * db_table<spike>::_search_tag=table_name;
template <> const int db_table<spike>::_nfields=16;
-template <> const char *const db_table<spike>::column_names[16]= {"id","result_id","peak_power","mean_power","time","ra","decl","q_pix","freq","detection_freq","barycentric_freq","fft_len","chirp_rate","rfi_checked","rfi_found","reserved"};
+template <> const char * const db_table<spike>::column_names[16]= {"id","result_id","peak_power","mean_power","time","ra","decl","q_pix","freq","detection_freq","barycentric_freq","fft_len","chirp_rate","rfi_checked","rfi_found","reserved"};
spike::spike() :
db_table<spike>(*this,-1),
@@ -10558,9 +10290,7 @@ spike &spike::operator =(const spike &a) {
std::string spike::update_format() const {
std::ostringstream rv("");
- for (int i=2; i<16; i++) {
- rv << "?,";
- }
+ for (int i=2; i<16; i++) rv << "?,";
rv << "?";
return rv.str();
}
@@ -10572,9 +10302,7 @@ std::string spike::insert_format() const {
std::string spike::select_format() const {
std::string rv("");
- for (int i=0; i<15; i++) {
- rv+="?,";
- }
+ for (int i=0; i<15; i++) rv+="?,";
rv+="?";
return rv;
}
@@ -10583,9 +10311,7 @@ std::string spike::print(int full_subtables, int show_ids, int no_refs) const {
std::ostringstream rv("");
rv.precision(14);
- if (show_ids) {
- rv << id;
- }
+ if (show_ids) rv << id;
rv << ',';
if (!no_refs) {
if (full_subtables) {
@@ -10632,9 +10358,7 @@ std::string spike::print_xml(int full_subtables, int show_ids, int no_refs,const
rv.precision(14);
rv << xml_indent() << '<' << tag << ">\n";
xml_indent(2);
- if (show_ids) {
- rv << xml_indent() << "<id>" << id << "</id>\n";
- }
+ if (show_ids) rv << xml_indent() << "<id>" << id << "</id>\n";
if (!no_refs) {
if (full_subtables) {
rv << result_id.print_xml(full_subtables,show_ids,no_refs,"result_id");
@@ -10670,7 +10394,7 @@ void spike::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> id;
}
@@ -10681,7 +10405,7 @@ void spike::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> peak_power;
}
@@ -10689,7 +10413,7 @@ void spike::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> mean_power;
}
@@ -10697,7 +10421,7 @@ void spike::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> time;
}
@@ -10705,7 +10429,7 @@ void spike::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> ra;
}
@@ -10713,7 +10437,7 @@ void spike::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> decl;
}
@@ -10721,7 +10445,7 @@ void spike::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> q_pix;
}
@@ -10729,7 +10453,7 @@ void spike::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> freq;
}
@@ -10737,7 +10461,7 @@ void spike::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> detection_freq;
}
@@ -10745,7 +10469,7 @@ void spike::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> barycentric_freq;
}
@@ -10753,7 +10477,7 @@ void spike::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> fft_len;
}
@@ -10761,7 +10485,7 @@ void spike::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> chirp_rate;
}
@@ -10769,7 +10493,7 @@ void spike::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> rfi_checked;
}
@@ -10777,7 +10501,7 @@ void spike::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> rfi_found;
}
@@ -10785,7 +10509,7 @@ void spike::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> reserved;
}
@@ -10863,10 +10587,10 @@ void spike::parse(const std::string &s) {
parse(row);
}
-template <> const char *const db_table<spike_small>::table_name="spike_small";
-template <> const char *db_table<spike_small>::_search_tag=table_name;
+template <> const char * const db_table<spike_small>::table_name="spike_small";
+template <> const char * db_table<spike_small>::_search_tag=table_name;
template <> const int db_table<spike_small>::_nfields=16;
-template <> const char *const db_table<spike_small>::column_names[16]= {"id","result_id","peak_power","mean_power","time","ra","decl","q_pix","freq","detection_freq","barycentric_freq","fft_len","chirp_rate","rfi_checked","rfi_found","reserved"};
+template <> const char * const db_table<spike_small>::column_names[16]= {"id","result_id","peak_power","mean_power","time","ra","decl","q_pix","freq","detection_freq","barycentric_freq","fft_len","chirp_rate","rfi_checked","rfi_found","reserved"};
spike_small::spike_small() :
db_table<spike_small>(*this,-1),
@@ -10956,9 +10680,7 @@ spike_small &spike_small::operator =(const spike_small &a) {
std::string spike_small::update_format() const {
std::ostringstream rv("");
- for (int i=2; i<16; i++) {
- rv << "?,";
- }
+ for (int i=2; i<16; i++) rv << "?,";
rv << "?";
return rv.str();
}
@@ -10970,9 +10692,7 @@ std::string spike_small::insert_format() const {
std::string spike_small::select_format() const {
std::string rv("");
- for (int i=0; i<15; i++) {
- rv+="?,";
- }
+ for (int i=0; i<15; i++) rv+="?,";
rv+="?";
return rv;
}
@@ -10981,9 +10701,7 @@ std::string spike_small::print(int full_subtables, int show_ids, int no_refs) co
std::ostringstream rv("");
rv.precision(14);
- if (show_ids) {
- rv << id;
- }
+ if (show_ids) rv << id;
rv << ',';
if (!no_refs) {
if (full_subtables) {
@@ -11030,9 +10748,7 @@ std::string spike_small::print_xml(int full_subtables, int show_ids, int no_refs
rv.precision(14);
rv << xml_indent() << '<' << tag << ">\n";
xml_indent(2);
- if (show_ids) {
- rv << xml_indent() << "<id>" << id << "</id>\n";
- }
+ if (show_ids) rv << xml_indent() << "<id>" << id << "</id>\n";
if (!no_refs) {
if (full_subtables) {
rv << result_id.print_xml(full_subtables,show_ids,no_refs,"result_id");
@@ -11068,7 +10784,7 @@ void spike_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> id;
}
@@ -11079,7 +10795,7 @@ void spike_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> peak_power;
}
@@ -11087,7 +10803,7 @@ void spike_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> mean_power;
}
@@ -11095,7 +10811,7 @@ void spike_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> time;
}
@@ -11103,7 +10819,7 @@ void spike_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> ra;
}
@@ -11111,7 +10827,7 @@ void spike_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> decl;
}
@@ -11119,7 +10835,7 @@ void spike_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> q_pix;
}
@@ -11127,7 +10843,7 @@ void spike_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> freq;
}
@@ -11135,7 +10851,7 @@ void spike_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> detection_freq;
}
@@ -11143,7 +10859,7 @@ void spike_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> barycentric_freq;
}
@@ -11151,7 +10867,7 @@ void spike_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> fft_len;
}
@@ -11159,7 +10875,7 @@ void spike_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> chirp_rate;
}
@@ -11167,7 +10883,7 @@ void spike_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> rfi_checked;
}
@@ -11175,7 +10891,7 @@ void spike_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> rfi_found;
}
@@ -11183,7 +10899,7 @@ void spike_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> reserved;
}
@@ -11261,10 +10977,10 @@ void spike_small::parse(const std::string &s) {
parse(row);
}
-template <> const char *const db_table<autocorr>::table_name="autocorr";
-template <> const char *db_table<autocorr>::_search_tag=table_name;
+template <> const char * const db_table<autocorr>::table_name="autocorr";
+template <> const char * db_table<autocorr>::_search_tag=table_name;
template <> const int db_table<autocorr>::_nfields=17;
-template <> const char *const db_table<autocorr>::column_names[17]= {"id","result_id","peak_power","mean_power","time","ra","decl","q_pix","delay","freq","detection_freq","barycentric_freq","fft_len","chirp_rate","rfi_checked","rfi_found","reserved"};
+template <> const char * const db_table<autocorr>::column_names[17]= {"id","result_id","peak_power","mean_power","time","ra","decl","q_pix","delay","freq","detection_freq","barycentric_freq","fft_len","chirp_rate","rfi_checked","rfi_found","reserved"};
autocorr::autocorr() :
db_table<autocorr>(*this,-1),
@@ -11357,9 +11073,7 @@ autocorr &autocorr::operator =(const autocorr &a) {
std::string autocorr::update_format() const {
std::ostringstream rv("");
- for (int i=2; i<17; i++) {
- rv << "?,";
- }
+ for (int i=2; i<17; i++) rv << "?,";
rv << "?";
return rv.str();
}
@@ -11371,9 +11085,7 @@ std::string autocorr::insert_format() const {
std::string autocorr::select_format() const {
std::string rv("");
- for (int i=0; i<16; i++) {
- rv+="?,";
- }
+ for (int i=0; i<16; i++) rv+="?,";
rv+="?";
return rv;
}
@@ -11382,9 +11094,7 @@ std::string autocorr::print(int full_subtables, int show_ids, int no_refs) const
std::ostringstream rv("");
rv.precision(14);
- if (show_ids) {
- rv << id;
- }
+ if (show_ids) rv << id;
rv << ',';
if (!no_refs) {
if (full_subtables) {
@@ -11433,9 +11143,7 @@ std::string autocorr::print_xml(int full_subtables, int show_ids, int no_refs,co
rv.precision(14);
rv << xml_indent() << '<' << tag << ">\n";
xml_indent(2);
- if (show_ids) {
- rv << xml_indent() << "<id>" << id << "</id>\n";
- }
+ if (show_ids) rv << xml_indent() << "<id>" << id << "</id>\n";
if (!no_refs) {
if (full_subtables) {
rv << result_id.print_xml(full_subtables,show_ids,no_refs,"result_id");
@@ -11472,7 +11180,7 @@ void autocorr::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> id;
}
@@ -11483,7 +11191,7 @@ void autocorr::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> peak_power;
}
@@ -11491,7 +11199,7 @@ void autocorr::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> mean_power;
}
@@ -11499,7 +11207,7 @@ void autocorr::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> time;
}
@@ -11507,7 +11215,7 @@ void autocorr::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> ra;
}
@@ -11515,7 +11223,7 @@ void autocorr::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> decl;
}
@@ -11523,7 +11231,7 @@ void autocorr::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> q_pix;
}
@@ -11531,7 +11239,7 @@ void autocorr::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> delay;
}
@@ -11539,7 +11247,7 @@ void autocorr::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> freq;
}
@@ -11547,7 +11255,7 @@ void autocorr::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> detection_freq;
}
@@ -11555,7 +11263,7 @@ void autocorr::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> barycentric_freq;
}
@@ -11563,7 +11271,7 @@ void autocorr::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> fft_len;
}
@@ -11571,7 +11279,7 @@ void autocorr::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> chirp_rate;
}
@@ -11579,7 +11287,7 @@ void autocorr::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> rfi_checked;
}
@@ -11587,7 +11295,7 @@ void autocorr::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> rfi_found;
}
@@ -11595,7 +11303,7 @@ void autocorr::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> reserved;
}
@@ -11677,10 +11385,10 @@ void autocorr::parse(const std::string &s) {
parse(row);
}
-template <> const char *const db_table<autocorr_small>::table_name="autocorr_small";
-template <> const char *db_table<autocorr_small>::_search_tag=table_name;
+template <> const char * const db_table<autocorr_small>::table_name="autocorr_small";
+template <> const char * db_table<autocorr_small>::_search_tag=table_name;
template <> const int db_table<autocorr_small>::_nfields=17;
-template <> const char *const db_table<autocorr_small>::column_names[17]= {"id","result_id","peak_power","mean_power","time","ra","decl","q_pix","delay","freq","detection_freq","barycentric_freq","fft_len","chirp_rate","rfi_checked","rfi_found","reserved"};
+template <> const char * const db_table<autocorr_small>::column_names[17]= {"id","result_id","peak_power","mean_power","time","ra","decl","q_pix","delay","freq","detection_freq","barycentric_freq","fft_len","chirp_rate","rfi_checked","rfi_found","reserved"};
autocorr_small::autocorr_small() :
db_table<autocorr_small>(*this,-1),
@@ -11773,9 +11481,7 @@ autocorr_small &autocorr_small::operator =(const autocorr_small &a) {
std::string autocorr_small::update_format() const {
std::ostringstream rv("");
- for (int i=2; i<17; i++) {
- rv << "?,";
- }
+ for (int i=2; i<17; i++) rv << "?,";
rv << "?";
return rv.str();
}
@@ -11787,9 +11493,7 @@ std::string autocorr_small::insert_format() const {
std::string autocorr_small::select_format() const {
std::string rv("");
- for (int i=0; i<16; i++) {
- rv+="?,";
- }
+ for (int i=0; i<16; i++) rv+="?,";
rv+="?";
return rv;
}
@@ -11798,9 +11502,7 @@ std::string autocorr_small::print(int full_subtables, int show_ids, int no_refs)
std::ostringstream rv("");
rv.precision(14);
- if (show_ids) {
- rv << id;
- }
+ if (show_ids) rv << id;
rv << ',';
if (!no_refs) {
if (full_subtables) {
@@ -11849,9 +11551,7 @@ std::string autocorr_small::print_xml(int full_subtables, int show_ids, int no_r
rv.precision(14);
rv << xml_indent() << '<' << tag << ">\n";
xml_indent(2);
- if (show_ids) {
- rv << xml_indent() << "<id>" << id << "</id>\n";
- }
+ if (show_ids) rv << xml_indent() << "<id>" << id << "</id>\n";
if (!no_refs) {
if (full_subtables) {
rv << result_id.print_xml(full_subtables,show_ids,no_refs,"result_id");
@@ -11888,7 +11588,7 @@ void autocorr_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> id;
}
@@ -11899,7 +11599,7 @@ void autocorr_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> peak_power;
}
@@ -11907,7 +11607,7 @@ void autocorr_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> mean_power;
}
@@ -11915,7 +11615,7 @@ void autocorr_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> time;
}
@@ -11923,7 +11623,7 @@ void autocorr_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> ra;
}
@@ -11931,7 +11631,7 @@ void autocorr_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> decl;
}
@@ -11939,7 +11639,7 @@ void autocorr_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> q_pix;
}
@@ -11947,7 +11647,7 @@ void autocorr_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> delay;
}
@@ -11955,7 +11655,7 @@ void autocorr_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> freq;
}
@@ -11963,7 +11663,7 @@ void autocorr_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> detection_freq;
}
@@ -11971,7 +11671,7 @@ void autocorr_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> barycentric_freq;
}
@@ -11979,7 +11679,7 @@ void autocorr_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> fft_len;
}
@@ -11987,7 +11687,7 @@ void autocorr_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> chirp_rate;
}
@@ -11995,7 +11695,7 @@ void autocorr_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> rfi_checked;
}
@@ -12003,7 +11703,7 @@ void autocorr_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> rfi_found;
}
@@ -12011,7 +11711,7 @@ void autocorr_small::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> reserved;
}
@@ -12093,10 +11793,10 @@ void autocorr_small::parse(const std::string &s) {
parse(row);
}
-template <> const char *const db_table<classic_versions>::table_name="classic_versions";
-template <> const char *db_table<classic_versions>::_search_tag=table_name;
+template <> const char * const db_table<classic_versions>::table_name="classic_versions";
+template <> const char * db_table<classic_versions>::_search_tag=table_name;
template <> const int db_table<classic_versions>::_nfields=10;
-template <> const char *const db_table<classic_versions>::column_names[10]= {"id","ver_major","ver_minor","platformid","comment","filename","md5_cksum","sum_cksum","cksum_cksum","file_cksum"};
+template <> const char * const db_table<classic_versions>::column_names[10]= {"id","ver_major","ver_minor","platformid","comment","filename","md5_cksum","sum_cksum","cksum_cksum","file_cksum"};
classic_versions::classic_versions() :
db_table<classic_versions>(*this,-1),
@@ -12168,9 +11868,7 @@ classic_versions &classic_versions::operator =(const classic_versions &a) {
std::string classic_versions::update_format() const {
std::ostringstream rv("");
- for (int i=2; i<10; i++) {
- rv << "?,";
- }
+ for (int i=2; i<10; i++) rv << "?,";
rv << "?";
return rv.str();
}
@@ -12182,9 +11880,7 @@ std::string classic_versions::insert_format() const {
std::string classic_versions::select_format() const {
std::string rv("");
- for (int i=0; i<9; i++) {
- rv+="?,";
- }
+ for (int i=0; i<9; i++) rv+="?,";
rv+="?";
return rv;
}
@@ -12193,9 +11889,7 @@ std::string classic_versions::print(int full_subtables, int show_ids, int no_ref
std::ostringstream rv("");
rv.precision(14);
- if (show_ids) {
- rv << id;
- }
+ if (show_ids) rv << id;
rv << ',';
rv << ver_major;
rv << ',';
@@ -12224,9 +11918,7 @@ std::string classic_versions::print_xml(int full_subtables, int show_ids, int no
rv.precision(14);
rv << xml_indent() << '<' << tag << ">\n";
xml_indent(2);
- if (show_ids) {
- rv << xml_indent() << "<id>" << id << "</id>\n";
- }
+ if (show_ids) rv << xml_indent() << "<id>" << id << "</id>\n";
rv << xml_indent() << "<ver_major>" << ver_major << "</ver_major>\n";
rv << xml_indent() << "<ver_minor>" << ver_minor << "</ver_minor>\n";
rv << xml_indent() << "<platformid>" << platformid << "</platformid>\n";
@@ -12270,7 +11962,7 @@ void classic_versions::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> id;
}
@@ -12278,7 +11970,7 @@ void classic_versions::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> ver_major;
}
@@ -12286,7 +11978,7 @@ void classic_versions::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> ver_minor;
}
@@ -12294,7 +11986,7 @@ void classic_versions::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> platformid;
}
@@ -12302,14 +11994,10 @@ void classic_versions::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::string::size_type epos=sub.find("<",pos);
- if (epos==std::string::npos) {
- epos=sub.find('\n',pos);
- }
- if (epos==std::string::npos) {
- epos=pos+strlen(sub.c_str()+pos);
- }
+ if (epos==std::string::npos) epos=sub.find('\n',pos);
+ if (epos==std::string::npos) epos=pos+strlen(sub.c_str()+pos);
std::vector<unsigned char> in(xml_decode_string<unsigned char>((const char *)sub.c_str()+pos,epos-pos));
strncpy(comment,(const char *)&(in.front()),std::min(in.size(),(size_t)254));
comment[std::min(in.size(),(size_t)253)]=0;
@@ -12318,14 +12006,10 @@ void classic_versions::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::string::size_type epos=sub.find("<",pos);
- if (epos==std::string::npos) {
- epos=sub.find('\n',pos);
- }
- if (epos==std::string::npos) {
- epos=pos+strlen(sub.c_str()+pos);
- }
+ if (epos==std::string::npos) epos=sub.find('\n',pos);
+ if (epos==std::string::npos) epos=pos+strlen(sub.c_str()+pos);
std::vector<unsigned char> in(xml_decode_string<unsigned char>((const char *)sub.c_str()+pos,epos-pos));
strncpy(filename,(const char *)&(in.front()),std::min(in.size(),(size_t)254));
filename[std::min(in.size(),(size_t)253)]=0;
@@ -12334,14 +12018,10 @@ void classic_versions::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::string::size_type epos=sub.find("<",pos);
- if (epos==std::string::npos) {
- epos=sub.find('\n',pos);
- }
- if (epos==std::string::npos) {
- epos=pos+strlen(sub.c_str()+pos);
- }
+ if (epos==std::string::npos) epos=sub.find('\n',pos);
+ if (epos==std::string::npos) epos=pos+strlen(sub.c_str()+pos);
std::vector<unsigned char> in(xml_decode_string<unsigned char>((const char *)sub.c_str()+pos,epos-pos));
strncpy(md5_cksum,(const char *)&(in.front()),std::min(in.size(),(size_t)254));
md5_cksum[std::min(in.size(),(size_t)253)]=0;
@@ -12350,14 +12030,10 @@ void classic_versions::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::string::size_type epos=sub.find("<",pos);
- if (epos==std::string::npos) {
- epos=sub.find('\n',pos);
- }
- if (epos==std::string::npos) {
- epos=pos+strlen(sub.c_str()+pos);
- }
+ if (epos==std::string::npos) epos=sub.find('\n',pos);
+ if (epos==std::string::npos) epos=pos+strlen(sub.c_str()+pos);
std::vector<unsigned char> in(xml_decode_string<unsigned char>((const char *)sub.c_str()+pos,epos-pos));
strncpy(sum_cksum,(const char *)&(in.front()),std::min(in.size(),(size_t)254));
sum_cksum[std::min(in.size(),(size_t)253)]=0;
@@ -12366,14 +12042,10 @@ void classic_versions::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::string::size_type epos=sub.find("<",pos);
- if (epos==std::string::npos) {
- epos=sub.find('\n',pos);
- }
- if (epos==std::string::npos) {
- epos=pos+strlen(sub.c_str()+pos);
- }
+ if (epos==std::string::npos) epos=sub.find('\n',pos);
+ if (epos==std::string::npos) epos=pos+strlen(sub.c_str()+pos);
std::vector<unsigned char> in(xml_decode_string<unsigned char>((const char *)sub.c_str()+pos,epos-pos));
strncpy(cksum_cksum,(const char *)&(in.front()),std::min(in.size(),(size_t)254));
cksum_cksum[std::min(in.size(),(size_t)253)]=0;
@@ -12382,7 +12054,7 @@ void classic_versions::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> file_cksum;
}
@@ -12437,10 +12109,10 @@ void classic_versions::parse(const std::string &s) {
parse(row);
}
-template <> const char *const db_table<classic_active_versions>::table_name="classic_active_versions";
-template <> const char *db_table<classic_active_versions>::_search_tag=table_name;
+template <> const char * const db_table<classic_active_versions>::table_name="classic_active_versions";
+template <> const char * db_table<classic_active_versions>::_search_tag=table_name;
template <> const int db_table<classic_active_versions>::_nfields=4;
-template <> const char *const db_table<classic_active_versions>::column_names[4]= {"id","versionid","ver_major","ver_minor"};
+template <> const char * const db_table<classic_active_versions>::column_names[4]= {"id","versionid","ver_major","ver_minor"};
classic_active_versions::classic_active_versions() :
db_table<classic_active_versions>(*this,-1),
@@ -12494,9 +12166,7 @@ classic_active_versions &classic_active_versions::operator =(const classic_activ
std::string classic_active_versions::update_format() const {
std::ostringstream rv("");
- for (int i=2; i<4; i++) {
- rv << "?,";
- }
+ for (int i=2; i<4; i++) rv << "?,";
rv << "?";
return rv.str();
}
@@ -12508,9 +12178,7 @@ std::string classic_active_versions::insert_format() const {
std::string classic_active_versions::select_format() const {
std::string rv("");
- for (int i=0; i<3; i++) {
- rv+="?,";
- }
+ for (int i=0; i<3; i++) rv+="?,";
rv+="?";
return rv;
}
@@ -12519,9 +12187,7 @@ std::string classic_active_versions::print(int full_subtables, int show_ids, int
std::ostringstream rv("");
rv.precision(14);
- if (show_ids) {
- rv << id;
- }
+ if (show_ids) rv << id;
rv << ',';
rv << versionid;
rv << ',';
@@ -12538,9 +12204,7 @@ std::string classic_active_versions::print_xml(int full_subtables, int show_ids,
rv.precision(14);
rv << xml_indent() << '<' << tag << ">\n";
xml_indent(2);
- if (show_ids) {
- rv << xml_indent() << "<id>" << id << "</id>\n";
- }
+ if (show_ids) rv << xml_indent() << "<id>" << id << "</id>\n";
rv << xml_indent() << "<versionid>" << versionid << "</versionid>\n";
rv << xml_indent() << "<ver_major>" << ver_major << "</ver_major>\n";
rv << xml_indent() << "<ver_minor>" << ver_minor << "</ver_minor>\n";
@@ -12558,7 +12222,7 @@ void classic_active_versions::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> id;
}
@@ -12566,7 +12230,7 @@ void classic_active_versions::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> versionid;
}
@@ -12574,7 +12238,7 @@ void classic_active_versions::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> ver_major;
}
@@ -12582,7 +12246,7 @@ void classic_active_versions::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> ver_minor;
}
@@ -12613,10 +12277,10 @@ void classic_active_versions::parse(const std::string &s) {
parse(row);
}
-template <> const char *const db_table<classic_active_versionids>::table_name="classic_active_versionids";
-template <> const char *db_table<classic_active_versionids>::_search_tag=table_name;
+template <> const char * const db_table<classic_active_versionids>::table_name="classic_active_versionids";
+template <> const char * db_table<classic_active_versionids>::_search_tag=table_name;
template <> const int db_table<classic_active_versionids>::_nfields=2;
-template <> const char *const db_table<classic_active_versionids>::column_names[2]= {"id","versionid"};
+template <> const char * const db_table<classic_active_versionids>::column_names[2]= {"id","versionid"};
classic_active_versionids::classic_active_versionids() :
db_table<classic_active_versionids>(*this,-1),
@@ -12664,9 +12328,7 @@ classic_active_versionids &classic_active_versionids::operator =(const classic_a
std::string classic_active_versionids::update_format() const {
std::ostringstream rv("");
- for (int i=2; i<2; i++) {
- rv << "?,";
- }
+ for (int i=2; i<2; i++) rv << "?,";
rv << "?";
return rv.str();
}
@@ -12678,9 +12340,7 @@ std::string classic_active_versionids::insert_format() const {
std::string classic_active_versionids::select_format() const {
std::string rv("");
- for (int i=0; i<1; i++) {
- rv+="?,";
- }
+ for (int i=0; i<1; i++) rv+="?,";
rv+="?";
return rv;
}
@@ -12689,9 +12349,7 @@ std::string classic_active_versionids::print(int full_subtables, int show_ids, i
std::ostringstream rv("");
rv.precision(14);
- if (show_ids) {
- rv << id;
- }
+ if (show_ids) rv << id;
rv << ',';
rv << versionid;
return rv.str();
@@ -12704,9 +12362,7 @@ std::string classic_active_versionids::print_xml(int full_subtables, int show_id
rv.precision(14);
rv << xml_indent() << '<' << tag << ">\n";
xml_indent(2);
- if (show_ids) {
- rv << xml_indent() << "<id>" << id << "</id>\n";
- }
+ if (show_ids) rv << xml_indent() << "<id>" << id << "</id>\n";
rv << xml_indent() << "<versionid>" << versionid << "</versionid>\n";
xml_indent(-2);
rv << xml_indent() << "</" << tag << ">\n";
@@ -12722,7 +12378,7 @@ void classic_active_versionids::parse_xml(const std::string &s,const char *tag)
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> id;
}
@@ -12730,7 +12386,7 @@ void classic_active_versionids::parse_xml(const std::string &s,const char *tag)
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> versionid;
}
@@ -12753,10 +12409,10 @@ void classic_active_versionids::parse(const std::string &s) {
parse(row);
}
-template <> const char *const db_table<rfi_zone>::table_name="rfi_zone";
-template <> const char *db_table<rfi_zone>::_search_tag=table_name;
+template <> const char * const db_table<rfi_zone>::table_name="rfi_zone";
+template <> const char * db_table<rfi_zone>::_search_tag=table_name;
template <> const int db_table<rfi_zone>::_nfields=26;
-template <> const char *const db_table<rfi_zone>::column_names[26]= {"id","min_receiver_s4id","max_receiver_s4id","min_splitter_config","max_splitter_config","min_analysis_config","max_analysis_config","min_tape_id","max_tape_id","min_workunit_id","max_workunit_id","min_result_id","max_result_id","min_time","max_time","central_baseband_freq","baseband_freq_width","central_detection_freq","detection_freq_width","central_period","period_width","fft_len_flags","signal_type_flags","ra","dec" [...]
+template <> const char * const db_table<rfi_zone>::column_names[26]= {"id","min_receiver_s4id","max_receiver_s4id","min_splitter_config","max_splitter_config","min_analysis_config","max_analysis_config","min_tape_id","max_tape_id","min_workunit_id","max_workunit_id","min_result_id","max_result_id","min_time","max_time","central_baseband_freq","baseband_freq_width","central_detection_freq","detection_freq_width","central_period","period_width","fft_len_flags","signal_type_flags","ra","dec [...]
rfi_zone::rfi_zone() :
db_table<rfi_zone>(*this,-1),
@@ -12876,9 +12532,7 @@ rfi_zone &rfi_zone::operator =(const rfi_zone &a) {
std::string rfi_zone::update_format() const {
std::ostringstream rv("");
- for (int i=2; i<26; i++) {
- rv << "?,";
- }
+ for (int i=2; i<26; i++) rv << "?,";
rv << "?";
return rv.str();
}
@@ -12890,9 +12544,7 @@ std::string rfi_zone::insert_format() const {
std::string rfi_zone::select_format() const {
std::string rv("");
- for (int i=0; i<25; i++) {
- rv+="?,";
- }
+ for (int i=0; i<25; i++) rv+="?,";
rv+="?";
return rv;
}
@@ -12901,9 +12553,7 @@ std::string rfi_zone::print(int full_subtables, int show_ids, int no_refs) const
std::ostringstream rv("");
rv.precision(14);
- if (show_ids) {
- rv << id;
- }
+ if (show_ids) rv << id;
rv << ',';
rv << min_receiver_s4id;
rv << ',';
@@ -12964,9 +12614,7 @@ std::string rfi_zone::print_xml(int full_subtables, int show_ids, int no_refs,co
rv.precision(14);
rv << xml_indent() << '<' << tag << ">\n";
xml_indent(2);
- if (show_ids) {
- rv << xml_indent() << "<id>" << id << "</id>\n";
- }
+ if (show_ids) rv << xml_indent() << "<id>" << id << "</id>\n";
rv << xml_indent() << "<min_receiver_s4id>" << min_receiver_s4id << "</min_receiver_s4id>\n";
rv << xml_indent() << "<max_receiver_s4id>" << max_receiver_s4id << "</max_receiver_s4id>\n";
rv << xml_indent() << "<min_splitter_config>" << min_splitter_config << "</min_splitter_config>\n";
@@ -13006,7 +12654,7 @@ void rfi_zone::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> id;
}
@@ -13014,7 +12662,7 @@ void rfi_zone::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> min_receiver_s4id;
}
@@ -13022,7 +12670,7 @@ void rfi_zone::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> max_receiver_s4id;
}
@@ -13030,7 +12678,7 @@ void rfi_zone::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> min_splitter_config;
}
@@ -13038,7 +12686,7 @@ void rfi_zone::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> max_splitter_config;
}
@@ -13046,7 +12694,7 @@ void rfi_zone::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> min_analysis_config;
}
@@ -13054,7 +12702,7 @@ void rfi_zone::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> max_analysis_config;
}
@@ -13062,7 +12710,7 @@ void rfi_zone::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> min_tape_id;
}
@@ -13070,7 +12718,7 @@ void rfi_zone::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> max_tape_id;
}
@@ -13078,7 +12726,7 @@ void rfi_zone::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> min_workunit_id;
}
@@ -13086,7 +12734,7 @@ void rfi_zone::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> max_workunit_id;
}
@@ -13094,7 +12742,7 @@ void rfi_zone::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> min_result_id;
}
@@ -13102,7 +12750,7 @@ void rfi_zone::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> max_result_id;
}
@@ -13110,7 +12758,7 @@ void rfi_zone::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> min_time;
}
@@ -13118,7 +12766,7 @@ void rfi_zone::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> max_time;
}
@@ -13126,7 +12774,7 @@ void rfi_zone::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> central_baseband_freq;
}
@@ -13134,7 +12782,7 @@ void rfi_zone::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> baseband_freq_width;
}
@@ -13142,7 +12790,7 @@ void rfi_zone::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> central_detection_freq;
}
@@ -13150,7 +12798,7 @@ void rfi_zone::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> detection_freq_width;
}
@@ -13158,7 +12806,7 @@ void rfi_zone::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> central_period;
}
@@ -13166,7 +12814,7 @@ void rfi_zone::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> period_width;
}
@@ -13174,7 +12822,7 @@ void rfi_zone::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> fft_len_flags;
}
@@ -13182,7 +12830,7 @@ void rfi_zone::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> signal_type_flags;
}
@@ -13190,7 +12838,7 @@ void rfi_zone::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> ra;
}
@@ -13198,7 +12846,7 @@ void rfi_zone::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> dec;
}
@@ -13206,7 +12854,7 @@ void rfi_zone::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> angular_distance;
}
@@ -13325,10 +12973,10 @@ void rfi_zone::parse(const std::string &s) {
parse(row);
}
-template <> const char *const db_table<bad_data>::table_name="bad_data";
-template <> const char *db_table<bad_data>::_search_tag=table_name;
+template <> const char * const db_table<bad_data>::table_name="bad_data";
+template <> const char * db_table<bad_data>::_search_tag=table_name;
template <> const int db_table<bad_data>::_nfields=3;
-template <> const char *const db_table<bad_data>::column_names[3]= {"name","beam""reason"};
+template <> const char * const db_table<bad_data>::column_names[3]= {"name","beam""reason"};
bad_data::bad_data() :
db_table<bad_data>(*this,-1),
@@ -13379,9 +13027,7 @@ bad_data &bad_data::operator =(const bad_data &a) {
std::string bad_data::update_format() const {
std::ostringstream rv("");
- for (int i=2; i<3; i++) {
- rv << "?,";
- }
+ for (int i=2; i<3; i++) rv << "?,";
rv << "?";
return rv.str();
}
@@ -13393,9 +13039,7 @@ std::string bad_data::insert_format() const {
std::string bad_data::select_format() const {
std::string rv("");
- for (int i=0; i<2; i++) {
- rv+="?,";
- }
+ for (int i=0; i<2; i++) rv+="?,";
rv+="?";
return rv;
}
@@ -13444,14 +13088,10 @@ void bad_data::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::string::size_type epos=sub.find("<",pos);
- if (epos==std::string::npos) {
- epos=sub.find('\n',pos);
- }
- if (epos==std::string::npos) {
- epos=pos+strlen(sub.c_str()+pos);
- }
+ if (epos==std::string::npos) epos=sub.find('\n',pos);
+ if (epos==std::string::npos) epos=pos+strlen(sub.c_str()+pos);
std::vector<unsigned char> in(xml_decode_string<unsigned char>((const char *)sub.c_str()+pos,epos-pos));
strncpy(name,(const char *)&(in.front()),std::min(in.size(),(size_t)20));
name[std::min(in.size(),(size_t)19)]=0;
@@ -13460,7 +13100,7 @@ void bad_data::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> beam;
}
@@ -13468,14 +13108,10 @@ void bad_data::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::string::size_type epos=sub.find("<",pos);
- if (epos==std::string::npos) {
- epos=sub.find('\n',pos);
- }
- if (epos==std::string::npos) {
- epos=pos+strlen(sub.c_str()+pos);
- }
+ if (epos==std::string::npos) epos=sub.find('\n',pos);
+ if (epos==std::string::npos) epos=pos+strlen(sub.c_str()+pos);
std::vector<unsigned char> in(xml_decode_string<unsigned char>((const char *)sub.c_str()+pos,epos-pos));
strncpy(reason,(const char *)&(in.front()),std::min(in.size(),(size_t)255));
reason[std::min(in.size(),(size_t)254)]=0;
@@ -13503,10 +13139,10 @@ void bad_data::parse(const std::string &s) {
parse(row);
}
-template <> const char *const db_table<spike_tinysky>::table_name="spike_tinysky";
-template <> const char *db_table<spike_tinysky>::_search_tag=table_name;
+template <> const char * const db_table<spike_tinysky>::table_name="spike_tinysky";
+template <> const char * db_table<spike_tinysky>::_search_tag=table_name;
template <> const int db_table<spike_tinysky>::_nfields=16;
-template <> const char *const db_table<spike_tinysky>::column_names[16]= {"id","result_id","peak_power","mean_power","time","ra","decl","q_pix","freq","detection_freq","barycentric_freq","fft_len","chirp_rate","rfi_checked","rfi_found","reserved"};
+template <> const char * const db_table<spike_tinysky>::column_names[16]= {"id","result_id","peak_power","mean_power","time","ra","decl","q_pix","freq","detection_freq","barycentric_freq","fft_len","chirp_rate","rfi_checked","rfi_found","reserved"};
spike_tinysky::spike_tinysky() :
db_table<spike_tinysky>(*this,-1),
@@ -13596,9 +13232,7 @@ spike_tinysky &spike_tinysky::operator =(const spike_tinysky &a) {
std::string spike_tinysky::update_format() const {
std::ostringstream rv("");
- for (int i=2; i<16; i++) {
- rv << "?,";
- }
+ for (int i=2; i<16; i++) rv << "?,";
rv << "?";
return rv.str();
}
@@ -13610,9 +13244,7 @@ std::string spike_tinysky::insert_format() const {
std::string spike_tinysky::select_format() const {
std::string rv("");
- for (int i=0; i<15; i++) {
- rv+="?,";
- }
+ for (int i=0; i<15; i++) rv+="?,";
rv+="?";
return rv;
}
@@ -13621,9 +13253,7 @@ std::string spike_tinysky::print(int full_subtables, int show_ids, int no_refs)
std::ostringstream rv("");
rv.precision(14);
- if (show_ids) {
- rv << id;
- }
+ if (show_ids) rv << id;
rv << ',';
if (!no_refs) {
if (full_subtables) {
@@ -13670,9 +13300,7 @@ std::string spike_tinysky::print_xml(int full_subtables, int show_ids, int no_re
rv.precision(14);
rv << xml_indent() << '<' << tag << ">\n";
xml_indent(2);
- if (show_ids) {
- rv << xml_indent() << "<id>" << id << "</id>\n";
- }
+ if (show_ids) rv << xml_indent() << "<id>" << id << "</id>\n";
if (!no_refs) {
if (full_subtables) {
rv << result_id.print_xml(full_subtables,show_ids,no_refs,"result_id");
@@ -13708,7 +13336,7 @@ void spike_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> id;
}
@@ -13719,7 +13347,7 @@ void spike_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> peak_power;
}
@@ -13727,7 +13355,7 @@ void spike_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> mean_power;
}
@@ -13735,7 +13363,7 @@ void spike_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> time;
}
@@ -13743,7 +13371,7 @@ void spike_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> ra;
}
@@ -13751,7 +13379,7 @@ void spike_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> decl;
}
@@ -13759,7 +13387,7 @@ void spike_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> q_pix;
}
@@ -13767,7 +13395,7 @@ void spike_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> freq;
}
@@ -13775,7 +13403,7 @@ void spike_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> detection_freq;
}
@@ -13783,7 +13411,7 @@ void spike_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> barycentric_freq;
}
@@ -13791,7 +13419,7 @@ void spike_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> fft_len;
}
@@ -13799,7 +13427,7 @@ void spike_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> chirp_rate;
}
@@ -13807,7 +13435,7 @@ void spike_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> rfi_checked;
}
@@ -13815,7 +13443,7 @@ void spike_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> rfi_found;
}
@@ -13823,7 +13451,7 @@ void spike_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> reserved;
}
@@ -13901,10 +13529,10 @@ void spike_tinysky::parse(const std::string &s) {
parse(row);
}
-template <> const char *const db_table<gaussian_tinysky>::table_name="gaussian_tinysky";
-template <> const char *db_table<gaussian_tinysky>::_search_tag=table_name;
+template <> const char * const db_table<gaussian_tinysky>::table_name="gaussian_tinysky";
+template <> const char * db_table<gaussian_tinysky>::_search_tag=table_name;
template <> const int db_table<gaussian_tinysky>::_nfields=22;
-template <> const char *const db_table<gaussian_tinysky>::column_names[22]= {"id","result_id","peak_power","mean_power","time","ra","decl","q_pix","freq","detection_freq","barycentric_freq","fft_len","chirp_rate","rfi_checked","rfi_found","reserved","sigma","chisqr","null_chisqr","score","max_power","pot"};
+template <> const char * const db_table<gaussian_tinysky>::column_names[22]= {"id","result_id","peak_power","mean_power","time","ra","decl","q_pix","freq","detection_freq","barycentric_freq","fft_len","chirp_rate","rfi_checked","rfi_found","reserved","sigma","chisqr","null_chisqr","score","max_power","pot"};
gaussian_tinysky::gaussian_tinysky() :
db_table<gaussian_tinysky>(*this,-1),
@@ -14012,9 +13640,7 @@ gaussian_tinysky &gaussian_tinysky::operator =(const gaussian_tinysky &a) {
std::string gaussian_tinysky::update_format() const {
std::ostringstream rv("");
- for (int i=2; i<22; i++) {
- rv << "?,";
- }
+ for (int i=2; i<22; i++) rv << "?,";
rv << "?";
return rv.str();
}
@@ -14026,9 +13652,7 @@ std::string gaussian_tinysky::insert_format() const {
std::string gaussian_tinysky::select_format() const {
std::string rv("");
- for (int i=0; i<21; i++) {
- rv+="?,";
- }
+ for (int i=0; i<21; i++) rv+="?,";
rv+="?";
return rv;
}
@@ -14037,9 +13661,7 @@ std::string gaussian_tinysky::print(int full_subtables, int show_ids, int no_ref
std::ostringstream rv("");
rv.precision(14);
- if (show_ids) {
- rv << id;
- }
+ if (show_ids) rv << id;
rv << ',';
if (!no_refs) {
if (full_subtables) {
@@ -14098,9 +13720,7 @@ std::string gaussian_tinysky::print_xml(int full_subtables, int show_ids, int no
rv.precision(14);
rv << xml_indent() << '<' << tag << ">\n";
xml_indent(2);
- if (show_ids) {
- rv << xml_indent() << "<id>" << id << "</id>\n";
- }
+ if (show_ids) rv << xml_indent() << "<id>" << id << "</id>\n";
if (!no_refs) {
if (full_subtables) {
rv << result_id.print_xml(full_subtables,show_ids,no_refs,"result_id");
@@ -14146,7 +13766,7 @@ void gaussian_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> id;
}
@@ -14157,7 +13777,7 @@ void gaussian_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> peak_power;
}
@@ -14165,7 +13785,7 @@ void gaussian_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> mean_power;
}
@@ -14173,7 +13793,7 @@ void gaussian_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> time;
}
@@ -14181,7 +13801,7 @@ void gaussian_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> ra;
}
@@ -14189,7 +13809,7 @@ void gaussian_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> decl;
}
@@ -14197,7 +13817,7 @@ void gaussian_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> q_pix;
}
@@ -14205,7 +13825,7 @@ void gaussian_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> freq;
}
@@ -14213,7 +13833,7 @@ void gaussian_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> detection_freq;
}
@@ -14221,7 +13841,7 @@ void gaussian_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> barycentric_freq;
}
@@ -14229,7 +13849,7 @@ void gaussian_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> fft_len;
}
@@ -14237,7 +13857,7 @@ void gaussian_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> chirp_rate;
}
@@ -14245,7 +13865,7 @@ void gaussian_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> rfi_checked;
}
@@ -14253,7 +13873,7 @@ void gaussian_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> rfi_found;
}
@@ -14261,7 +13881,7 @@ void gaussian_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> reserved;
}
@@ -14269,7 +13889,7 @@ void gaussian_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> sigma;
}
@@ -14277,7 +13897,7 @@ void gaussian_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> chisqr;
}
@@ -14285,7 +13905,7 @@ void gaussian_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> null_chisqr;
}
@@ -14293,7 +13913,7 @@ void gaussian_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> score;
}
@@ -14301,7 +13921,7 @@ void gaussian_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> max_power;
}
@@ -14406,10 +14026,10 @@ void gaussian_tinysky::parse(const std::string &s) {
parse(row);
}
-template <> const char *const db_table<pulse_tinysky>::table_name="pulse_tinysky";
-template <> const char *db_table<pulse_tinysky>::_search_tag=table_name;
+template <> const char * const db_table<pulse_tinysky>::table_name="pulse_tinysky";
+template <> const char * db_table<pulse_tinysky>::_search_tag=table_name;
template <> const int db_table<pulse_tinysky>::_nfields=22;
-template <> const char *const db_table<pulse_tinysky>::column_names[22]= {"id","result_id","peak_power","mean_power","time","ra","decl","q_pix","freq","detection_freq","barycentric_freq","fft_len","chirp_rate","rfi_checked","rfi_found","reserved","period","snr","thresh","score","len_prof","pot"};
+template <> const char * const db_table<pulse_tinysky>::column_names[22]= {"id","result_id","peak_power","mean_power","time","ra","decl","q_pix","freq","detection_freq","barycentric_freq","fft_len","chirp_rate","rfi_checked","rfi_found","reserved","period","snr","thresh","score","len_prof","pot"};
pulse_tinysky::pulse_tinysky() :
db_table<pulse_tinysky>(*this,-1),
@@ -14517,9 +14137,7 @@ pulse_tinysky &pulse_tinysky::operator =(const pulse_tinysky &a) {
std::string pulse_tinysky::update_format() const {
std::ostringstream rv("");
- for (int i=2; i<22; i++) {
- rv << "?,";
- }
+ for (int i=2; i<22; i++) rv << "?,";
rv << "?";
return rv.str();
}
@@ -14531,9 +14149,7 @@ std::string pulse_tinysky::insert_format() const {
std::string pulse_tinysky::select_format() const {
std::string rv("");
- for (int i=0; i<21; i++) {
- rv+="?,";
- }
+ for (int i=0; i<21; i++) rv+="?,";
rv+="?";
return rv;
}
@@ -14542,9 +14158,7 @@ std::string pulse_tinysky::print(int full_subtables, int show_ids, int no_refs)
std::ostringstream rv("");
rv.precision(14);
- if (show_ids) {
- rv << id;
- }
+ if (show_ids) rv << id;
rv << ',';
if (!no_refs) {
if (full_subtables) {
@@ -14603,9 +14217,7 @@ std::string pulse_tinysky::print_xml(int full_subtables, int show_ids, int no_re
rv.precision(14);
rv << xml_indent() << '<' << tag << ">\n";
xml_indent(2);
- if (show_ids) {
- rv << xml_indent() << "<id>" << id << "</id>\n";
- }
+ if (show_ids) rv << xml_indent() << "<id>" << id << "</id>\n";
if (!no_refs) {
if (full_subtables) {
rv << result_id.print_xml(full_subtables,show_ids,no_refs,"result_id");
@@ -14651,7 +14263,7 @@ void pulse_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> id;
}
@@ -14662,7 +14274,7 @@ void pulse_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> peak_power;
}
@@ -14670,7 +14282,7 @@ void pulse_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> mean_power;
}
@@ -14678,7 +14290,7 @@ void pulse_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> time;
}
@@ -14686,7 +14298,7 @@ void pulse_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> ra;
}
@@ -14694,7 +14306,7 @@ void pulse_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> decl;
}
@@ -14702,7 +14314,7 @@ void pulse_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> q_pix;
}
@@ -14710,7 +14322,7 @@ void pulse_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> freq;
}
@@ -14718,7 +14330,7 @@ void pulse_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> detection_freq;
}
@@ -14726,7 +14338,7 @@ void pulse_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> barycentric_freq;
}
@@ -14734,7 +14346,7 @@ void pulse_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> fft_len;
}
@@ -14742,7 +14354,7 @@ void pulse_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> chirp_rate;
}
@@ -14750,7 +14362,7 @@ void pulse_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> rfi_checked;
}
@@ -14758,7 +14370,7 @@ void pulse_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> rfi_found;
}
@@ -14766,7 +14378,7 @@ void pulse_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> reserved;
}
@@ -14774,7 +14386,7 @@ void pulse_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> period;
}
@@ -14782,7 +14394,7 @@ void pulse_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> snr;
}
@@ -14790,7 +14402,7 @@ void pulse_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> thresh;
}
@@ -14798,7 +14410,7 @@ void pulse_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> score;
}
@@ -14806,7 +14418,7 @@ void pulse_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> len_prof;
}
@@ -14911,10 +14523,10 @@ void pulse_tinysky::parse(const std::string &s) {
parse(row);
}
-template <> const char *const db_table<triplet_tinysky>::table_name="triplet_tinysky";
-template <> const char *db_table<triplet_tinysky>::_search_tag=table_name;
+template <> const char * const db_table<triplet_tinysky>::table_name="triplet_tinysky";
+template <> const char * db_table<triplet_tinysky>::_search_tag=table_name;
template <> const int db_table<triplet_tinysky>::_nfields=17;
-template <> const char *const db_table<triplet_tinysky>::column_names[17]= {"id","result_id","peak_power","mean_power","time","ra","decl","q_pix","freq","detection_freq","barycentric_freq","fft_len","chirp_rate","rfi_checked","rfi_found","reserved","period"};
+template <> const char * const db_table<triplet_tinysky>::column_names[17]= {"id","result_id","peak_power","mean_power","time","ra","decl","q_pix","freq","detection_freq","barycentric_freq","fft_len","chirp_rate","rfi_checked","rfi_found","reserved","period"};
triplet_tinysky::triplet_tinysky() :
db_table<triplet_tinysky>(*this,-1),
@@ -15007,9 +14619,7 @@ triplet_tinysky &triplet_tinysky::operator =(const triplet_tinysky &a) {
std::string triplet_tinysky::update_format() const {
std::ostringstream rv("");
- for (int i=2; i<17; i++) {
- rv << "?,";
- }
+ for (int i=2; i<17; i++) rv << "?,";
rv << "?";
return rv.str();
}
@@ -15021,9 +14631,7 @@ std::string triplet_tinysky::insert_format() const {
std::string triplet_tinysky::select_format() const {
std::string rv("");
- for (int i=0; i<16; i++) {
- rv+="?,";
- }
+ for (int i=0; i<16; i++) rv+="?,";
rv+="?";
return rv;
}
@@ -15032,9 +14640,7 @@ std::string triplet_tinysky::print(int full_subtables, int show_ids, int no_refs
std::ostringstream rv("");
rv.precision(14);
- if (show_ids) {
- rv << id;
- }
+ if (show_ids) rv << id;
rv << ',';
if (!no_refs) {
if (full_subtables) {
@@ -15083,9 +14689,7 @@ std::string triplet_tinysky::print_xml(int full_subtables, int show_ids, int no_
rv.precision(14);
rv << xml_indent() << '<' << tag << ">\n";
xml_indent(2);
- if (show_ids) {
- rv << xml_indent() << "<id>" << id << "</id>\n";
- }
+ if (show_ids) rv << xml_indent() << "<id>" << id << "</id>\n";
if (!no_refs) {
if (full_subtables) {
rv << result_id.print_xml(full_subtables,show_ids,no_refs,"result_id");
@@ -15122,7 +14726,7 @@ void triplet_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> id;
}
@@ -15133,7 +14737,7 @@ void triplet_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> peak_power;
}
@@ -15141,7 +14745,7 @@ void triplet_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> mean_power;
}
@@ -15149,7 +14753,7 @@ void triplet_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> time;
}
@@ -15157,7 +14761,7 @@ void triplet_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> ra;
}
@@ -15165,7 +14769,7 @@ void triplet_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> decl;
}
@@ -15173,7 +14777,7 @@ void triplet_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> q_pix;
}
@@ -15181,7 +14785,7 @@ void triplet_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> freq;
}
@@ -15189,7 +14793,7 @@ void triplet_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> detection_freq;
}
@@ -15197,7 +14801,7 @@ void triplet_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> barycentric_freq;
}
@@ -15205,7 +14809,7 @@ void triplet_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> fft_len;
}
@@ -15213,7 +14817,7 @@ void triplet_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> chirp_rate;
}
@@ -15221,7 +14825,7 @@ void triplet_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> rfi_checked;
}
@@ -15229,7 +14833,7 @@ void triplet_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> rfi_found;
}
@@ -15237,7 +14841,7 @@ void triplet_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> reserved;
}
@@ -15245,7 +14849,7 @@ void triplet_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> period;
}
@@ -15327,10 +14931,10 @@ void triplet_tinysky::parse(const std::string &s) {
parse(row);
}
-template <> const char *const db_table<autocorr_tinysky>::table_name="autocorr_tinysky";
-template <> const char *db_table<autocorr_tinysky>::_search_tag=table_name;
+template <> const char * const db_table<autocorr_tinysky>::table_name="autocorr_tinysky";
+template <> const char * db_table<autocorr_tinysky>::_search_tag=table_name;
template <> const int db_table<autocorr_tinysky>::_nfields=17;
-template <> const char *const db_table<autocorr_tinysky>::column_names[17]= {"id","result_id","peak_power","mean_power","time","ra","decl","q_pix","delay","freq","detection_freq","barycentric_freq","fft_len","chirp_rate","rfi_checked","rfi_found","reserved"};
+template <> const char * const db_table<autocorr_tinysky>::column_names[17]= {"id","result_id","peak_power","mean_power","time","ra","decl","q_pix","delay","freq","detection_freq","barycentric_freq","fft_len","chirp_rate","rfi_checked","rfi_found","reserved"};
autocorr_tinysky::autocorr_tinysky() :
db_table<autocorr_tinysky>(*this,-1),
@@ -15423,9 +15027,7 @@ autocorr_tinysky &autocorr_tinysky::operator =(const autocorr_tinysky &a) {
std::string autocorr_tinysky::update_format() const {
std::ostringstream rv("");
- for (int i=2; i<17; i++) {
- rv << "?,";
- }
+ for (int i=2; i<17; i++) rv << "?,";
rv << "?";
return rv.str();
}
@@ -15437,9 +15039,7 @@ std::string autocorr_tinysky::insert_format() const {
std::string autocorr_tinysky::select_format() const {
std::string rv("");
- for (int i=0; i<16; i++) {
- rv+="?,";
- }
+ for (int i=0; i<16; i++) rv+="?,";
rv+="?";
return rv;
}
@@ -15448,9 +15048,7 @@ std::string autocorr_tinysky::print(int full_subtables, int show_ids, int no_ref
std::ostringstream rv("");
rv.precision(14);
- if (show_ids) {
- rv << id;
- }
+ if (show_ids) rv << id;
rv << ',';
if (!no_refs) {
if (full_subtables) {
@@ -15499,9 +15097,7 @@ std::string autocorr_tinysky::print_xml(int full_subtables, int show_ids, int no
rv.precision(14);
rv << xml_indent() << '<' << tag << ">\n";
xml_indent(2);
- if (show_ids) {
- rv << xml_indent() << "<id>" << id << "</id>\n";
- }
+ if (show_ids) rv << xml_indent() << "<id>" << id << "</id>\n";
if (!no_refs) {
if (full_subtables) {
rv << result_id.print_xml(full_subtables,show_ids,no_refs,"result_id");
@@ -15538,7 +15134,7 @@ void autocorr_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> id;
}
@@ -15549,7 +15145,7 @@ void autocorr_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> peak_power;
}
@@ -15557,7 +15153,7 @@ void autocorr_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> mean_power;
}
@@ -15565,7 +15161,7 @@ void autocorr_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> time;
}
@@ -15573,7 +15169,7 @@ void autocorr_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> ra;
}
@@ -15581,7 +15177,7 @@ void autocorr_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> decl;
}
@@ -15589,7 +15185,7 @@ void autocorr_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> q_pix;
}
@@ -15597,7 +15193,7 @@ void autocorr_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> delay;
}
@@ -15605,7 +15201,7 @@ void autocorr_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> freq;
}
@@ -15613,7 +15209,7 @@ void autocorr_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> detection_freq;
}
@@ -15621,7 +15217,7 @@ void autocorr_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> barycentric_freq;
}
@@ -15629,7 +15225,7 @@ void autocorr_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> fft_len;
}
@@ -15637,7 +15233,7 @@ void autocorr_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> chirp_rate;
}
@@ -15645,7 +15241,7 @@ void autocorr_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> rfi_checked;
}
@@ -15653,7 +15249,7 @@ void autocorr_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> rfi_found;
}
@@ -15661,7 +15257,7 @@ void autocorr_tinysky::parse_xml(const std::string &s,const char *tag) {
pos=sub.find(">");
do {
pos++;
- } while (sub[pos]=='\n');
+ } while(sub[pos]=='\n');
std::istringstream in(sub.c_str()+pos);
in >> reserved;
}
diff --git a/db/schema_master.h b/db/schema_master.h
index 7dd70c5..f3e50b4 100644
--- a/db/schema_master.h
+++ b/db/schema_master.h
@@ -4,25 +4,22 @@
extern const char *db_name;
extern int db_is_open;
-#ifndef CLIENT
+#if !defined(CLIENT) && !defined(NEBULA)
inline int db_open() {
- if (!db_is_open) {
- db_is_open=sql_database(db_name);
- }
+ if (!db_is_open) db_is_open=sql_database(db_name);
return db_is_open;
}
inline int db_close() {
- if (db_is_open) {
- db_is_open=!sql_finish();
- }
+ if (db_is_open) db_is_open=!sql_finish();
return !db_is_open;
}
inline int db_change(const char *name) {
- if (strcmp(db_name, name) || !db_is_open) {
+ if(strcmp(db_name, name) || !db_is_open) {
db_close();
db_name=name;
db_open();
- } return(db_is_open);
+ }
+ return(db_is_open);
}
#else
inline int db_open() {
@@ -54,6 +51,9 @@ class coordinate_t : public db_type<coordinate_t> {
void parse(const SQL_ROW &s);
void parse(const std::string &s);
void parse_xml(const std::string &s,const char *tag="coordinate_t");
+#ifdef NEBULA
+ bool nebula_read(FILE *f);
+#endif
private:
};
@@ -75,6 +75,9 @@ class chirp_parameter_t : public db_type<chirp_parameter_t> {
void parse(const SQL_ROW &s);
void parse(const std::string &s);
void parse_xml(const std::string &s,const char *tag="chirp_parameter_t");
+#ifdef NEBULA
+ bool nebula_read(FILE *f);
+#endif
private:
};
@@ -98,6 +101,9 @@ class subband_description_t : public db_type<subband_description_t> {
void parse(const SQL_ROW &s);
void parse(const std::string &s);
void parse_xml(const std::string &s,const char *tag="subband_description_t");
+#ifdef NEBULA
+ bool nebula_read(FILE *f);
+#endif
private:
};
@@ -126,6 +132,9 @@ class data_description_t : public db_type<data_description_t> {
void parse(const SQL_ROW &s);
void parse(const std::string &s);
void parse_xml(const std::string &s,const char *tag="data_description_t");
+#ifdef NEBULA
+ bool nebula_read(FILE *f);
+#endif
private:
};
@@ -161,6 +170,9 @@ class receiver_config : public db_table<receiver_config> {
void parse(const SQL_ROW &s);
void parse(const std::string &s);
void parse_xml(const std::string &s,const char *tag="receiver_config");
+#ifdef NEBULA
+ bool nebula_read(FILE *f);
+#endif
private:
};
@@ -186,6 +198,9 @@ class recorder_config : public db_table<recorder_config> {
void parse(const SQL_ROW &s);
void parse(const std::string &s);
void parse_xml(const std::string &s,const char *tag="recorder_config");
+#ifdef NEBULA
+ bool nebula_read(FILE *f);
+#endif
private:
};
@@ -217,6 +232,9 @@ class splitter_config : public db_table<splitter_config> {
void parse(const SQL_ROW &s);
void parse(const std::string &s);
void parse_xml(const std::string &s,const char *tag="splitter_config");
+#ifdef NEBULA
+ bool nebula_read(FILE *f);
+#endif
private:
};
@@ -275,6 +293,9 @@ class analysis_config : public db_table<analysis_config> {
void parse(const SQL_ROW &s);
void parse(const std::string &s);
void parse_xml(const std::string &s,const char *tag="analysis_config");
+#ifdef NEBULA
+ bool nebula_read(FILE *f);
+#endif
private:
};
@@ -323,6 +344,9 @@ class science_config : public db_table<science_config> {
void parse(const SQL_ROW &s);
void parse(const std::string &s);
void parse_xml(const std::string &s,const char *tag="science_config");
+#ifdef NEBULA
+ bool nebula_read(FILE *f);
+#endif
private:
};
@@ -347,6 +371,9 @@ class candidate_t : public db_type<candidate_t> {
void parse(const SQL_ROW &s);
void parse(const std::string &s);
void parse_xml(const std::string &s,const char *tag="candidate_t");
+#ifdef NEBULA
+ bool nebula_read(FILE *f);
+#endif
private:
};
@@ -398,6 +425,9 @@ class meta_candidate : public db_table<meta_candidate> {
void parse(const SQL_ROW &s);
void parse(const std::string &s);
void parse_xml(const std::string &s,const char *tag="meta_candidate");
+#ifdef NEBULA
+ bool nebula_read(FILE *f);
+#endif
private:
};
@@ -442,6 +472,9 @@ class multiplet : public db_table<multiplet> {
void parse(const SQL_ROW &s);
void parse(const std::string &s);
void parse_xml(const std::string &s,const char *tag="multiplet");
+#ifdef NEBULA
+ bool nebula_read(FILE *f);
+#endif
private:
};
@@ -475,6 +508,9 @@ class star : public db_table<star> {
void parse(const SQL_ROW &s);
void parse(const std::string &s);
void parse_xml(const std::string &s,const char *tag="star");
+#ifdef NEBULA
+ bool nebula_read(FILE *f);
+#endif
private:
};
@@ -509,6 +545,9 @@ class candidate_count : public db_table<candidate_count> {
void parse(const SQL_ROW &s);
void parse(const std::string &s);
void parse_xml(const std::string &s,const char *tag="candidate_count");
+#ifdef NEBULA
+ bool nebula_read(FILE *f);
+#endif
private:
};
@@ -536,6 +575,9 @@ class tape : public db_table<tape> {
void parse(const SQL_ROW &s);
void parse(const std::string &s);
void parse_xml(const std::string &s,const char *tag="tape");
+#ifdef NEBULA
+ bool nebula_read(FILE *f);
+#endif
private:
};
@@ -561,6 +603,9 @@ class settings : public db_table<settings> {
void parse(const SQL_ROW &s);
void parse(const std::string &s);
void parse_xml(const std::string &s,const char *tag="settings");
+#ifdef NEBULA
+ bool nebula_read(FILE *f);
+#endif
private:
};
@@ -591,6 +636,9 @@ class workunit_grp : public db_table<workunit_grp> {
void parse(const SQL_ROW &s);
void parse(const std::string &s);
void parse_xml(const std::string &s,const char *tag="workunit_grp");
+#ifdef NEBULA
+ bool nebula_read(FILE *f);
+#endif
private:
};
@@ -615,6 +663,9 @@ class workunit_header : public db_table<workunit_header> {
void parse(const SQL_ROW &s);
void parse(const std::string &s);
void parse_xml(const std::string &s,const char *tag="workunit_header");
+#ifdef NEBULA
+ bool nebula_read(FILE *f);
+#endif
private:
};
@@ -645,6 +696,9 @@ class result : public db_table<result> {
void parse(const SQL_ROW &s);
void parse(const std::string &s);
void parse_xml(const std::string &s,const char *tag="result");
+#ifdef NEBULA
+ bool nebula_read(FILE *f);
+#endif
private:
};
@@ -681,6 +735,9 @@ class triplet : public db_table<triplet> {
void parse(const SQL_ROW &s);
void parse(const std::string &s);
void parse_xml(const std::string &s,const char *tag="triplet");
+#ifdef NEBULA
+ bool nebula_read(FILE *f);
+#endif
private:
};
@@ -717,6 +774,9 @@ class triplet_small : public db_table<triplet_small> {
void parse(const SQL_ROW &s);
void parse(const std::string &s);
void parse_xml(const std::string &s,const char *tag="triplet_small");
+#ifdef NEBULA
+ bool nebula_read(FILE *f);
+#endif
private:
};
@@ -758,6 +818,9 @@ class gaussian : public db_table<gaussian> {
void parse(const SQL_ROW &s);
void parse(const std::string &s);
void parse_xml(const std::string &s,const char *tag="gaussian");
+#ifdef NEBULA
+ bool nebula_read(FILE *f);
+#endif
private:
};
@@ -798,6 +861,9 @@ class gaussian_small : public db_table<gaussian_small> {
void parse(const SQL_ROW &s);
void parse(const std::string &s);
void parse_xml(const std::string &s,const char *tag="gaussian_small");
+#ifdef NEBULA
+ bool nebula_read(FILE *f);
+#endif
private:
};
@@ -839,6 +905,9 @@ class pulse : public db_table<pulse> {
void parse(const SQL_ROW &s);
void parse(const std::string &s);
void parse_xml(const std::string &s,const char *tag="pulse");
+#ifdef NEBULA
+ bool nebula_read(FILE *f);
+#endif
private:
};
@@ -878,6 +947,9 @@ class pulse_small : public db_table<pulse_small> {
void parse(const SQL_ROW &s);
void parse(const std::string &s);
void parse_xml(const std::string &s,const char *tag="pulse_small");
+#ifdef NEBULA
+ bool nebula_read(FILE *f);
+#endif
private:
};
@@ -904,6 +976,9 @@ class sah_pointing : public db_table<sah_pointing> {
void parse(const SQL_ROW &s);
void parse(const std::string &s);
void parse_xml(const std::string &s,const char *tag="sah_pointing");
+#ifdef NEBULA
+ bool nebula_read(FILE *f);
+#endif
private:
};
@@ -936,6 +1011,9 @@ class sky_map : public db_table<sky_map> {
void parse(const SQL_ROW &s);
void parse(const std::string &s);
void parse_xml(const std::string &s,const char *tag="sky_map");
+#ifdef NEBULA
+ bool nebula_read(FILE *f);
+#endif
private:
};
@@ -957,6 +1035,9 @@ class hotpix : public db_table<hotpix> {
void parse(const SQL_ROW &s);
void parse(const std::string &s);
void parse_xml(const std::string &s,const char *tag="hotpix");
+#ifdef NEBULA
+ bool nebula_read(FILE *f);
+#endif
private:
};
@@ -992,6 +1073,9 @@ class spike : public db_table<spike> {
void parse(const SQL_ROW &s);
void parse(const std::string &s);
void parse_xml(const std::string &s,const char *tag="spike");
+#ifdef NEBULA
+ bool nebula_read(FILE *f);
+#endif
private:
};
@@ -1027,6 +1111,9 @@ class spike_small : public db_table<spike_small> {
void parse(const SQL_ROW &s);
void parse(const std::string &s);
void parse_xml(const std::string &s,const char *tag="spike_small");
+#ifdef NEBULA
+ bool nebula_read(FILE *f);
+#endif
private:
};
@@ -1063,6 +1150,9 @@ class autocorr : public db_table<autocorr> {
void parse(const SQL_ROW &s);
void parse(const std::string &s);
void parse_xml(const std::string &s,const char *tag="autocorr");
+#ifdef NEBULA
+ bool nebula_read(FILE *f);
+#endif
private:
};
@@ -1099,6 +1189,9 @@ class autocorr_small : public db_table<autocorr_small> {
void parse(const SQL_ROW &s);
void parse(const std::string &s);
void parse_xml(const std::string &s,const char *tag="autocorr_small");
+#ifdef NEBULA
+ bool nebula_read(FILE *f);
+#endif
private:
};
@@ -1128,6 +1221,9 @@ class classic_versions : public db_table<classic_versions> {
void parse(const SQL_ROW &s);
void parse(const std::string &s);
void parse_xml(const std::string &s,const char *tag="classic_versions");
+#ifdef NEBULA
+ bool nebula_read(FILE *f);
+#endif
private:
};
@@ -1151,6 +1247,9 @@ class classic_active_versions : public db_table<classic_active_versions> {
void parse(const SQL_ROW &s);
void parse(const std::string &s);
void parse_xml(const std::string &s,const char *tag="classic_active_versions");
+#ifdef NEBULA
+ bool nebula_read(FILE *f);
+#endif
private:
};
@@ -1172,6 +1271,9 @@ class classic_active_versionids : public db_table<classic_active_versionids> {
void parse(const SQL_ROW &s);
void parse(const std::string &s);
void parse_xml(const std::string &s,const char *tag="classic_active_versionids");
+#ifdef NEBULA
+ bool nebula_read(FILE *f);
+#endif
private:
};
@@ -1217,6 +1319,9 @@ class rfi_zone : public db_table<rfi_zone> {
void parse(const SQL_ROW &s);
void parse(const std::string &s);
void parse_xml(const std::string &s,const char *tag="rfi_zone");
+#ifdef NEBULA
+ bool nebula_read(FILE *f);
+#endif
private:
};
@@ -1239,6 +1344,9 @@ class bad_data : public db_table<bad_data> {
void parse(const SQL_ROW &s);
void parse(const std::string &s);
void parse_xml(const std::string &s,const char *tag="bad_data");
+#ifdef NEBULA
+ bool nebula_read(FILE *f);
+#endif
private:
};
@@ -1274,6 +1382,9 @@ class spike_tinysky : public db_table<spike_tinysky> {
void parse(const SQL_ROW &s);
void parse(const std::string &s);
void parse_xml(const std::string &s,const char *tag="spike_tinysky");
+#ifdef NEBULA
+ bool nebula_read(FILE *f);
+#endif
private:
};
@@ -1315,6 +1426,9 @@ class gaussian_tinysky : public db_table<gaussian_tinysky> {
void parse(const SQL_ROW &s);
void parse(const std::string &s);
void parse_xml(const std::string &s,const char *tag="gaussian_tinysky");
+#ifdef NEBULA
+ bool nebula_read(FILE *f);
+#endif
private:
};
@@ -1356,6 +1470,9 @@ class pulse_tinysky : public db_table<pulse_tinysky> {
void parse(const SQL_ROW &s);
void parse(const std::string &s);
void parse_xml(const std::string &s,const char *tag="pulse_tinysky");
+#ifdef NEBULA
+ bool nebula_read(FILE *f);
+#endif
private:
};
@@ -1392,6 +1509,9 @@ class triplet_tinysky : public db_table<triplet_tinysky> {
void parse(const SQL_ROW &s);
void parse(const std::string &s);
void parse_xml(const std::string &s,const char *tag="triplet_tinysky");
+#ifdef NEBULA
+ bool nebula_read(FILE *f);
+#endif
private:
};
@@ -1428,6 +1548,9 @@ class autocorr_tinysky : public db_table<autocorr_tinysky> {
void parse(const SQL_ROW &s);
void parse(const std::string &s);
void parse_xml(const std::string &s,const char *tag="autocorr_tinysky");
+#ifdef NEBULA
+ bool nebula_read(FILE *f);
+#endif
private:
};
diff --git a/db/schema_to_class.awk b/db/schema_to_class.awk
index a806330..04b2d87 100644
--- a/db/schema_to_class.awk
+++ b/db/schema_to_class.awk
@@ -109,7 +109,7 @@ BEGIN {
print "const char *db_name=\""db_name"\";" >sourcefile
print "extern int db_is_open;\n" >headerfile
print "int db_is_open;\n" >sourcefile
- print "#ifndef CLIENT" >headerfile
+ print "#if !defined(CLIENT) && !defined(NEBULA)" >headerfile
print "inline int db_open() { \n\t if (!db_is_open) db_is_open=sql_database(db_name);\n\t return db_is_open; }" >headerfile
print "inline int db_close() { \n\t if (db_is_open) db_is_open=!sql_finish();\n\t return !db_is_open; }" >headerfile
print "inline int db_change(const char *name) { \n\t if(strcmp(db_name, name) || !db_is_open) { \n\t\t db_close();\n\t\t db_name=name;\n\t\t db_open(); } return(db_is_open); }" >headerfile
@@ -349,6 +349,7 @@ BEGIN {
print "\tvoid parse(const SQL_ROW &s);" >headerfile
print "\tvoid parse(const std::string &s);" >headerfile
print "\tvoid parse_xml(const std::string &s,const char *tag=\""table"\");" >headerfile
+ print "#ifdef NEBULA\n\tbool nebula_read(FILE *f);\n#endif" >headerfile
print " private:\n};\n\n" >headerfile
if (is_typedef) {
print "template <> const char * const db_type<"table">::type_name=\""table"\";" >sourcefile
diff --git a/db/sqlrow.cpp b/db/sqlrow.cpp
index 68364c2..d6ba198 100644
--- a/db/sqlrow.cpp
+++ b/db/sqlrow.cpp
@@ -293,14 +293,31 @@ SQL_ROW::SQL_ROW(const std::string *s,size_t nfields) : track_mem<SQL_ROW>("SQL_
}
}
-/*
+SQL_ROW::SQL_ROW(const std::vector<std::string> &t) : track_mem<SQL_ROW>("SQL_ROW") {
+ std::string s("");
+ size_t i,tot_size=0;
+ for (i=0;i<t.size();i++) {
+ tot_size+=t[i].size();
+ }
+ tot_size+=i;
+ s.reserve(tot_size);
+ i=0;
+ for (i=0;i<t.size();i++) {
+ s.append(t[i]);
+ }
+ pval=parse_row(s);
+#ifdef DEBUG_ALLOCATIONS
+ fprintf(stderr,"std::string allocated at 0x%p\n",pval[i]);
+ fflush(stderr);
+#endif
+}
+
SQL_ROW::SQL_ROW(const char **arr, int nfields) : pval() {
for (int i=0;i<nfields;i++) {
std::string *p=new std::string(arr[i]);
pval.push_back(p);
}
}
-*/
SQL_ROW::SQL_ROW(const SQL_ROW &s,size_t start_col,ssize_t end_col) : track_mem<SQL_ROW>("SQL_ROW") {
ssize_t i;
diff --git a/db/sqlrow.h b/db/sqlrow.h
index c0b97e7..5b96f1e 100644
--- a/db/sqlrow.h
+++ b/db/sqlrow.h
@@ -36,7 +36,8 @@ extern const std::string empty_string;
class SQL_ROW : track_mem<SQL_ROW> {
public:
explicit SQL_ROW(const std::string *s=NULL,size_t i=0);
- // explicit SQL_ROW(const char **arr, int nfields);
+ explicit SQL_ROW(const std::vector<std::string> &s);
+ explicit SQL_ROW(const char **arr, int nfields);
SQL_ROW(const SQL_ROW &r, size_t start_col=0, ssize_t end_col=-1);
~SQL_ROW();
SQL_ROW &operator=(const SQL_ROW &r);
diff --git a/m4/sah_check_cfitsio.m4 b/m4/sah_check_cfitsio.m4
new file mode 100644
index 0000000..c2468b6
--- /dev/null
+++ b/m4/sah_check_cfitsio.m4
@@ -0,0 +1,52 @@
+# SETI_BOINC is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2, or (at your option) any later
+# version.
+
+AC_PREREQ([2.54])
+
+AC_DEFUN([SAH_CHECK_CFITSIO],[
+ AC_ARG_VAR([CFITSIO],[CFITSIO directory])
+ if test -z "$HEAD"
+ then
+ AC_PATH_PROG(HEAD,head)
+ fi
+ if test -z "$FIND"
+ then
+ AC_PATH_PROG(FIND,find)
+ fi
+ thisdir=`pwd`
+ AC_MSG_CHECKING([for CFITSIO])
+ cfitsio_search_path=[`echo $CFITSIO cfitsio* ../cfitsio* ../lib/cfitsio* $HOME/lib/cfitsio* /usr/local/cfitsio* /usr/local`]
+ for cfitsio_dir in $cfitsio_search_path
+ do
+ if test -d $cfitsio_dir
+ then
+ if test -f $cfitsio_dir/libcfitsio.a
+ then
+ cd $cfitsio_dir
+ CFITSIO=`pwd`
+ cd $thisdir
+ break
+ else
+ if $FIND $cfitsio_dir -name "lib/libcfitsio.a" 2>/dev/null >/dev/null
+ then
+ CFITSIO=`$FIND $cfitsio_dir -name "lib/libcfitsio.a" -print | $HEAD -1 | sed 's/\/lib\/libcfitsio.a//'`
+ cd $CFITSIO
+ CFITSIO=`pwd`
+ cd $thisdir
+ break
+ fi
+ fi
+ fi
+ done
+ if test -n "$CFITSIO"
+ then
+ AC_MSG_RESULT($CFITSIO)
+ else
+ AC_MSG_RESULT(not found)
+ no_cfitsio=yes
+ fi
+])
+
+
diff --git a/m4/sah_check_seti_gbt.m4 b/m4/sah_check_seti_gbt.m4
new file mode 100644
index 0000000..a293ef6
--- /dev/null
+++ b/m4/sah_check_seti_gbt.m4
@@ -0,0 +1,50 @@
+# SETI_BOINC is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2, or (at your option) any later
+# version.
+
+AC_PREREQ([2.54])
+
+AC_DEFUN([SAH_CHECK_SETI_GBT],[
+ AC_ARG_VAR([SETI_GBT],[SETI_GBT directory])
+ if test -z "$HEAD"
+ then
+ AC_PATH_PROG(HEAD,head)
+ fi
+ if test -z "$FIND"
+ then
+ AC_PATH_PROG(FIND,find)
+ fi
+ thisdir=`pwd`
+ AC_MSG_CHECKING([for SETI_GBT])
+ seti_gbt_search_path=[`echo $SETI_GBT seti_gbt* ../seti_gbt* ../lib/seti_gbt* $HOME/lib/seti_gbt* /usr/local/seti_gbt* /usr/local`]
+ for seti_gbt_dir in $seti_gbt_search_path
+ do
+ if test -d $seti_gbt_dir/lib
+ then
+ if test -f $seti_gbt_dir/lib/libsetigbt.so
+ then
+ cd $seti_gbt_dir
+ SETI_GBT=`pwd`
+ cd $thisdir
+ break
+ else
+ if $FIND $seti_gbt_dir -name "lib/libsetigbt.so" 2>/dev/null >/dev/null
+ then
+ SETI_GBT=`$FIND $seti_gbt_dir -name "lib/libsetigbt.so" -print | $HEAD -1 | sed 's/\/lib\/libsetigbt.so//'`
+ cd $SETI_GBT
+ SETI_GBT=`pwd`
+ cd $thisdir
+ break
+ fi
+ fi
+ fi
+ done
+ if test -n "$SETI_GBT"
+ then
+ AC_MSG_RESULT($SETI_GBT)
+ else
+ AC_MSG_RESULT(not found)
+ no_seti_gbt=yes
+ fi
+])
diff --git a/splitter_pfb/angdist.cpp b/splitter_pfb/angdist.cpp
deleted file mode 100644
index a4d9cf2..0000000
--- a/splitter_pfb/angdist.cpp
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * angdist.c
- *
- * Computes angular distance between two lat/lon points
- *
- * $Id: angdist.cpp,v 1.3.4.1 2006/12/14 22:24:37 korpela Exp $
- *
- */
-
-#include "sah_config.h"
-#include <cstdio>
-#include <cstdlib>
-#include <math.h>
-#include "seti_header.h"
-
-#define DTOR (M_PI/180)
-
-double angdist(double r1, double d1, double r2, double d2) {
- double alpha,dist,d;
-
- r1*=DTOR;
- r2*=DTOR;
- d1*=DTOR;
- d2*=DTOR;
- alpha=r1-r2;
- dist=sin(d2)*sin(d1)+cos(d1)*cos(d2)*cos(alpha);
- if ((dist*dist)<1) {
- d=sqrt(1.0-dist*dist);
- } else {
- dist=1.0;
- d=0.0;
- }
- dist=atan2(d,dist);
- dist=dist/DTOR;
- return (dist);
-}
-
-double angdist(const SCOPE_STRING &a, const SCOPE_STRING &b) {
- return angdist(a.ra*15,a.dec,b.ra*15,b.dec);
-}
-
-/*
- * $Log: angdist.cpp,v $
- * Revision 1.3.4.1 2006/12/14 22:24:37 korpela
- * *** empty log message ***
- *
- * Revision 1.3 2003/09/11 18:53:37 korpela
- * *** empty log message ***
- *
- * Revision 1.2 2003/08/05 17:23:39 korpela
- * More work on database stuff.
- * Further tweaks.
- *
- * Revision 1.1 2003/07/29 20:35:31 korpela
- *
- * renames .C files to .cpp
- *
- * Revision 1.2 2003/06/03 01:01:15 korpela
- *
- * First working splitter under CVS.
- *
- * Revision 1.1 2003/06/03 00:16:08 korpela
- *
- * Initial splitter under CVS control.
- *
- * Revision 3.0 2001/08/01 19:04:57 korpela
- * Check this in before Paul screws it up.
- *
- * Revision 2.1 1998/11/02 16:41:21 korpela
- * Minor Change.
- *
- * Revision 2.0 1998/10/30 22:00:04 korpela
- * Conversion to C++ and merger with client source tree.
- *
- * Revision 1.1 1998/10/27 00:47:33 korpela
- * Initial revision
- *
- *
- */
diff --git a/splitter_pfb/angdist.h b/splitter_pfb/angdist.h
deleted file mode 100644
index c3fc069..0000000
--- a/splitter_pfb/angdist.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * angdist.h
- *
- * Computes angular distance between two lat/lon points
- *
- * $Id: angdist.h,v 1.1 2003/06/03 00:16:09 korpela Exp $
- *
- */
-
-double angdist(double r1, double d1, double r2, double d2) ;
-double angdist(const SCOPE_STRING &a,const SCOPE_STRING &b);
-
-/*
- * $Log: angdist.h,v $
- * Revision 1.1 2003/06/03 00:16:09 korpela
- *
- * Initial splitter under CVS control.
- *
- * Revision 3.0 2001/08/01 19:04:57 korpela
- * Check this in before Paul screws it up.
- *
- * Revision 2.1 1998/11/02 16:41:21 korpela
- * Minor Change.
- *
- * Revision 2.0 1998/10/30 22:00:04 korpela
- * Conversion to C++ and merger with client source tree.
- *
- * Revision 1.1 1998/10/27 01:03:21 korpela
- * Initial revision
- *
- *
- */
-
diff --git a/splitter_pfb/coordcvt.cpp b/splitter_pfb/coordcvt.cpp
deleted file mode 100644
index 959f231..0000000
--- a/splitter_pfb/coordcvt.cpp
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- * coordcvt.c
- *
- * Celestial coordinate conversion routines.
- *
- * $Id: coordcvt.cpp,v 1.2.4.1 2006/12/14 22:24:37 korpela Exp $
- *
- */
-
-#include "sah_config.h"
-#include <stdlib.h>
-#include <unistd.h>
-#include <math.h>
-
-#include "sqlrow.h"
-#include "sqlblob.h"
-#include "sqlapi.h"
-#include "db_table.h"
-#include "schema_master.h"
-
-#include <seti_tel.h>
-#include <seti_cfg.h>
-#include <seti_coord.h>
-
-#include "splitparms.h"
-#include "splittypes.h"
-#include "coordcvt.h"
-
-extern int gregorian;
-
-namespace SPLITTER {
-
-double jd_to_lmst(double jd, double longitude) {
-/*
- * converts from julian date/time to local mean siderial time
- *
- */
-
- double tu; /* time, in centuries from Jan 0, 2000 */
- double tusqr;
- double tucb;
- double g; /* derrived from tu, used to calculate gmst */
- double gmst; /* Greenwich Mean Sidereal Time */
- double lmst; /* Local Mean Sidereal Time */
- double jd0=floor(jd+0.5)-0.5; /* jd at noon GMT */
- double ddtime=fmod((jd-jd0)*24,24); /* GMT hours */
-
- tu = (jd0 - 2451545.0)/36525;
- tusqr = tu * tu;
- tucb = tusqr * tu;
-
-/* computation of the gmst at ddtime UT */
-
- g = 24110.54841 + 8640184.812866 * tu + 0.093104 * tusqr - 6.62E-6 * tucb;
-
- for (gmst = g; gmst < 0; gmst += 86400) ;
-
- gmst /= 3600; /* GMST at 0h UT */
- gmst += (1.0027379093 * ddtime); /* GMST at utime UT */
-
- gmst=fmod(gmst,24);
-
-/* computation of lmst given gmst and longitude */
-
- lmst = gmst + ((longitude/360) * 24);
-
- if (lmst < 0)
- lmst += 24;
- lmst = fmod(lmst,24);
- return(lmst);
-}
-
-
-void horz_to_equatorial(double alt, double azimuth, double lsthour,
- double lat, double *ra, double *dec) {
- double dec_rad, hour_ang_rad, zenith_ang=90.0-alt;
- double temp;
-
- zenith_ang*=(M_PI/180.0);
- azimuth*=(M_PI/180.0);
-
- dec_rad = asin ((cos(zenith_ang) * sin(lat*M_PI/180)) +
- (sin(zenith_ang) * cos(lat*M_PI/180) * cos(azimuth)));
-
- *dec = dec_rad * 180.0/M_PI; /* radians to decimal degrees */
-
- temp = (cos(zenith_ang) - sin(lat*M_PI/180) * sin(dec_rad)) /
- (cos(lat*M_PI/180) * cos(dec_rad));
- if (temp > 1)
- temp = 1;
- else if (temp < -1)
- temp = -1;
- hour_ang_rad = acos (temp);
-
- if (sin(azimuth) > 0.0) /* insure correct quadrant */
- hour_ang_rad = (2 * M_PI) - hour_ang_rad;
-
-
- /* to get ra, we convert hour angle to decimal degrees, */
- /* convert degrees to decimal hours, and subtract the */
- /* result from local sidereal decimal hours. */
- *ra = lsthour - ((hour_ang_rad * 180.0/M_PI) / 15.0);
-
- // Take care of wrap situations in RA
- if (*ra < 0.0)
- *ra += 24.0;
- *ra=fmod(*ra,24);
-}
-#define D2R 0.017453292
-
-void AltAzCorrection(double *alt, double *az) {
- double zen=90-*alt;
- co_ZenAzCorrection((telescope_id)(gregorian?AOGREG_1420:AO_1420),&zen,az);
- *alt=90-zen;
-}
-
-}
-
-void telstr_coord_convert(SCOPE_STRING *telstr, double lat, double lon) {
-
- double lmst=SPLITTER::jd_to_lmst(telstr->st.jd,lon);
-
- SPLITTER::AltAzCorrection(&(telstr->alt),&(telstr->az));
- SPLITTER::horz_to_equatorial(telstr->alt, telstr->az, lmst, lat, &(telstr->ra),
- &(telstr->dec));
-}
-
-/*
- * $Log: coordcvt.cpp,v $
- * Revision 1.2.4.1 2006/12/14 22:24:37 korpela
- * *** empty log message ***
- *
- * Revision 1.2 2003/09/11 18:53:37 korpela
- * *** empty log message ***
- *
- * Revision 1.1 2003/07/29 20:35:33 korpela
- *
- * renames .C files to .cpp
- *
- * Revision 1.3 2003/06/05 19:01:45 korpela
- *
- * Fixed coordiate bug that allowed RA>24 hours.
- *
- * Revision 1.2 2003/06/05 15:52:46 korpela
- *
- * Fixed coordinate bug that was using the wrong zenith angle from the telescope
- * strings when handling units from the gregorian.
- *
- * Revision 1.1 2003/06/03 00:16:09 korpela
- *
- * Initial splitter under CVS control.
- *
- * Revision 3.1 2003/05/20 16:01:54 eheien
- * *** empty log message ***
- *
- * Revision 3.0 2001/08/01 19:04:57 korpela
- * Check this in before Paul screws it up.
- *
- * Revision 2.3 1999/03/05 01:47:18 korpela
- * New zenith angle correction.
- *
- * Revision 2.2 1999/02/22 22:21:09 korpela
- * Fixed half-day error.
- *
- * Revision 2.1 1998/11/02 16:41:21 korpela
- * Minor Change.
- *
- * Revision 2.0 1998/10/30 22:00:04 korpela
- * Conversion to C++ and merger with client source tree.
- *
- * Revision 1.2 1998/10/27 00:48:48 korpela
- * Bug fixes.
- *
- * Revision 1.1 1998/10/19 23:02:43 korpela
- * Initial revision
- *
- *
- */
-
diff --git a/splitter_pfb/coordcvt.h b/splitter_pfb/coordcvt.h
deleted file mode 100644
index 5595f06..0000000
--- a/splitter_pfb/coordcvt.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * coordcvt.h
- *
- * Celestial coordinate conversion routines.
- *
- * $Id: coordcvt.h,v 1.1 2003/06/03 00:16:09 korpela Exp $
- *
- */
-
-#ifndef COORDCVT_H
-#define COORDCVT_H
-
-double jd_to_lmst(double jd, double longitude);
-
-void horz_to_equatorial(double alt, double azimuth, double lsthour,
- double lat, double *ra, double *dec);
-
-void telstr_coord_convert(SCOPE_STRING *telstr, double lat, double lon);
-
-#endif
-
-/*
- * $Log: coordcvt.h,v $
- * Revision 1.1 2003/06/03 00:16:09 korpela
- *
- * Initial splitter under CVS control.
- *
- * Revision 3.0 2001/08/01 19:04:57 korpela
- * Check this in before Paul screws it up.
- *
- * Revision 2.1 1998/11/02 16:41:21 korpela
- * Minor Change.
- *
- * Revision 2.0 1998/10/30 22:00:04 korpela
- * Conversion to C++ and merger with client source tree.
- *
- * Revision 1.1 1998/10/19 23:03:18 korpela
- * Initial revision
- *
- */
diff --git a/splitter_pfb/db_fns.cpp b/splitter_pfb/db_fns.cpp
deleted file mode 100644
index 9234ed3..0000000
--- a/splitter_pfb/db_fns.cpp
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
- * $Id: db_fns.cpp,v 1.3.4.2 2006/12/14 22:24:37 korpela Exp $
- *
- */
-
-
-#include "sah_config.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-
-#include "splitparms.h"
-#include "splittypes.h"
-#include "splitter.h"
-#include "message.h"
-#include "readtape.h"
-#include "sqlrow.h"
-#include "sqlblob.h"
-#include "db_table.h"
-#include "schema_master.h"
-
-
-static tape tape_struct;
-
-int update_tape_entry( tapeheader_t *tapeheader) ;
-
-int get_last_block(tapeheader_t *tapeheader) {
- int err;
- strncat(tape_struct.tapename,tapeheader->name,20);
- if (!db_tape_lookup_name(&tape_struct)) {
- return(tape_struct.last_block_done/TAPE_FRAMES_PER_RECORD);
- } else {
- if ((err=db_tape_new(&tape_struct))) {
- log_messages.printf( SCHED_MSG_LOG::MSG_CRITICAL,"Unable to create db entry for tape %s error %d.\n",tapeheader->name,err);
- exit(1);
- }
- return 0;
- }
-}
-
-
-/* returns id number of tape db entry or zero if failure */
-/*int update_tape_entry( tapeheader_t *tapeheader) {
- if (strncmp(tapeheader->name,tape_struct.tapename,20)) {
- strncat(tape_struct.tapename,tapeheader->name,20);
- if (db_tape_lookup_name(&tape_struct)) {
- tape_struct.id=0;
- strncpy(tape_struct.tapename,tapeheader->name,20);
- tape_struct.start_time=tapeheader->st.jd;
- tape_struct.last_block_time=tapeheader->st.jd;
- tape_struct.last_block_done=tapeheader->frameseq;
- if (db_tape_new(&tape_struct)) {
- char tmpstr[256];
- fprintf( stderr, "Point 2\n" );
- sprintf(tmpstr,"Unable to create db entry for tape %s.",tapeheader->name);
- message(tmpstr);
- return(0);
- }
- }
- }
- tape_struct.last_block_time=tapeheader->st.jd;
- tape_struct.last_block_done=tapeheader->frameseq;
- if (db_tape_update(&tape_struct)) {
- char tmpstr[256];
- sprintf(tmpstr,"Unable to update db entry for tape %s.",tapeheader->name);
- message(tmpstr);
- return(0);
- }
- return(tape_struct.id);
-}
-*/
-
-/* returns workunit group id number on success, 0 on failure */
-/*
-int create_wugrp_entry(workunit_grp &wugrp, int tapenum, tapeheader_t *tapeheader) {
- int i,n;
-
- wugrp.tapenum=tapenum;
- strncpy(wugrp.wugrpname,wugrpname,64);
- wugrp.splitter_version=wuheader->wuinfo.splitter_version;
- wugrp.start_ra=wuheader->wuinfo.start_ra;
- wugrp.start_dec=wuheader->wuinfo.start_dec;
- wugrp.end_ra=wuheader->wuinfo.end_ra;
- wugrp.end_dec=wuheader->wuinfo.end_dec;
- wugrp.angle_range=wuheader->wuinfo.angle_range;
- wugrp.true_angle_range=wuheader->wuinfo.true_angle_range;
- wugrp.beam_width=wuheader->wuinfo.beam_width;
- wugrp.time_recorded=wuheader->wuinfo.time_recorded;
- wugrp.fft_len=wuheader->wuinfo.fft_len;
- wugrp.ifft_len=wuheader->wuinfo.ifft_len;
- wugrp.receiver=wuheader->wuinfo.source;
- wugrp.nsamples=wuheader->wuinfo.nsamples;
- wugrp.sample_rate=tapeheader->samplerate;
- wugrp.data_class=wuheader->wuinfo.data_class;
- strncpy(wugrp.tape_version,wuheader->wuinfo.tape_version,13);
- wugrp.num_positions=wuheader->wuinfo.num_positions;
- if (db_workunit_grp_new(&wugrp)) {
- char tmpstr[256];
- sprintf(tmpstr,"Unable to create db entry for workunit_grp %s\n",wugrpname);
- message(tmpstr);
- return(0);
- }
- for (i=0;i<wugrp.num_positions;i++) {
- char tmpstr[34];
- sprintf(tmpstr,"%14.5f %6.3f %6.2f",
- wuheader->wuinfo.position_history[i].st.jd,
- wuheader->wuinfo.position_history[i].ra,
- wuheader->wuinfo.position_history[i].dec
- );
- if (n=db_workunit_grp_update_position(wugrp.id,i,tmpstr)) {
- fprintf( stderr, "%d\n", n );
- sprintf(tmpstr,"Unable to add position %d to workunit_grp %s\n",i,wugrpname);
- message(tmpstr);
- }
- }
- return (wugrp.id);
-}
-
-int create_workunit_entry(wuheader_t *wuheader, int wugrpid, int subband_number) {
- WORKUNIT wu;
-
- memset(&wu,0,sizeof(wu));
- strncpy(wu.name,wuheader->wuhead.name,63);
- wu.grpnum=wugrpid;
- wu.subb_center=wuheader->wuinfo.subband_center;
- wu.subb_base=wuheader->wuinfo.subband_base;
- wu.subb_sample_rate=wuheader->wuinfo.subband_sample_rate;
- wu.subband_number=subband_number;
- wu.data_class=wuheader->wuinfo.data_class;
- if (db_workunit_new(&wu)) {
- char tmpstr[256];
- sprintf(tmpstr,"Unable to create workunit entry %s\n",wu.name);
- message(tmpstr);
- return(0);
- }
- return(wu.id);
-}
-*/
-
-/*
- * $Log: db_fns.cpp,v $
- * Revision 1.3.4.2 2006/12/14 22:24:37 korpela
- * *** empty log message ***
- *
- * Revision 1.3.4.1 2006/01/13 00:37:56 korpela
- * Moved splitter to using standard BOINC logging mechanisms. All stderr now
- * goes to "error.log"
- *
- * Added command line parameters "-iterations=" (number of workunit groups to
- * create before exiting), "-trigger_file_path=" (path to the splitter_stop trigger
- * file. Default is /disks/setifiler1/wutape/tapedir/splitter_stop).
- *
- * Reduced deadlines by a factor of three. We now need a 30 MFLOP machine to meet
- * the deadline.
- *
- * Revision 1.3 2003/09/11 18:53:37 korpela
- * *** empty log message ***
- *
- * Revision 1.2 2003/08/05 17:23:40 korpela
- * More work on database stuff.
- * Further tweaks.
- *
- * Revision 1.1 2003/07/29 20:35:35 korpela
- *
- * renames .C files to .cpp
- *
- * Revision 1.2 2003/06/03 01:01:16 korpela
- *
- * First working splitter under CVS.
- *
- * Revision 1.1 2003/06/03 00:16:10 korpela
- *
- * Initial splitter under CVS control.
- *
- * Revision 3.2 2003/05/19 17:40:59 eheien
- * *** empty log message ***
- *
- * Revision 3.1 2001/11/07 00:51:47 korpela
- * Added splitter version to database.
- * Added max_wus_ondisk option.
- *
- * Revision 3.0 2001/08/01 19:04:57 korpela
- * Check this in before Paul screws it up.
- *
- * Revision 1.4 2000/12/01 01:13:29 korpela
- * *** empty log message ***
- *
-// Revision 1.3 1999/03/05 01:47:18 korpela
-// Added data_class field.
-//
-// Revision 1.2 1999/02/22 22:21:09 korpela
-// Fixed half-day error.
-//
-// Revision 1.1 1999/02/11 16:46:28 korpela
-// Initial revision
-//
- *
- */
diff --git a/splitter_pfb/db_fns.h b/splitter_pfb/db_fns.h
deleted file mode 100644
index 3ccf871..0000000
--- a/splitter_pfb/db_fns.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * $Id: db_fns.h,v 1.3 2003/08/05 17:23:40 korpela Exp $
- *
- */
-
-
-#ifndef DB_FNS_H
-#define DB_FNS_H
-
-#include "schema_master.h"
-
-int get_last_block(tapeheader_t *tapeheader) ;
-
-//int update_tape_entry( tapeheader_t *tapeheader) ;
-
-/* returns workunit group id number on success, 0 on failure */
-//int create_wugrp_entry(char *wugrpname,wuheader_t *wuheader, int tapenum, tapeheader_t *tapeheader) ;
-
-//int create_workunit_entry(wuheader_t *wuheader, int wugrpid, int subband_number) ;
-
-#endif
-
-/*
- *
- * $Log: db_fns.h,v $
- * Revision 1.3 2003/08/05 17:23:40 korpela
- * More work on database stuff.
- * Further tweaks.
- *
- * Revision 1.2 2003/06/03 01:01:16 korpela
- *
- * First working splitter under CVS.
- *
- * Revision 1.1 2003/06/03 00:16:10 korpela
- *
- * Initial splitter under CVS control.
- *
- * Revision 3.0 2001/08/01 19:04:57 korpela
- * Check this in before Paul screws it up.
- *
- * Revision 1.2 1999/02/22 22:21:09 korpela
- * added -nodb option
- *
- * Revision 1.1 1999/02/11 16:46:28 korpela
- * Initial revision
- *
- *
- */
diff --git a/splitter_pfb/dotransform.cpp b/splitter_pfb/dotransform.cpp
deleted file mode 100644
index 1663a50..0000000
--- a/splitter_pfb/dotransform.cpp
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
- *
- * dotransform.c
- *
- * Functions for division by frequency into work units.
- *
- * $Id: dotransform.cpp,v 1.2.4.1 2006/12/14 22:24:38 korpela Exp $
- *
- */
-
-#include "sah_config.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <strings.h>
-#include <unistd.h>
-#include <limits.h>
-#include <assert.h>
-#include <math.h>
-
-#include "splitparms.h"
-#include "splittypes.h"
-#include "splitter.h"
-#include "fftw.h"
-#include "wufiles.h"
-
-/* buffer for fft input/output */
-float databuf[FFT_LEN*2];
-
-/* buffer for ftt output before data writes, needs to be multiple
- * of three bytes long for encode to work.
- */
-#define SAMPLES_PER_OBUF (FFT_LEN*2*3/CHAR_BIT)
-unsigned char output_buf[NSTRIPS][SAMPLES_PER_OBUF];
-
-
-int obuf_pos; /* Tracks current postition in the output buffers */
-
-
-void output_samples(float *data, int i, int buf_pos) {
- int j,k;
- unsigned short s;
- float *p=data;
-
- for (j=0;j<2;j++) {
- s=0;
- for (k=0; k<8; k++) {
- s >>= 2;
- if (*p>0) s |= 0x8000;
- if (*(p+1)>0) s |= 0x4000;
- p+=2;
- }
- output_buf[i][buf_pos++]=*(char *)(&s);
- output_buf[i][buf_pos++]=*(((char *)(&s))+1);
- }
-}
-
-void splitter_bits_to_float(unsigned short *raw, float *data, int nsamples) {
- unsigned int i, j;
- unsigned short s;
- static int first_time=1;
- static float lut[65536][16];
-
- assert(!(nsamples % 8));
-
- if (first_time) {
- for (i=0;i<65536;i++) {
- s=(unsigned short)i;
- for (j=0;j<8;j++) {
- lut[i][j*2]=(float)2*(s & 1)-1;
- s >>= 1;
- lut[i][j*2+1]=(float)2*(s & 1)-1;
- s >>= 1;
- }
- }
- first_time--;
- }
-
- for (i=0;i<(nsamples/8);i++) {
- memcpy(data+16*i,lut[raw[i]],16*sizeof(float));
- }
-}
-
-void process_seg(float* data) {
- int i;
- float* p = data;
- static float dbuff[FFT_LEN*2];
- static fftw_plan planfwd,planinverse;
-
- if (!planfwd) {
- planfwd=fftw_create_plan(FFT_LEN, FFTW_BACKWARD,
- FFTW_MEASURE | FFTW_IN_PLACE | FFTW_USE_WISDOM );
- planinverse=fftw_create_plan(IFFT_LEN, FFTW_FORWARD,
- FFTW_MEASURE | FFTW_IN_PLACE | FFTW_USE_WISDOM );
- }
-
- fftw_one(planfwd, (fftw_complex *)data, (fftw_complex *)NULL);
- data[0]=0;
- data[1]=0;
- fftw(planinverse, NSTRIPS, (fftw_complex *)data, 1, IFFT_LEN,
- (fftw_complex *)NULL, 1, IFFT_LEN);
- for (i=0; i<NSTRIPS; i++) {
- output_samples(p, i, obuf_pos);
- p += IFFT_LEN*2;
- }
- obuf_pos+=IFFT_LEN*2/CHAR_BIT;
-}
-
-#define TBUF_OFFSET(frame,byte) (tapebuffer+(frame)*TAPE_FRAME_SIZE+(byte)+TAPE_HEADER_SIZE)
-
-void do_transform(buffer_pos_t *start_of_wu, buffer_pos_t *end_of_wu) {
- buffer_pos_t end_trans,start_trans=*start_of_wu;
- int i,nsamp;
- do {
- obuf_pos=0; /* reset to the beginning of the output buffer */
- for (i=0;i<768;i++) {
- end_trans.frame=start_trans.frame;
- end_trans.byte=start_trans.byte+(FFT_LEN*2/CHAR_BIT);
- if (end_trans.byte > TAPE_DATA_SIZE) {
- /* End of frame crossed need to trasfer correctly */
- end_trans.frame++;
- end_trans.byte-=TAPE_DATA_SIZE;
- nsamp=(TAPE_DATA_SIZE-start_trans.byte)*(CHAR_BIT/2);
- assert((nsamp+end_trans.byte*(CHAR_BIT/2)) == FFT_LEN);
- splitter_bits_to_float((unsigned short *)TBUF_OFFSET(start_trans.frame,start_trans.byte),
- databuf, nsamp);
- splitter_bits_to_float((unsigned short *)TBUF_OFFSET(end_trans.frame,0),databuf+nsamp*2,
- end_trans.byte*(CHAR_BIT/2));
- } else {
- splitter_bits_to_float((unsigned short *)TBUF_OFFSET(start_trans.frame,start_trans.byte),
- databuf,FFT_LEN);
- }
- process_seg(databuf);
- /* Go on to next transform */
- start_trans=end_trans;
- }
- /* Check if we're at the end of the wu file. If so we print less bytes */
- if ((end_trans.frame>=end_of_wu->frame) &&
- (end_trans.byte>=end_of_wu->byte)) {
- write_wufile_blocks(NBYTES % SAMPLES_PER_OBUF);
- } else {
- write_wufile_blocks(SAMPLES_PER_OBUF);
- }
- } while (!((end_trans.frame>=end_of_wu->frame) && (end_trans.byte>=end_of_wu->byte)));
-
- /* Move the data in the buffer so we don't have to reread portions of the
- * tape.
- */
- {
- unsigned char *record_offset;
- int copysize;
- end_of_wu->frame-=WU_OVERLAP_FRAMES;
- records_in_buffer=TAPE_RECORDS_IN_BUFFER-
- (end_of_wu->frame/TAPE_FRAMES_PER_RECORD);
- record_offset=tapebuffer+
- (end_of_wu->frame/TAPE_FRAMES_PER_RECORD)*TAPE_RECORD_SIZE;
- copysize=records_in_buffer*TAPE_RECORD_SIZE;
- bcopy(record_offset,tapebuffer,copysize);
- }
-}
-
-/*
- *
- * $Log: dotransform.cpp,v $
- * Revision 1.2.4.1 2006/12/14 22:24:38 korpela
- * *** empty log message ***
- *
- * Revision 1.2 2003/09/11 18:53:37 korpela
- * *** empty log message ***
- *
- * Revision 1.1 2003/07/29 20:35:36 korpela
- *
- * renames .C files to .cpp
- *
- * Revision 1.1 2003/06/03 00:16:10 korpela
- *
- * Initial splitter under CVS control.
- *
- * Revision 3.2 2003/05/19 17:40:59 eheien
- * *** empty log message ***
- *
- * Revision 3.1 2003/04/10 22:09:00 korpela
- * *** empty log message ***
- *
- * Revision 3.0 2001/08/01 19:04:57 korpela
- * Check this in before Paul screws it up.
- *
- * Revision 2.7 1999/03/27 16:19:35 korpela
- * *** empty log message ***
- *
- * Revision 2.6 1999/02/22 19:02:50 korpela
- * Revered input real & imaginary.
- *
- * Revision 2.5 1999/02/10 21:49:44 korpela
- * Zeroed DC component of forward transform.
- *
- * Revision 2.4 1999/02/01 22:28:52 korpela
- * FFTW version.
- *
- * Revision 2.3 1998/12/14 23:41:44 korpela
- * *** empty log message ***
- *
- * Revision 2.2 1998/11/04 23:08:25 korpela
- * Byte and bit order change.
- *
- * Revision 2.1 1998/11/02 16:41:21 korpela
- * Minor Change.
- *
- * Revision 2.0 1998/10/30 22:00:04 korpela
- * Conversion to C++ and merger with client source tree.
- *
- * Revision 1.2 1998/10/30 20:26:03 korpela
- * Bug Fixes. Now mostly working.
- *
- * Revision 1.1 1998/10/27 00:51:08 korpela
- * Initial revision
- *
- *
- */
diff --git a/splitter_pfb/dotransform.h b/splitter_pfb/dotransform.h
deleted file mode 100644
index 5b3136d..0000000
--- a/splitter_pfb/dotransform.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- *
- * dotransform.h
- *
- * Functions for division by frequency into work units.
- *
- * $Id: dotransform.h,v 1.1 2003/06/03 00:16:11 korpela Exp $
- *
- */
-
-/* buffer for fft input/output */
-extern float databuf[FFT_LEN*2];
-
-/* buffer for ftt output before data writes, needs to be multiple
- * of three bytes long for encode to work.
- */
-#define SAMPLES_PER_OBUF (FFT_LEN*2*3/CHAR_BIT)
-#define TBUF_OFFSET(frame,byte) (tapebuffer+(frame)*TAPE_FRAME_SIZE+(byte))
-extern unsigned char output_buf[NSTRIPS][SAMPLES_PER_OBUF];
-
-
-extern int obuf_pos; /* Tracks current postition in the output buffers */
-
-
-void output_samples(float *data, int i, int buf_pos);
-void splitter_bits_to_float(unsigned short *raw, float *data, int nsamples) ;
-void process_seg(float* data) ;
-void do_transform(buffer_pos_t *start_of_wu, buffer_pos_t *end_of_wu) ;
-
-/*
- *
- * $Log: dotransform.h,v $
- * Revision 1.1 2003/06/03 00:16:11 korpela
- *
- * Initial splitter under CVS control.
- *
- * Revision 3.0 2001/08/01 19:04:57 korpela
- * Check this in before Paul screws it up.
- *
- * Revision 2.3 1999/02/01 22:28:52 korpela
- * FFTW version.
- *
- * Revision 2.2 1998/11/04 23:08:25 korpela
- * Byte and bit order change.
- *
- * Revision 2.1 1998/11/02 16:41:21 korpela
- * Minor Change.
- *
- * Revision 2.0 1998/10/30 22:00:04 korpela
- * Conversion to C++ and merger with client source tree.
- *
- * Revision 1.1 1998/10/27 01:05:22 korpela
- * Initial revision
- *
- *
- */
diff --git a/splitter_pfb/encode.cpp b/splitter_pfb/encode.cpp
deleted file mode 100644
index 579697b..0000000
--- a/splitter_pfb/encode.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- *
- * binary to ascii encoding for work unit files
- *
- * $Id: encode.cpp,v 1.2.4.2 2007/06/01 03:29:25 korpela Exp $
- *
- */
-
-#include "sah_config.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <assert.h>
-
-/* Write a range of bytes encoded into printable chars.
- * Encodes 3 bytes into 4 chars.
- * May read up to two bytes past end
- */
-
-void splitter_encode(unsigned char *bin, int nbytes, FILE *f) {
- int count=0, offset=0, nleft, count1=0;
- unsigned char c[4*1024+64];
- unsigned char nl=10;
- assert(nbytes<=(3*1024));
- for (nleft = nbytes; nleft > 0; nleft -= 3) {
- c[0+count1] = bin[offset]&0x3f; // 6
- c[1+count1] = (bin[offset]>>6) | (bin[offset+1]<<2)&0x3f; // 2+4
- c[2+count1] = ((bin[offset+1]>>4)&0xf) | (bin[offset+2]<<4)&0x3f;// 4+2
- c[3+count1] = bin[offset+2]>>2; // 6
- c[0+count1] += 0x20;
- c[1+count1] += 0x20;
- c[2+count1] += 0x20;
- c[3+count1] += 0x20;
- offset += 3;
- count += 4;
- count1 +=4;
- if (count == 64) {
- count = 0;
- c[count1++]=nl;
- }
- }
- write(fileno(f),c,count1);
-}
-
-/*
- *
- * $Log: encode.cpp,v $
- * Revision 1.2.4.2 2007/06/01 03:29:25 korpela
- * Fixes for linux build of Joe's updated code.
- *
- * Probably not working yet.
- *
- * Revision 1.2.4.1 2006/12/14 22:24:38 korpela
- * *** empty log message ***
- *
- * Revision 1.2 2003/09/11 18:53:37 korpela
- * *** empty log message ***
- *
- * Revision 1.1 2003/07/29 20:35:37 korpela
- *
- * renames .C files to .cpp
- *
- * Revision 1.1 2003/06/03 00:16:11 korpela
- *
- * Initial splitter under CVS control.
- *
- * Revision 3.0 2001/08/01 19:04:57 korpela
- * Check this in before Paul screws it up.
- *
- * Revision 2.3 1998/11/04 23:08:25 korpela
- * Byte and bit order change.
- *
- * Revision 2.2 1998/11/02 21:20:58 korpela
- * changed function name from encode() to splitter_encode() to avoid
- * conflict with encode routine in ../client/util.C. Will investigate
- * if merging of two functions is possible.
- *
- * Revision 2.1 1998/11/02 16:41:21 korpela
- * Minor Change.
- *
- * Revision 2.0 1998/10/30 22:00:04 korpela
- * Conversion to C++ and merger with client source tree.
- *
- * Revision 1.2 1998/10/30 20:26:03 korpela
- * Bug Fixes. Now mostly working.
- *
- * Revision 1.1 1998/10/27 00:52:56 korpela
- * Initial revision
- *
- *
- */
-
-
diff --git a/splitter_pfb/encode.h b/splitter_pfb/encode.h
deleted file mode 100644
index d17775f..0000000
--- a/splitter_pfb/encode.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- *
- * binary to ascii encoding for work unit files
- *
- * $Id: encode.h,v 1.1 2003/06/03 00:16:11 korpela Exp $
- *
- */
-
-/* Write a range of bytes encoded into printable chars.
- * Encodes 3 bytes into 4 chars.
- * May read up to two bytes past end
- */
-
-void splitter_encode(unsigned char *bin, int nbytes, FILE *f);
-
-/*
- * $Log: encode.h,v $
- * Revision 1.1 2003/06/03 00:16:11 korpela
- *
- * Initial splitter under CVS control.
- *
- * Revision 3.0 2001/08/01 19:04:57 korpela
- * Check this in before Paul screws it up.
- *
- * Revision 2.2 1998/11/02 21:20:58 korpela
- * Changed routine name from encode() to splitter_encode(). See encode.C
- * for details.
- *
- * Revision 2.1 1998/11/02 16:41:21 korpela
- * Minor Change.
- *
- * Revision 2.0 1998/10/30 22:00:04 korpela
- * Conversion to C++ and merger with client source tree.
- *
- * Revision 1.1 1998/10/27 01:06:46 korpela
- * Initial revision
- *
- *
- */
diff --git a/splitter_pfb/fftw.h b/splitter_pfb/fftw.h
deleted file mode 100644
index 41698f7..0000000
--- a/splitter_pfb/fftw.h
+++ /dev/null
@@ -1,413 +0,0 @@
-/* fftw/fftw.h. Generated automatically by configure. */
-/* -*- C -*- */
-/*
- * Copyright (c) 1997,1998 Massachusetts Institute of Technology
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- */
-
-/* fftw.h -- system-wide definitions */
-/* $Id: fftw.h,v 1.1 2003/06/03 00:16:12 korpela Exp $ */
-
-#ifndef FFTW_H
-#define FFTW_H
-
-#include <stdlib.h>
-#include <stdio.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-/* Define for using single precision */
-/*
- * If you can, use configure --enable-float instead of changing this
- * flag directly
- */
-#define FFTW_ENABLE_FLOAT 1
-
-/* our real numbers */
-#ifdef FFTW_ENABLE_FLOAT
-typedef float fftw_real;
-#else
-typedef double fftw_real;
-#endif
-
-/*********************************************
- * Complex numbers and operations
- *********************************************/
-typedef struct {
- fftw_real re, im;
-} fftw_complex;
-
-#define c_re(c) ((c).re)
-#define c_im(c) ((c).im)
-
-typedef enum {
- FFTW_FORWARD = -1, FFTW_BACKWARD = 1
-} fftw_direction;
-
-/* backward compatibility with FFTW-1.3 */
-typedef fftw_complex FFTW_COMPLEX;
-typedef fftw_real FFTW_REAL;
-
-#ifndef FFTW_1_0_COMPATIBILITY
-#define FFTW_1_0_COMPATIBILITY 0
-#endif
-
-#if FFTW_1_0_COMPATIBILITY
-/* backward compatibility with FFTW-1.0 */
-#define REAL fftw_real
-#define COMPLEX fftw_complex
-#endif
-
-/*********************************************
- * Success or failure status
- *********************************************/
-
-typedef enum {
- FFTW_SUCCESS = 0, FFTW_FAILURE = -1
-} fftw_status;
-
-/*********************************************
- * Codelets
- *********************************************/
-typedef void (fftw_notw_codelet)
- (const fftw_complex *, fftw_complex *, int, int);
-typedef void (fftw_twiddle_codelet)
- (fftw_complex *, const fftw_complex *, int,
- int, int);
-typedef void (fftw_generic_codelet)
- (fftw_complex *, const fftw_complex *, int,
- int, int, int);
-typedef void (fftw_real2hc_codelet)
- (const fftw_real *, fftw_real *, fftw_real *,
- int, int, int);
-typedef void (fftw_hc2real_codelet)
- (const fftw_real *, const fftw_real *,
- fftw_real *, int, int, int);
-typedef void (fftw_hc2hc_codelet)
- (fftw_real *, const fftw_complex *,
- int, int, int);
-typedef void (fftw_rgeneric_codelet)
- (fftw_real *, const fftw_complex *, int,
- int, int, int);
-
-/*********************************************
- * Configurations
- *********************************************/
-/*
- * A configuration is a database of all known codelets
- */
-
-enum fftw_node_type {
- FFTW_NOTW, FFTW_TWIDDLE, FFTW_GENERIC, FFTW_RADER,
- FFTW_REAL2HC, FFTW_HC2REAL, FFTW_HC2HC, FFTW_RGENERIC
-};
-
-/* description of a codelet */
-typedef struct {
- const char *name; /* name of the codelet */
- void (*codelet) (); /* pointer to the codelet itself */
- int size; /* size of the codelet */
- fftw_direction dir; /* direction */
- enum fftw_node_type type; /* TWIDDLE or NO_TWIDDLE */
- int signature; /* unique id */
- int ntwiddle; /* number of twiddle factors */
- const int *twiddle_order; /*
- * array that determines the order
- * in which the codelet expects
- * the twiddle factors
- */
-} fftw_codelet_desc;
-
-/* On Win32, you need to do funny things to access global variables
- in shared libraries. Thanks to Andrew Sterian for this hack. */
-#if defined(__WIN32__) || defined(WIN32) || defined(_WINDOWS)
-# if defined(BUILD_FFTW_DLL)
-# define DL_IMPORT(type) __declspec(dllexport) type
-# elif defined(USE_FFTW_DLL)
-# define DL_IMPORT(type) __declspec(dllimport) type
-# else
-# define DL_IMPORT(type) type
-# endif
-#else
-# define DL_IMPORT(type) type
-#endif
-
-extern DL_IMPORT(const char *) fftw_version;
-
-/*****************************
- * Plans
- *****************************/
-/*
- * A plan is a sequence of reductions to compute a FFT of
- * a given size. At each step, the FFT algorithm can:
- *
- * 1) apply a notw codelet, or
- * 2) recurse and apply a twiddle codelet, or
- * 3) apply the generic codelet.
- */
-
-/* structure that contains twiddle factors */
-typedef struct fftw_twiddle_struct {
- int n;
- const fftw_codelet_desc *cdesc;
- fftw_complex *twarray;
- struct fftw_twiddle_struct *next;
- int refcnt;
-} fftw_twiddle;
-
-typedef struct fftw_rader_data_struct {
- struct fftw_plan_struct *plan;
- fftw_complex *omega;
- int g, ginv;
- int p, flags, refcount;
- struct fftw_rader_data_struct *next;
- fftw_codelet_desc *cdesc;
-} fftw_rader_data;
-
-typedef void (fftw_rader_codelet)
- (fftw_complex *, const fftw_complex *, int,
- int, int, fftw_rader_data *);
-
-/* structure that holds all the data needed for a given step */
-typedef struct fftw_plan_node_struct {
- enum fftw_node_type type;
-
- union {
- /* nodes of type FFTW_NOTW */
- struct {
- int size;
- fftw_notw_codelet *codelet;
- const fftw_codelet_desc *codelet_desc;
- } notw;
-
- /* nodes of type FFTW_TWIDDLE */
- struct {
- int size;
- fftw_twiddle_codelet *codelet;
- fftw_twiddle *tw;
- struct fftw_plan_node_struct *recurse;
- const fftw_codelet_desc *codelet_desc;
- } twiddle;
-
- /* nodes of type FFTW_GENERIC */
- struct {
- int size;
- fftw_generic_codelet *codelet;
- fftw_twiddle *tw;
- struct fftw_plan_node_struct *recurse;
- } generic;
-
- /* nodes of type FFTW_RADER */
- struct {
- int size;
- fftw_rader_codelet *codelet;
- fftw_rader_data *rader_data;
- fftw_twiddle *tw;
- struct fftw_plan_node_struct *recurse;
- } rader;
-
- /* nodes of type FFTW_REAL2HC */
- struct {
- int size;
- fftw_real2hc_codelet *codelet;
- const fftw_codelet_desc *codelet_desc;
- } real2hc;
-
- /* nodes of type FFTW_HC2REAL */
- struct {
- int size;
- fftw_hc2real_codelet *codelet;
- const fftw_codelet_desc *codelet_desc;
- } hc2real;
-
- /* nodes of type FFTW_HC2HC */
- struct {
- int size;
- fftw_direction dir;
- fftw_hc2hc_codelet *codelet;
- fftw_twiddle *tw;
- struct fftw_plan_node_struct *recurse;
- const fftw_codelet_desc *codelet_desc;
- } hc2hc;
-
- /* nodes of type FFTW_RGENERIC */
- struct {
- int size;
- fftw_direction dir;
- fftw_rgeneric_codelet *codelet;
- fftw_twiddle *tw;
- struct fftw_plan_node_struct *recurse;
- } rgeneric;
- } nodeu;
-
- int refcnt;
-} fftw_plan_node;
-
-struct fftw_plan_struct {
- int n;
- int refcnt;
- fftw_direction dir;
- int flags;
- int wisdom_signature;
- enum fftw_node_type wisdom_type;
- struct fftw_plan_struct *next;
- fftw_plan_node *root;
- double cost;
-};
-
-/* a plan is just an array of instructions */
-typedef struct fftw_plan_struct *fftw_plan;
-
-/* flags for the planner */
-#define FFTW_ESTIMATE (0)
-#define FFTW_MEASURE (1)
-
-#define FFTW_OUT_OF_PLACE (0)
-#define FFTW_IN_PLACE (8)
-#define FFTW_USE_WISDOM (16)
-
-#define FFTW_THREADSAFE (128) /* guarantee plan is read-only so that the
- same plan can be used in parallel by
- multiple threads */
-
-#define FFTWND_FORCE_BUFFERED (256) /* internal, undocumented flag */
-
-extern fftw_plan fftw_create_plan_specific(int n, fftw_direction dir,
- int flags,
- fftw_complex *in, int istride,
- fftw_complex *out, int ostride);
-#define FFTW_HAS_PLAN_SPECIFIC
-extern fftw_plan fftw_create_plan(int n, fftw_direction dir, int flags);
-extern void fftw_print_plan(fftw_plan plan);
-extern void fftw_destroy_plan(fftw_plan plan);
-extern void fftw(fftw_plan plan, int howmany, fftw_complex *in, int istride,
- int idist, fftw_complex *out, int ostride, int odist);
-extern void fftw_one(fftw_plan plan, fftw_complex *in, fftw_complex *out);
-extern void fftw_die(const char *s);
-extern void *fftw_malloc(size_t n);
-extern void fftw_free(void *p);
-extern void fftw_check_memory_leaks(void);
-extern void fftw_print_max_memory_usage(void);
-
-typedef void *(*fftw_malloc_type_function) (size_t n);
-typedef void (*fftw_free_type_function) (void *p);
-typedef void (*fftw_die_type_function) (const char *errString);
-extern DL_IMPORT(fftw_malloc_type_function) fftw_malloc_hook;
-extern DL_IMPORT(fftw_free_type_function) fftw_free_hook;
-extern DL_IMPORT(fftw_die_type_function) fftw_die_hook;
-
-extern size_t fftw_sizeof_fftw_real(void);
-
-/* Wisdom: */
-/*
- * define this symbol so that users know we are using a version of FFTW
- * with wisdom
- */
-#define FFTW_HAS_WISDOM
-extern void fftw_forget_wisdom(void);
-extern void fftw_export_wisdom(void (*emitter) (char c, void *), void *data);
-extern fftw_status fftw_import_wisdom(int (*g) (void *), void *data);
-extern void fftw_export_wisdom_to_file(FILE *output_file);
-extern fftw_status fftw_import_wisdom_from_file(FILE *input_file);
-extern char *fftw_export_wisdom_to_string(void);
-extern fftw_status fftw_import_wisdom_from_string(const char *input_string);
-
-/*
- * define symbol so we know this function is available (it is not in
- * older FFTWs)
- */
-#define FFTW_HAS_FPRINT_PLAN
-extern void fftw_fprint_plan(FILE *f, fftw_plan plan);
-
-/*****************************
- * N-dimensional code
- *****************************/
-typedef struct {
- int is_in_place; /* 1 if for in-place FFTs, 0 otherwise */
-
- int rank; /*
- * the rank (number of dimensions) of the
- * array to be FFTed
- */
- int *n; /*
- * the dimensions of the array to the
- * FFTed
- */
- fftw_direction dir;
-
- int *n_before; /*
- * n_before[i] = product of n[j] for j < i
- */
- int *n_after; /* n_after[i] = product of n[j] for j > i */
-
- fftw_plan *plans; /* 1d fftw plans for each dimension */
-
- int nbuffers, nwork;
- fftw_complex *work; /*
- * work array big enough to hold
- * nbuffers+1 of the largest dimension
- * (has nwork elements)
- */
-} fftwnd_data;
-
-typedef fftwnd_data *fftwnd_plan;
-
-/* Initializing the FFTWND plan: */
-extern fftwnd_plan fftw2d_create_plan(int nx, int ny, fftw_direction dir,
- int flags);
-extern fftwnd_plan fftw3d_create_plan(int nx, int ny, int nz,
- fftw_direction dir, int flags);
-extern fftwnd_plan fftwnd_create_plan(int rank, const int *n,
- fftw_direction dir,
- int flags);
-
-extern fftwnd_plan fftw2d_create_plan_specific(int nx, int ny,
- fftw_direction dir,
- int flags,
- fftw_complex *in, int istride,
- fftw_complex *out, int ostride);
-extern fftwnd_plan fftw3d_create_plan_specific(int nx, int ny, int nz,
- fftw_direction dir, int flags,
- fftw_complex *in, int istride,
- fftw_complex *out, int ostride);
-extern fftwnd_plan fftwnd_create_plan_specific(int rank, const int *n,
- fftw_direction dir,
- int flags,
- fftw_complex *in, int istride,
- fftw_complex *out, int ostride);
-
-/* Freeing the FFTWND plan: */
-extern void fftwnd_destroy_plan(fftwnd_plan plan);
-
-/* Printing the plan: */
-extern void fftwnd_fprint_plan(FILE *f, fftwnd_plan p);
-extern void fftwnd_print_plan(fftwnd_plan p);
-#define FFTWND_HAS_PRINT_PLAN
-
-/* Computing the N-Dimensional FFT */
-extern void fftwnd(fftwnd_plan plan, int howmany,
- fftw_complex *in, int istride, int idist,
- fftw_complex *out, int ostride, int odist);
-extern void fftwnd_one(fftwnd_plan p, fftw_complex *in, fftw_complex *out);
-
-#ifdef __cplusplus
-} /* extern "C" */
-
-#endif /* __cplusplus */
-#endif /* FFTW_H */
diff --git a/splitter_pfb/four1.cpp b/splitter_pfb/four1.cpp
deleted file mode 100644
index f775a98..0000000
--- a/splitter_pfb/four1.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- *
- * Fourier transform routine from numerical recipes.
- *
- * $Id: four1.cpp,v 1.2.4.1 2006/12/14 22:24:38 korpela Exp $
- *
- */
-
-#include "sah_config.h"
-#include <math.h>
-#define SWAP(a,b) tempr=(a);(a)=(b);(b)=tempr
-
-void four1(float data[], unsigned long nn, int isign) {
- unsigned long n,mmax,m,j,istep,i;
- double wtemp,wr,wpr,wpi,wi,theta;
- float tempr,tempi;
-
- n=nn << 1;
- j=1;
- for (i=1;i<n;i+=2) {
- if (j > i) {
- SWAP(data[j],data[i]);
- SWAP(data[j+1],data[i+1]);
- }
- m=n >> 1;
- while (m >= 2 && j > m) {
- j -= m;
- m >>= 1;
- }
- j += m;
- }
- mmax=2;
- while (n > mmax) {
- istep=mmax << 1;
- theta=isign*(6.28318530717959/mmax);
- wtemp=sin(0.5*theta);
- wpr = -2.0*wtemp*wtemp;
- wpi=sin(theta);
- wr=1.0;
- wi=0.0;
- for (m=1;m<mmax;m+=2) {
- for (i=m;i<=n;i+=istep) {
- j=i+mmax;
- tempr=(float)(wr*data[j]-wi*data[j+1]);
- tempi=(float)(wr*data[j+1]+wi*data[j]);
- data[j]=data[i]-tempr;
- data[j+1]=data[i+1]-tempi;
- data[i] += tempr;
- data[i+1] += tempi;
- }
- wr=(wtemp=wr)*wpr-wi*wpi+wr;
- wi=wi*wpr+wtemp*wpi+wi;
- }
- mmax=istep;
- }
-}
-#undef SWAP
-
-/*
- * $Log: four1.cpp,v $
- * Revision 1.2.4.1 2006/12/14 22:24:38 korpela
- * *** empty log message ***
- *
- * Revision 1.2 2003/09/11 18:53:37 korpela
- * *** empty log message ***
- *
- * Revision 1.1 2003/07/29 20:35:39 korpela
- *
- * renames .C files to .cpp
- *
- * Revision 1.1 2003/06/03 00:16:13 korpela
- *
- * Initial splitter under CVS control.
- *
- * Revision 3.0 2001/08/01 19:04:57 korpela
- * Check this in before Paul screws it up.
- *
- * Revision 2.1 1998/11/02 16:41:21 korpela
- * Minor Change.
- *
- * Revision 2.0 1998/10/30 22:00:04 korpela
- * Conversion to C++ and merger with client source tree.
- *
- * Revision 1.1 1998/10/27 00:54:59 korpela
- * Initial revision
- *
- *
- */
diff --git a/splitter_pfb/four1.h b/splitter_pfb/four1.h
deleted file mode 100644
index 7d6e5b9..0000000
--- a/splitter_pfb/four1.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- *
- * Fourier transform routine from numerical recipes.
- *
- * $Id: four1.h,v 1.1 2003/06/03 00:16:13 korpela Exp $
- *
- */
-
-
-void four1(float data[], unsigned long nn, int isign);
-
-/*
- * $Log: four1.h,v $
- * Revision 1.1 2003/06/03 00:16:13 korpela
- *
- * Initial splitter under CVS control.
- *
- * Revision 3.0 2001/08/01 19:04:57 korpela
- * Check this in before Paul screws it up.
- *
- * Revision 2.1 1998/11/02 16:41:21 korpela
- * Minor Change.
- *
- * Revision 2.0 1998/10/30 22:00:04 korpela
- * Conversion to C++ and merger with client source tree.
- *
- * Revision 1.1 1998/10/27 01:08:21 korpela
- * Initial revision
- *
- *
- */
diff --git a/splitter_pfb/hr_min_sec.cpp b/splitter_pfb/hr_min_sec.cpp
deleted file mode 100644
index 63a7eea..0000000
--- a/splitter_pfb/hr_min_sec.cpp
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- *
- * timecvt.c
- *
- * Time conversion routines.
- *
- * $Id: hr_min_sec.cpp,v 1.2.4.1 2006/12/14 22:24:39 korpela Exp $
- *
- */
-
-#include "sah_config.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-char* hr_min_sec (double x) {
- static char buf[256];
- int hr = (int)(x / 3600);
- int min = (int)((x/3600-(double)hr)*60);
- float s = (float)(x - ((double)hr)*3600 - ((double)min)*60);
-
- // the "-.05" below is to prevent it from printing 60.0 sec
- // when the real value is e.g. 59.91
- //
- sprintf(buf, "%d hr %02d min %04.1f sec", hr, min, s-.05);
- return buf;
-}
-
-
-/*
- * $Log: hr_min_sec.cpp,v $
- * Revision 1.2.4.1 2006/12/14 22:24:39 korpela
- * *** empty log message ***
- *
- * Revision 1.2 2003/09/11 18:53:38 korpela
- * *** empty log message ***
- *
- * Revision 1.1 2003/07/29 20:35:40 korpela
- *
- * renames .C files to .cpp
- *
- * Revision 1.1 2003/06/03 01:01:16 korpela
- *
- * First working splitter under CVS.
- *
- * Revision 4.4 2003/03/10 02:50:03 jeffc
- * jeffc - t_strncpy()
- *
- * Revision 4.3 2003/01/22 20:51:58 korpela
- * Changed all strcpy to strncpy.
- * Changed all gets to fgets.
- *
- * Revision 4.2 2001/12/27 21:35:57 davea
- * *** empty log message ***
- *
- * Revision 4.1 2001/09/10 00:25:17 davea
- * *** empty log message ***
- *
- * Revision 4.0 2000/10/05 18:12:12 korpela
- * Synchronized versions to 4.0 following release of 3.0 client
- *
- * Revision 3.8 2000/09/14 01:01:31 korpela
- * *** empty log message ***
- *
- * Revision 3.7 2000/04/24 08:39:06 charlief
- * eliminate compiler warning in hr_min_sec() function.
- *
- * Revision 3.6 2000/01/19 08:32:32 davea
- * *** empty log message ***
- *
- * Revision 3.5 1999/10/19 08:07:24 davea
- * *** empty log message ***
- *
- * Revision 3.4 1999/06/26 06:56:44 hiramc
- * Hiram 99/06/25 23:59 moved the include <string.h> out of the
- * ifdef _WIN32 to define strcpy() for all compiles
- *
- * Revision 3.3 1999/06/22 09:40:36 charlief
- * Reverse last change:restore jd_string() as it was before.
- * Add new function short_jd_string(), which does not print
- * Julian Date as a floating point value.
- *
- * Revision 3.1 1999/06/10 00:44:11 korpela
- * *** empty log message ***
- *
- * Revision 3.0 1999/05/14 19:17:35 korpela
- * 1.0(Win/Mac) 1.1(Unix) Release Version
- *
- * Revision 2.11 1999/03/14 00:23:02 davea
- * *** empty log message ***
- *
- * Revision 2.10 1999/03/11 21:46:58 korpela
- * Fixed rounding error in st_to_ut().
- *
- * Revision 2.9 1999/03/05 09:15:07 kyleg
- * *** empty log message ***
- *
- * Revision 2.8 1999/02/18 19:36:49 korpela
- * *** empty log message ***
- *
- * Revision 2.7 1999/02/13 23:54:44 kyleg
- * *** empty log message ***
- *
- * Revision 2.6 1999/02/11 08:36:54 davea
- * *** empty log message ***
- *
- * Revision 2.5 1998/11/17 21:47:02 korpela
- * *** empty log message ***
- *
- * Revision 2.4 1998/11/05 21:25:21 davea
- * replace floor() with (int)
- *
- * Revision 2.3 1998/11/05 02:00:06 kyleg
- * *** empty log message ***
- *
- * Revision 2.2 1998/11/02 17:59:06 korpela
- * *** empty log message ***
- *
- * Revision 2.1 1998/11/02 17:23:29 korpela
- * .`
- *
- * Revision 2.0 1998/10/30 22:00:04 korpela
- * Conversion to C++ and merger with client source tree.
- *
- * Revision 1.2 1998/10/27 00:58:56 korpela
- * Bug fixes.
- *
- * Revision 1.1 1998/10/19 18:57:56 korpela
- * Initial revision
- *
- *
- */
diff --git a/splitter_pfb/hr_min_sec.h b/splitter_pfb/hr_min_sec.h
deleted file mode 100644
index 062a2c3..0000000
--- a/splitter_pfb/hr_min_sec.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- *
- * timecvt.c
- *
- * Time conversion routines.
- *
- * $Id: hr_min_sec.h,v 1.1 2003/06/03 01:01:16 korpela Exp $
- *
- */
-
-char* hr_min_sec (double x) ;
-
-
-/*
- * $Log: hr_min_sec.h,v $
- * Revision 1.1 2003/06/03 01:01:16 korpela
- *
- * First working splitter under CVS.
- *
- * Revision 4.4 2003/03/10 02:50:03 jeffc
- * jeffc - t_strncpy()
- *
- * Revision 4.3 2003/01/22 20:51:58 korpela
- * Changed all strcpy to strncpy.
- * Changed all gets to fgets.
- *
- * Revision 4.2 2001/12/27 21:35:57 davea
- * *** empty log message ***
- *
- * Revision 4.1 2001/09/10 00:25:17 davea
- * *** empty log message ***
- *
- * Revision 4.0 2000/10/05 18:12:12 korpela
- * Synchronized versions to 4.0 following release of 3.0 client
- *
- * Revision 3.8 2000/09/14 01:01:31 korpela
- * *** empty log message ***
- *
- * Revision 3.7 2000/04/24 08:39:06 charlief
- * eliminate compiler warning in hr_min_sec() function.
- *
- * Revision 3.6 2000/01/19 08:32:32 davea
- * *** empty log message ***
- *
- * Revision 3.5 1999/10/19 08:07:24 davea
- * *** empty log message ***
- *
- * Revision 3.4 1999/06/26 06:56:44 hiramc
- * Hiram 99/06/25 23:59 moved the include <string.h> out of the
- * ifdef _WIN32 to define strcpy() for all compiles
- *
- * Revision 3.3 1999/06/22 09:40:36 charlief
- * Reverse last change:restore jd_string() as it was before.
- * Add new function short_jd_string(), which does not print
- * Julian Date as a floating point value.
- *
- * Revision 3.1 1999/06/10 00:44:11 korpela
- * *** empty log message ***
- *
- * Revision 3.0 1999/05/14 19:17:35 korpela
- * 1.0(Win/Mac) 1.1(Unix) Release Version
- *
- * Revision 2.11 1999/03/14 00:23:02 davea
- * *** empty log message ***
- *
- * Revision 2.10 1999/03/11 21:46:58 korpela
- * Fixed rounding error in st_to_ut().
- *
- * Revision 2.9 1999/03/05 09:15:07 kyleg
- * *** empty log message ***
- *
- * Revision 2.8 1999/02/18 19:36:49 korpela
- * *** empty log message ***
- *
- * Revision 2.7 1999/02/13 23:54:44 kyleg
- * *** empty log message ***
- *
- * Revision 2.6 1999/02/11 08:36:54 davea
- * *** empty log message ***
- *
- * Revision 2.5 1998/11/17 21:47:02 korpela
- * *** empty log message ***
- *
- * Revision 2.4 1998/11/05 21:25:21 davea
- * replace floor() with (int)
- *
- * Revision 2.3 1998/11/05 02:00:06 kyleg
- * *** empty log message ***
- *
- * Revision 2.2 1998/11/02 17:59:06 korpela
- * *** empty log message ***
- *
- * Revision 2.1 1998/11/02 17:23:29 korpela
- * .`
- *
- * Revision 2.0 1998/10/30 22:00:04 korpela
- * Conversion to C++ and merger with client source tree.
- *
- * Revision 1.2 1998/10/27 00:58:56 korpela
- * Bug fixes.
- *
- * Revision 1.1 1998/10/19 18:57:56 korpela
- * Initial revision
- *
- *
- */
diff --git a/splitter_pfb/makebufs.cpp b/splitter_pfb/makebufs.cpp
deleted file mode 100644
index c7b5140..0000000
--- a/splitter_pfb/makebufs.cpp
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * makebuf.c
- *
- * Creates temporary files and buffers for use in processing....
- *
- * $Id: makebufs.cpp,v 1.3.2.2 2006/12/14 22:24:39 korpela Exp $
- *
- */
-
-#include "sah_config.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/mman.h>
-#include <errno.h>
-
-#include "splitparms.h"
-#include "splittypes.h"
-#include "splitter.h"
-#include "message.h"
-
-int tapebuffd;
-char tapebufname[30];
-
-void delbuffer(void) {
- munmap((char *)tapebuffer,TAPE_BUFFER_SIZE);
- close(tapebuffd);
- unlink(tapebufname);
-}
-
-void delbuffer_sig(int i) {
- munmap((char *)tapebuffer,TAPE_BUFFER_SIZE);
- close(tapebuffd);
- unlink(tapebufname);
- exit(1);
-}
-
-
-
-void makebuffers(unsigned char **tapebuffer) {
- char buf[1024];
-/*
- * Allocate temp files for tape and wu buffers. Memory mapping these
- * files will prevent us from running out of virtual memory
- */
-/* sprintf(tapebufname,"tape%d",getpid());
-
- if ((tapebuffd=open(tapebufname,O_RDWR|O_CREAT,0777))==-1) {
- fprintf(stderr,"Unable to open temp file!\n");
- fprintf(errorlog,"Unable to open temp file!\n");
- exit(EXIT_FAILURE);
- }
-
- if (ftruncate(tapebuffd,TAPE_BUFFER_SIZE) == -1) {
- fprintf(stderr,"ftruncate failure\n");
- fprintf(stderr," errno=%d\n",errno);
- fprintf(errorlog,"ftruncate failure\n");
- fprintf(errorlog," errno=%d\n",errno);
- exit(EXIT_FAILURE);
- }
-
- if (((*tapebuffer=
- mmap(0,TAPE_BUFFER_SIZE,PROT_READ|PROT_WRITE,MAP_SHARED,tapebuffd,0))==(char *)-1))
- {
- fprintf(stderr,"mmap failure\n");
- fprintf(errorlog,"mmap failure\n");
- exit(EXIT_FAILURE);
- }
-
- atexit(delbuffer);
- signal(SIGINT,delbuffer_sig);
-*/
- if (!(*tapebuffer=(unsigned char *)malloc(TAPE_BUFFER_SIZE))) {
- log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,"unable to allocate memory for tape buffer\n");
- exit(0);
- }
-}
-
-/*
- * $Log: makebufs.cpp,v $
- * Revision 1.3.2.2 2006/12/14 22:24:39 korpela
- * *** empty log message ***
- *
- * Revision 1.3.2.1 2006/01/13 00:37:57 korpela
- * Moved splitter to using standard BOINC logging mechanisms. All stderr now
- * goes to "error.log"
- *
- * Added command line parameters "-iterations=" (number of workunit groups to
- * create before exiting), "-trigger_file_path=" (path to the splitter_stop trigger
- * file. Default is /disks/setifiler1/wutape/tapedir/splitter_stop).
- *
- * Reduced deadlines by a factor of three. We now need a 30 MFLOP machine to meet
- * the deadline.
- *
- * Revision 1.3 2004/06/16 20:57:18 jeffc
- * *** empty log message ***
- *
- * Revision 1.2 2003/09/11 18:53:38 korpela
- * *** empty log message ***
- *
- * Revision 1.1 2003/07/29 20:35:42 korpela
- *
- * renames .C files to .cpp
- *
- * Revision 1.1 2003/06/03 00:16:13 korpela
- *
- * Initial splitter under CVS control.
- *
- * Revision 3.0 2001/08/01 19:04:57 korpela
- * Check this in before Paul screws it up.
- *
- * Revision 2.3 1998/12/14 23:41:44 korpela
- * *** empty log message ***
- *
- * Revision 2.2 1998/11/02 21:20:58 korpela
- * Added signal handler for removal of temporary files on SIGINT.
- *
- * Revision 2.1 1998/11/02 16:41:21 korpela
- * Minor Change.
- *
- * Revision 2.0 1998/10/30 22:00:04 korpela
- * Conversion to C++ and merger with client source tree.
- *
- * Revision 1.4 1998/10/30 20:26:03 korpela
- * Bug Fixes. Now mostly working.
- *
- * Revision 1.3 1998/10/27 00:55:43 korpela
- * Bug Fixes
- *
- * Revision 1.2 1998/10/20 20:40:54 korpela
- * Removed wu buffer.
- *
- * Revision 1.1 1998/10/19 19:01:56 korpela
- * Initial revision
- *
- */
diff --git a/splitter_pfb/makebufs.h b/splitter_pfb/makebufs.h
deleted file mode 100644
index 3e1aa59..0000000
--- a/splitter_pfb/makebufs.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * makebufs.h
- *
- * Creates temporary files and buffers for use in processing....
- *
- * $Id: makebufs.h,v 1.1 2003/06/03 00:16:14 korpela Exp $
- *
- */
-
-#ifndef MAKEBUFS_H
-#define MAKEBUFS_H
-
-void makebuffers(unsigned char **tapebuffer);
-
-#endif
-
-/*
- * $Log: makebufs.h,v $
- * Revision 1.1 2003/06/03 00:16:14 korpela
- *
- * Initial splitter under CVS control.
- *
- * Revision 3.0 2001/08/01 19:04:57 korpela
- * Check this in before Paul screws it up.
- *
- * Revision 2.1 1998/11/02 16:41:21 korpela
- * Minor Change.
- *
- * Revision 2.0 1998/10/30 22:00:04 korpela
- * Conversion to C++ and merger with client source tree.
- *
- * Revision 1.2 1998/10/20 20:41:45 korpela
- * Remove wu buffer.
- *
- * Revision 1.1 1998/10/19 19:02:36 korpela
- * Initial revision
- *
- */
diff --git a/splitter_pfb/mb_read_blocks_dr2.cpp b/splitter_pfb/mb_read_blocks_dr2.cpp
index 20f5615..f5a4c6f 100644
--- a/splitter_pfb/mb_read_blocks_dr2.cpp
+++ b/splitter_pfb/mb_read_blocks_dr2.cpp
@@ -33,7 +33,7 @@ int read_blocks_dr2(int tape_fd,
num_blocks_read = seti_StructureDr2Data(tape_fd, beam, pol,
num_blocks_to_read,
tapebuffer, blanker_filter);
- if(num_blocks_read == num_blocks_to_read) {
+ while (num_blocks_read == num_blocks_to_read) {
//check for an uninterrupted run
if (valid_run(tapebuffer,splitter_settings.receiver_cfg->min_vgc)) {
std::vector<dr2_compact_block_t>::iterator i=tapebuffer.begin();
@@ -45,6 +45,12 @@ int read_blocks_dr2(int tape_fd,
coord_history[i->header.coord_time].time = i->header.coord_time.jd().uval();
}
good_read = 1;
+ break;
+ } else {
+ num_blocks_to_read = 512-tapebuffer.size();
+ num_blocks_read = seti_StructureDr2Data(tape_fd, beam, pol,
+ num_blocks_to_read,
+ tapebuffer, blanker_filter);
}
}
return(good_read);
diff --git a/splitter_pfb/mb_splittypes.h b/splitter_pfb/mb_splittypes.h
deleted file mode 100644
index 540fd74..0000000
--- a/splitter_pfb/mb_splittypes.h
+++ /dev/null
@@ -1,114 +0,0 @@
-/* splittypes.h
- *
- * Type definitions specific to the splitter.
- *
- *
- * $Id: mb_splittypes.h,v 1.1.2.1 2006/12/14 22:24:44 korpela Exp $
- *
- */
-#ifndef SPLITTYPES_H
-#define SPLITTYPES_H
-
-#include <stdio.h>
-
-#include "splitparms.h"
-#include "s_util.h"
-#include "seti_header.h"
-
-//typedef struct wuheader {
- //WU_INFO wuhead;
- //SETI_WU_INFO wuinfo;
-//} wuheader_t;
-
-typedef struct tapeheader {
- char name[36];
- int rcdtype;
- int numringbufs;
- int numdiskbufs;
- unsigned long frameseq;
- unsigned long dataseq;
- int missed;
- TIME st;
- SCOPE_STRING telstr;
- int source;
- double centerfreq,samplerate;
- char version[16];
-} tapeheader_t;
-
-typedef struct buffer_pos {
- int frame;
- long offset;
-} buffer_pos_t;
-
-#endif
-/*
- * $Log: mb_splittypes.h,v $
- * Revision 1.1.2.1 2006/12/14 22:24:44 korpela
- * *** empty log message ***
- *
- * Revision 1.4 2003/08/05 17:23:43 korpela
- * More work on database stuff.
- * Further tweaks.
- *
- * Revision 1.3 2003/07/29 20:35:51 korpela
- *
- * renames .C files to .cpp
- *
- * Revision 1.2 2003/06/03 01:01:17 korpela
- *
- * First working splitter under CVS.
- *
- * Revision 1.1 2003/06/03 00:23:41 korpela
- *
- * Again
- *
- * Revision 3.1 2003/05/19 17:40:59 eheien
- * *** empty log message ***
- *
- * Revision 3.0 2001/08/01 19:04:57 korpela
- * Check this in before Paul screws it up.
- *
- * Revision 2.5 1999/02/11 16:46:28 korpela
- * Added startblock and norewind support, and wu_database_id.
- *
- * Revision 2.4 1998/11/10 00:02:44 korpela
- * Moved remaining wuheader fields into a WU_INFO structure.
- *
- * Revision 2.3 1998/11/05 21:18:41 korpela
- * Moved name field from header to seti header.
- *
- * Revision 2.2 1998/11/02 21:20:58 korpela
- * Moved tape_version and encoding_type into SETI_WU_INFO.
- *
- * Revision 2.1 1998/11/02 16:38:29 korpela
- * Variable type changes.
- *
- * Revision 2.0 1998/10/30 22:00:04 korpela
- * Conversion to C++ and merger with client source tree.
- *
- * Revision 1.7 1998/10/30 21:01:13 davea
- * *** empty log message ***
- *
- * Revision 1.6 1998/10/27 01:10:58 korpela
- * Modified tapeheader_t to match new tape header fields.
- *
- * Revision 1.5 1998/10/19 23:04:32 korpela
- * Moved times in telstr_t into an st_t.
- * Changed name of ast_t to st_t.
- * Added time zone (tz) field to ast_t.
- *
- * Revision 1.4 1998/10/15 19:13:30 korpela
- * Renamed "unix" fields to "unix_time" because of GCC #define.
- * Added position_history field to wuheader_t.
- *
- * Revision 1.3 1998/10/15 18:58:50 korpela
- * Added time_t unix to ast_t and telstr_t types.
- * Changed times in wuheader_t to time_t types.
- *
- * Revision 1.2 1998/10/15 18:01:19 korpela
- * Removed month field from ast_t and telstr_t.
- *
- * Revision 1.1 1998/10/15 16:20:24 korpela
- * Initial revision
- *
- */
diff --git a/splitter_pfb/mb_validrun.cpp b/splitter_pfb/mb_validrun.cpp
index 9bf7230..b7d85bb 100644
--- a/splitter_pfb/mb_validrun.cpp
+++ b/splitter_pfb/mb_validrun.cpp
@@ -16,7 +16,7 @@
#include "setilib.h"
#include "splitparms.h"
#include "splittypes.h"
-#include "splitter.h"
+#include "mb_splitter.h"
#include "message.h"
diff --git a/splitter_pfb/mb_wufiles.cpp b/splitter_pfb/mb_wufiles.cpp
index 7247eb5..2ef609a 100644
--- a/splitter_pfb/mb_wufiles.cpp
+++ b/splitter_pfb/mb_wufiles.cpp
@@ -82,7 +82,7 @@ tel, std::vector<workunit> &wuheader) {
tapebuffer[0].header.name,
procid,
tapebuffer[0].header.dataseq,
- tel-AO_430,
+ (tel-AO_430)&0xff,
s.id);
wugrp.receiver_cfg=r;
wugrp.recorder_cfg=s.recorder_cfg;
@@ -115,10 +115,12 @@ tel, std::vector<workunit> &wuheader) {
below--;
}
// Calculate the angular distance the beam has traveled
+ double ncoords=0;
for (p=below;p!=above;p++)
{
wugrp.data_desc.true_angle_range+=angdist(last_coord,p->second);
last_coord=p->second;
+ ncoords++;
}
wugrp.data_desc.true_angle_range+=angdist(last_coord,end_coord);
if (wugrp.data_desc.true_angle_range==0) wugrp.data_desc.true_angle_range=1e-10;
@@ -190,9 +192,19 @@ tel, std::vector<workunit> &wuheader) {
wugrp.data_desc.coords.clear();
wugrp.data_desc.coords.push_back(start_coord);
- for (p=below;p!=above;p++)
+ // lets have a maximum of 40 coordinate strings
+ double coord_increment=std::max(ncoords*0.025,1.0);
+
+ double last=0,curr=0;
+ for (p=below;p!=above;/*nothing*/)
{
wugrp.data_desc.coords.push_back(p->second);
+ curr+=coord_increment;
+ for (int z=round(last);z<round(curr);z++) {
+ p++;
+ if (p==above) break;
+ last=curr;
+ }
}
wugrp.data_desc.coords.push_back(end_coord);
@@ -205,7 +217,7 @@ tel, std::vector<workunit> &wuheader) {
wugrp.tape_info->start_time=tapebuffer[0].header.data_time.jd().uval();
wugrp.tape_info->last_block_time=wugrp.tape_info->start_time;
wugrp.tape_info->last_block_done=tapebuffer[0].header.dataseq;
- wugrp.tape_info->beam=tel-AO_ALFA_0_0;
+ wugrp.tape_info->beam=(tel-AO_ALFA_0_0)&0xff;
if (!nodb) {
if (wugrp.tape_info.id) {
diff --git a/splitter_pfb/polyphase.cpp b/splitter_pfb/polyphase.cpp
deleted file mode 100644
index 57cbdd8..0000000
--- a/splitter_pfb/polyphase.cpp
+++ /dev/null
@@ -1,149 +0,0 @@
-
-#include "sah_config.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <strings.h>
-#include <unistd.h>
-#include <limits.h>
-#include <assert.h>
-#include <math.h>
-
-#include "splitparms.h"
-#include "splittypes.h"
-#include "splitter.h"
-#include "fftw.h"
-#include "wufiles.h"
-#include "polyphase.h"
-#include "dotransform.h"
-
-/* buffer for fft input/output */
-//float databuf[FFT_LEN*2];
-
-/* buffer for ftt output before data writes, needs to be multiple
- * of three bytes long for encode to work.
- */
-#define SAMPLES_PER_OBUF (FFT_LEN*2*3/CHAR_BIT)
-
-extern unsigned char output_buf[NSTRIPS][SAMPLES_PER_OBUF];
-
-double *filter_r, *filter_i;
-float *f_data;
-
-extern int obuf_pos; /* Tracks current postition in the output buffers */
-
-void make_FIR (int n_points, int M, int window, double *output) {
- /* Create Mth band lowpass FIR filter, n_points long. */
-
- /* Modify this to give 8-bit quantized filter. */
- /* Also generate Hilbert transformed filter */
-
- int n;
- double q, p;
-
- for (n=0; n<n_points; n++) {
- if (n == n_points/2) {
- output[n] = 1;
- } else {
- q = n-(n_points/2);
- p = n_points/M;
- output[n] = sin(M_PI*q/p)/(M_PI*q/p);
- }
- }
- if (window == HANNING) {
- for (n=0; n<n_points; n++) {
- output[n] = output[n]*.5*(1 - cos(2*M_PI*n/(n_points-1)));
- }
- }
- else if (window == WELCH) {
- for (n=0; n<n_points; n++) {
- output[n] = output[n]*(1 - ((n-.5*(n_points-1))/(.5*(n_points+1)))*((n-.5*(n_points-1))/(.5*(n_points+1))));
- }
- }
-}
-
-
-void polyphase_seg(float* data) {
- int i,n;
- static fftw_plan planfwd;
- float *p;
-
- if (!planfwd) {
- planfwd=fftw_create_plan(P_FFT_LEN, FFTW_FORWARD,
- FFTW_MEASURE | FFTW_IN_PLACE | FFTW_USE_WISDOM );
- }
-
- for (i=0;i<P_FFT_LEN;i++) {
- f_data[2*i] = 0;
- f_data[2*i+1] = 0;
- for (n=0;n<N_WINDOWS;n++) {
- f_data[2*i] += data[2*i+2*n*P_FFT_LEN]*filter_r[P_FFT_LEN*n + i];
- f_data[2*i+1] += data[2*i+2*n*P_FFT_LEN+1]*filter_i[P_FFT_LEN*n + i];
- }
- }
- fftw_one(planfwd, (fftw_complex *)f_data, (fftw_complex *)NULL);
- /*for (i=0;i<P_FFT_LEN;i++) {
- fprintf( stderr, "%f %f\n", f_data[2*i], f_data[2*i+1]);
- }*/
- //fprintf( stderr, "%f %f ", f_data[2*3], f_data[2*3+1] );
- p = f_data;
- for (i=0; i<P_FFT_LEN; i++) {
- output_samples(p, i, obuf_pos);
- p += IFFT_LEN*2;
- }
- obuf_pos+=IFFT_LEN*2/CHAR_BIT;
-}
-
-#define TBUF_OFFSET(frame,byte) (tapebuffer+(frame)*TAPE_FRAME_SIZE+(byte)+TAPE_HEADER_SIZE)
-
-void do_polyphase(buffer_pos_t *start_of_wu, buffer_pos_t *end_of_wu) {
- buffer_pos_t end_trans,start_trans=*start_of_wu;
- int i,nsamp;
- do {
- obuf_pos=0; // reset to the beginning of the output buffer
- for (i=0;i<768;i++) {
- end_trans.frame=start_trans.frame;
- end_trans.byte=start_trans.byte+(FFT_LEN*2/CHAR_BIT);
- if (end_trans.byte > TAPE_DATA_SIZE) {
- // End of frame crossed need to trasfer correctly
- end_trans.frame++;
- end_trans.byte-=TAPE_DATA_SIZE;
- nsamp=(TAPE_DATA_SIZE-start_trans.byte)*(CHAR_BIT/2);
- assert((nsamp+end_trans.byte*(CHAR_BIT/2)) == FFT_LEN);
- splitter_bits_to_float((unsigned short *)TBUF_OFFSET(start_trans.frame,start_trans.byte),
- databuf, nsamp);
- splitter_bits_to_float((unsigned short *)TBUF_OFFSET(end_trans.frame,0),databuf+nsamp*2,
- end_trans.byte*(CHAR_BIT/2));
- } else {
- splitter_bits_to_float((unsigned short *)TBUF_OFFSET(start_trans.frame,start_trans.byte),
- databuf,FFT_LEN);
- }
- polyphase_seg(databuf);
- // Go on to next transform
- start_trans=end_trans;
- }
- // Check if we're at the end of the wu file. If so we print less bytes
- if ((end_trans.frame>=end_of_wu->frame) &&
- (end_trans.byte>=end_of_wu->byte)) {
- write_wufile_blocks(NBYTES % SAMPLES_PER_OBUF);
- } else {
- write_wufile_blocks(SAMPLES_PER_OBUF);
- }
- } while (!((end_trans.frame>=end_of_wu->frame) && (end_trans.byte>=end_of_wu->byte)));
-
- // Move the data in the buffer so we don't have to reread portions of the
- // tape.
- //
- {
- unsigned char *record_offset;
- int copysize;
- end_of_wu->frame-=WU_OVERLAP_FRAMES;
- records_in_buffer=TAPE_RECORDS_IN_BUFFER-
- (end_of_wu->frame/TAPE_FRAMES_PER_RECORD);
- record_offset=tapebuffer+
- (end_of_wu->frame/TAPE_FRAMES_PER_RECORD)*TAPE_RECORD_SIZE;
- copysize=records_in_buffer*TAPE_RECORD_SIZE;
- bcopy(record_offset,tapebuffer,copysize);
- }
-}
-
-
diff --git a/splitter_pfb/polyphase.h b/splitter_pfb/polyphase.h
deleted file mode 100644
index 0393c38..0000000
--- a/splitter_pfb/polyphase.h
+++ /dev/null
@@ -1,26 +0,0 @@
-#define NONE 0
-#define WELCH 1
-#define HANNING 2
-
-#define N_WINDOWS 8
-#define P_FFT_LEN 256
-
-/* buffer for fft input/output */
-extern float databuf[FFT_LEN*2];
-
-/* buffer for ftt output before data writes, needs to be multiple
- * of three bytes long for encode to work.
- */
-#define SAMPLES_PER_OBUF (FFT_LEN*2*3/CHAR_BIT)
-#define TBUF_OFFSET(frame,byte) (tapebuffer+(frame)*TAPE_FRAME_SIZE+(byte))
-extern unsigned char output_buf[NSTRIPS][SAMPLES_PER_OBUF];
-
-extern double *filter_r, *filter_i;
-extern float *f_data;
-
-extern int obuf_pos; /* Tracks current postition in the output buffers */
-
-void make_FIR (int n_points, int M, int window, double *output);
-void polyphase_seg(float *data);
-void do_polyphase(buffer_pos_t *start_of_wu, buffer_pos_t *end_of_wu);
-
diff --git a/splitter_pfb/randomdata.cpp b/splitter_pfb/randomdata.cpp
deleted file mode 100644
index 094315d..0000000
--- a/splitter_pfb/randomdata.cpp
+++ /dev/null
@@ -1,77 +0,0 @@
-#include "sah_config.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <time.h>
-#include <math.h>
-#include <string.h>
-#include <unistd.h>
-
-#define NUM_FRAMES 200L
-#define FRAME_DATA_SIZE (1024L*1024)
-#define HEADER_SIZE 1024
-#define FILESIZE (NUM_FRAMES*(FRAME_DATA_SIZE+HEADER_SIZE))
-
-char header[HEADER_SIZE];
-
-int main(void) {
- int i;
- int datapos=0;
- int frameseq=0;
- long written=0;
- int on=0;
- struct tm *tm;
- unsigned char data;
-
- char tmpstr[256];
- char telstr[256];
- double time0=(double)time(0);
- time_t clock;
-
- srandom(time(0));
-
- for (written=0;written<NUM_FRAMES;written++) {
- int headerpos=0;
- memset(header,0,HEADER_SIZE);
- strcpy(header,"NAME=randdata");
- headerpos+=strlen("NAME=randdata")+1;
- strcpy(header+headerpos,"RCDTYPE=1");
- headerpos+=strlen("RCDTYPE=1")+1;
- sprintf(tmpstr,"FRAMESEQ=%d",frameseq);
- strcpy(header+headerpos,tmpstr);
- headerpos+=strlen(tmpstr)+1;
- sprintf(tmpstr,"DATASEQ=%d",frameseq++);
- strcpy(header+headerpos,tmpstr);
- headerpos+=strlen(tmpstr)+1;
- clock=floor(time0);
- tm=localtime(&clock);
- sprintf(tmpstr,"AST=%.2d%.3d%.2d%.2d%.2d%.2d",tm->tm_year,tm->tm_yday,tm->tm_hour,tm->tm_min,tm->tm_sec,(int)((time0-floor(time0))*100));
- strcpy(header+headerpos,tmpstr);
- headerpos+=strlen(tmpstr)+1;
- if (!((frameseq-1)%5)) {
- sprintf(telstr,"TELSTR=%.2d%.3d%.2d%.2d%.2d 0.0 0.0 15.0",tm->tm_year,tm->tm_yday,tm->tm_hour,tm->tm_min,tm->tm_sec);
- }
- strcpy(header+headerpos,telstr);
- headerpos+=strlen(telstr)+1;
- strcpy(header+headerpos,"RECEIVER=ao1420");
- headerpos+=strlen("RECEIVER=ao1420")+1;
- strcpy(header+headerpos,"SAMPLERATE=2.5000");
- headerpos+=strlen("SAMPLERATE=2.5000")+1;
- strcpy(header+headerpos,"CENTERFREQ=1420.0");
- headerpos+=strlen("CENTERFREQ=1420.0")+1;
- strcpy(header+headerpos,"VER=1.00");
- headerpos+=strlen("VER=1.00")+1;
- strcpy(header+headerpos,"NUMRINGBUFS=4");
- headerpos+=strlen("NUMRINGBUFS=4")+1;
- strcpy(header+headerpos,"NUMDISKBUFS=2");
- headerpos+=strlen("NUMDISKBUFS=2")+1;
- strcpy(header+headerpos,"EOH=");
- write(stdout->_file, header, HEADER_SIZE);
- for(i=0;i<FRAME_DATA_SIZE;i++) {
- if (!((datapos++)%(100/8))) on=!on;
- data=random()&0xff;
- write(stdout->_file, &data, 1);
- }
- time0+=(1024.0*1024.0*4.0/2.5e6);
- }
-}
-
diff --git a/splitter_pfb/readheader.cpp b/splitter_pfb/readheader.cpp
deleted file mode 100644
index 6a82fc2..0000000
--- a/splitter_pfb/readheader.cpp
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- * Functions for reading tape and work unit headers
- *
- * This file currently assumes that the reciever is at Arecibo.
- *
- * $Id: readheader.cpp,v 1.3.4.2 2006/12/14 22:24:47 korpela Exp $
- *
- */
-
-#include "sah_config.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <time.h>
-#include <ctype.h>
-#include <string.h>
-
-#include "splitter.h"
-#include "splitparms.h"
-#include "splittypes.h"
-#include "message.h"
-#include "timecvt.h"
-#include "coordcvt.h"
-
-/* Read a tape header at buffer into a tapeheader_t */
-int read_tape_header(char *buffer, tapeheader_t *header)
-{
- static char *receivers[]={"","synthetic","ao1420"};
- int done=0,len;
- int pos=0,i;
- char tmpstr[256];
- double dummy;
- unsigned int firstdata;
-
- do {
- len=strlen(buffer+pos)+1;
- if (!strncmp(buffer+pos,"EOH=",4)) {
- done=1;
- } else if (!strncmp(buffer+pos,"NAME=",5)) {
- strncpy(tmpstr,buffer+pos+5,36);
- i=0;
- while(!isalnum(tmpstr[i])) i++;
- strncpy(header->name,tmpstr+i,36);
- } else if (!strncmp(buffer+pos,"RCDTYPE=",8)) {
- sscanf(buffer+pos+8,"%d",&(header->rcdtype));
- } else if (!strncmp(buffer+pos,"FRAMESEQ=",9)) {
- sscanf(buffer+pos+9,"%lu",&(header->frameseq));
- } else if (!strncmp(buffer+pos,"DATASEQ=",8)) {
- sscanf(buffer+pos+8,"%lu",&(header->dataseq));
- } else if (!strncmp(buffer+pos,"NUMRINGBUFS=",12)) {
- sscanf(buffer+pos+12,"%d",&(header->numringbufs));
- } else if (!strncmp(buffer+pos,"NUMDISKBUFS=",12)) {
- sscanf(buffer+pos+12,"%d",&(header->numdiskbufs));
- } else if (!strncmp(buffer+pos,"MISSED=",7)) {
- sscanf(buffer+pos+7,"%d",&(header->missed));
- } else if (!strncmp(buffer+pos,"AST=",4)) {
- sscanf(buffer+pos+4,"%2d%3d%2d%2d%2d%2d",
- &(header->st.y), &(header->st.d), &(header->st.h),
- &(header->st.m), &(header->st.s), &(header->st.c));
- header->st.tz=AST;
- } else if (!strncmp(buffer+pos,"TELSTR=",7)) {
- sscanf(buffer+pos+7,"%2d%3d%2d%2d%2d %lf %lf %lf",
- &(header->telstr.st.y), &(header->telstr.st.d),
- &(header->telstr.st.h), &(header->telstr.st.m),
- &(header->telstr.st.s), &(header->telstr.az),
- gregorian?&(header->telstr.alt):&dummy,
- gregorian?&dummy:&(header->telstr.alt));
- header->telstr.alt=90.0-header->telstr.alt;
- header->telstr.st.tz=AST;
- header->telstr.st.c=0;
- } else if (!strncmp(buffer+pos,"RECEIVER=",9)) {
- i=1;
- while ((!strstr(buffer+pos+9,receivers[i])) && (++i<NUM_SRCS)) ;
- if (i==NUM_SRCS) {
- log_messages.printf(SCHED_MSG_LOG::MSG_NORMAL,"Unknown receiver: %s\n",buffer+pos+9);
- header->source=0;
- } else {
- header->source=i;
- }
- } else if (!strncmp(buffer+pos,"CENTERFREQ=",11)) {
- sscanf(buffer+pos+11,"%lf",&(header->centerfreq));
- header->centerfreq*=1e6;
- } else if (!strncmp(buffer+pos,"SAMPLERATE=",11)) {
- sscanf(buffer+pos+11,"%lf",&(header->samplerate));
- header->samplerate*=1e6;
- } else if (!strncmp(buffer+pos,"VER=",4)) {
- strncpy(&(header->version[0]),&(buffer[pos+4]),16);
- } else if (len>1) {
- log_messages.printf(SCHED_MSG_LOG::MSG_NORMAL,"Unknown header field: %40s\n",buffer+pos);
- }
- pos+=len;
- } while (!done && (pos<TAPE_HEADER_SIZE));
-/* Right now were only doing this for one observatory. (Arecibo)
- * May want to change list later to a switch statement on the reciever
- */
-
- st_time_convert(&(header->st));
- header->st.jd-=(float)RECORDER_BUFFER_SAMPLES/header->samplerate/86400;
- st_time_convert(&(header->telstr.st));
- telstr_coord_convert(&(header->telstr),ARECIBO_LAT,ARECIBO_LON);
-
-/*
- * Fix a bug in recorder versions prior to 1.30
- */
-
- if (atof(&(header->version[0]))<1.299) {
- header->centerfreq-=2.0;
- }
-
-/*
- * Check for blank tape
- */
- firstdata=*(unsigned int *)(buffer+TAPE_HEADER_SIZE);
- if (!(firstdata & 0x55555555) || !(firstdata & 0xaaaaaaaa) ||
- ((firstdata & 0x55555555) == 0x55555555) ||
- ((firstdata & 0xaaaaaaaa) == 0xaaaaaaaa)) {
- header->missed++;
- log_messages.printf(SCHED_MSG_LOG::MSG_NORMAL,"Possible data problem...data[0] = 0x%x\n",firstdata);
- }
-
- return(1);
-}
-
-/* Read a work unit header from a FILE into a wuheader_t */
-//int read_wu_header(FILE *file, wuheader_t *header) {
-/* to be implemented. Don't need it yet. */
-// return(0);
-//}
-
-int parse_tape_headers(unsigned char *tapebuffer, tapeheader_t *tapeheaders) {
- int i;
-
- for (i=0;i<TAPE_FRAMES_IN_BUFFER;i++) {
- read_tape_header((char *)tapebuffer+i*TAPE_FRAME_SIZE, &(tapeheaders[i]));
- }
- return(1);
-}
-
-/*
- * $Log: readheader.cpp,v $
- * Revision 1.3.4.2 2006/12/14 22:24:47 korpela
- * *** empty log message ***
- *
- * Revision 1.3.4.1 2006/01/13 00:37:57 korpela
- * Moved splitter to using standard BOINC logging mechanisms. All stderr now
- * goes to "error.log"
- *
- * Added command line parameters "-iterations=" (number of workunit groups to
- * create before exiting), "-trigger_file_path=" (path to the splitter_stop trigger
- * file. Default is /disks/setifiler1/wutape/tapedir/splitter_stop).
- *
- * Reduced deadlines by a factor of three. We now need a 30 MFLOP machine to meet
- * the deadline.
- *
- * Revision 1.3 2003/09/11 18:53:38 korpela
- * *** empty log message ***
- *
- * Revision 1.2 2003/08/05 17:23:40 korpela
- * More work on database stuff.
- * Further tweaks.
- *
- * Revision 1.1 2003/07/29 20:35:48 korpela
- *
- * renames .C files to .cpp
- *
- * Revision 1.3 2003/06/05 15:52:47 korpela
- *
- * Fixed coordinate bug that was using the wrong zenith angle from the telescope
- * strings when handling units from the gregorian.
- *
- * Revision 1.2 2003/06/03 01:01:17 korpela
- *
- * First working splitter under CVS.
- *
- * Revision 1.1 2003/06/03 00:16:16 korpela
- *
- * Initial splitter under CVS control.
- *
- * Revision 3.0 2001/08/01 19:04:57 korpela
- * Check this in before Paul screws it up.
- *
- * Revision 2.9 1999/06/07 21:00:52 korpela
- * *** empty log message ***
- *
- * Revision 2.8 1999/03/05 01:47:18 korpela
- * Added data_class field.
- *
- * Revision 2.7 1999/02/22 21:49:42 korpela
- * Fixed bug in bug fix.
- *
- * Revision 2.6 1999/02/22 21:48:41 korpela
- * Fixed frequency bug in recorders prior to v1.3
- *
- * Revision 2.5 1998/11/13 23:58:52 korpela
- * Modified for move of name field between structures.
- *
- * Revision 2.4 1998/11/02 21:34:19 korpela
- * Fixed azimuth error.
- *
- * Revision 2.3 1998/11/02 21:20:58 korpela
- * Modified for (internal) integer receiver ID.
- *
- * Revision 2.2 1998/11/02 18:39:38 korpela
- * Changed location of timecvt.h
- *
- * Revision 2.1 1998/11/02 16:41:21 korpela
- * Minor Change.
- *
- * Revision 2.0 1998/10/30 22:00:04 korpela
- * Conversion to C++ and merger with client source tree.
- *
- * Revision 1.4 1998/10/30 20:26:03 korpela
- * Bug Fixes. Now mostly working.
- *
- * Revision 1.3 1998/10/27 00:57:14 korpela
- * Bug fixes.
- *
- * Revision 1.2 1998/10/15 19:16:38 korpela
- * Corrected syntax errors.
- *
- * Revision 1.1 1998/10/15 19:05:33 korpela
- * Initial revision
- *
- *
- */
diff --git a/splitter_pfb/readheader.h b/splitter_pfb/readheader.h
deleted file mode 100644
index 67c14da..0000000
--- a/splitter_pfb/readheader.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Functions for reading tape and work unit headers
- *
- * $Id: readheader.h,v 1.2 2003/08/05 17:23:41 korpela Exp $
- *
- */
-
-/* Read a tape header at buffer into a tapeheader_t */
-int read_tape_header(char *buffer, tapeheader_t *header);
-
-/* Read a work unit header from a FILE into a wuheader_t */
-//int read_wu_header(FILE *file, workunit *header);
-// no longer needed
-
-/* Parse tape headers from binary tape header into a tapeheader_t */
-int parse_tape_headers(unsigned char *tapebuffer, tapeheader_t *tapeheaders);
-/*
- * $Log: readheader.h,v $
- * Revision 1.2 2003/08/05 17:23:41 korpela
- * More work on database stuff.
- * Further tweaks.
- *
- * Revision 1.1 2003/06/03 00:16:16 korpela
- *
- * Initial splitter under CVS control.
- *
- * Revision 3.0 2001/08/01 19:04:57 korpela
- * Check this in before Paul screws it up.
- *
- * Revision 2.1 1998/11/02 16:41:21 korpela
- * Minor Change.
- *
- * Revision 2.0 1998/10/30 22:00:04 korpela
- * Conversion to C++ and merger with client source tree.
- *
- * Revision 1.2 1998/10/27 01:09:22 korpela
- * Added parse_tape_headers()
- *
- * Revision 1.1 1998/10/15 17:19:21 korpela
- * Initial revision
- *
- */
diff --git a/splitter_pfb/readtape.cpp b/splitter_pfb/readtape.cpp
deleted file mode 100644
index 9c4030a..0000000
--- a/splitter_pfb/readtape.cpp
+++ /dev/null
@@ -1,333 +0,0 @@
-/* readtape.c
- *
- * Functions for reading tapes.
- *
- * $Id: readtape.cpp,v 1.3.4.4 2007/06/07 20:01:52 mattl Exp $
- *
- */
-
-#include "sah_config.h"
-#undef USE_MYSQL
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <sys/ioctl.h>
-#include <sys/mtio.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#include <iostream>
-
-#include "util.h"
-#include "splitparms.h"
-#include "splitter.h"
-#include "message.h"
-#include "readheader.h"
-#include "readtape.h"
-#include "sqlrow.h"
-#include "sqlblob.h"
-#include "sqlapi.h"
-#include "db_table.h"
-#include "schema_master.h"
-#include "str_util.h"
-#include "str_replace.h"
-
-int is_tape;
-
-static tape tape_info;
-
-int current_record;
-static int tape_fd;
-struct mtget tape_status;
-
-static void update_checkpoint() {
- FILE *file=fopen("rcd.chk","w");
- if (file) {
- fprintf(file,"%d\n",current_record);
- fclose(file);
- }
-}
-
-int read_checkpoint() {
- FILE *file=fopen("rcd.chk","r");
- int retval=0;
- if (file) {
- fscanf(file,"%d",&retval);
- fclose(file);
- }
- return(retval);
-}
-
-int tape_busy() {
-/* Check if tape is busy. If so return 1 else return 0
- */
- if (is_tape) {
- if (ioctl(tape_fd,MTIOCGET,&tape_status) != -1) {
- return (tape_status.mt_dsreg);
- } else {
- log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,"Unable to get tape status\n");
- return (1);
- }
- } else {
- return (0);
- }
-}
-
-int tape_eject() {
-/* Rewind and eject the tape. Return 1 if sucessful else return 0
- */
- struct mtop op={MTOFFL,1};
-
- close(tape_fd);
- if (is_tape) {
- while (tape_busy()) sleep(1);
- if (ioctl(tape_fd,MTIOCTOP,&op)==-1) {
- log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,"Unable to eject tape\n");
- return(0);
- } else {
- return(1);
- }
- } else {
- return(1);
- }
-}
-
-
-int tape_rewind() {
-/* Rewind to beginning of tape. Return 1 if sucessful, 0 if failure
- */
- struct mtop op={MTREW, 1};
- if (is_tape) {
- while (tape_busy()) sleep(1);
- if (ioctl(tape_fd,MTIOCTOP,&op)!=-1) {
- current_record=0;
- update_checkpoint();
- } else {
- current_record=-1;
- log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,"Tape rewind failed\n");
- }
- } else {
- if (lseek(tape_fd, 0, SEEK_SET)!=-1) {
- current_record=0;
- update_checkpoint();
- } else {
- current_record=-1;
- log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,"File rewind failed\n");
- }
- }
- return (!current_record);
-}
-
-
-
-int open_tape_device(char *device) {
-/* opens a device, checks if it is a tape device. If so, sets is_tape
- * flag. If not, it resets the flag. All tape routines check this flag
- * so routines will work for both tapes and files
- */
-
-
- int fd, errcnt=0;
- struct mtop op={MTNOP,1};
-
- if ((fd=open(device, O_RDONLY|0x2000, 0777))!=-1) {
- tape_fd=fd;
- if (ioctl(tape_fd,MTIOCGET,&tape_status) != -1) {
- is_tape = 1;
- } else {
- is_tape = 0;
- }
- while (!norewind && !tape_rewind() && errcnt<10 ) errcnt++;
- if (!nodb && resumetape) {
- tape_rewind();
- fill_tape_buffer(tapebuffer,TAPE_RECORDS_IN_BUFFER);
- parse_tape_headers(tapebuffer, &(tapeheaders[0]));
- if (!tape_info.id) {
- if (!tape_info.fetch(std::string("where name=\'")+tapeheaders->name+"\'")) {
- tape_info.start_time=tapeheaders->st.jd;
- tape_info.last_block_time=tapeheaders->st.jd;
- tape_info.last_block_done=tapeheaders->frameseq;
- strlcpy(tape_info.name,tapeheaders->name,sizeof(tape_info.name));
- tape_info.insert();
- }
- }
- startblock=tape_info.last_block_done/TAPE_FRAMES_PER_RECORD;
- }
- if (norewind) {
- startblock=MAX(read_checkpoint()-TAPE_RECORDS_IN_BUFFER,0);
- tape_rewind();
- }
- if (startblock) {
- return select_record(startblock);
- }
- return (1);
- } else {
- perror( NULL );
- return (0);
- }
-}
-
-int select_record(int record_number) {
-/* seeks to a specific record number returns 1 if successful */
- int diff;
- struct mtop op;
- char tmpstr[100];
- off64_t off,offset;
-
- if ((current_record<0) && !tape_rewind()) {
- log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,"Tape error: position lost and unable to rewind!\n");
- return(0);
- }
-
- diff=record_number-current_record;
-
- if (is_tape) {
- if (diff==0) return (1);
- if (diff>0) {
- op.mt_op=MTFSR;
- op.mt_count=diff;
- } else {
- op.mt_op=MTBSR;
- op.mt_count=diff;
- }
- if (ioctl(tape_fd,MTIOCTOP,&op)==-1) {
- log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,"Tape error: unable to position to record %d errno=%d\n",
- record_number,errno);
- current_record=-1;
- return(0);
- } else {
- current_record+=diff;
- update_checkpoint();
- return(1);
- }
- } else {
- current_record=record_number;
- update_checkpoint();
- offset = record_number;
- offset *= TAPE_RECORD_SIZE;
- //fprintf( stderr, "offset: %lld", offset );
- off=lseek64(tape_fd,offset,SEEK_SET) ;
- //fprintf( stderr, "off: %lld", offset );
- return (off != -1);
- }
-}
-
-int tape_read_record(char *buffer) {
- int bytesread=0;
- int i;
-
- while (tape_busy()) sleep(1);
-
- do {
- i=read(tape_fd,buffer+bytesread,TAPE_RECORD_SIZE);
- if (i>0) bytesread+=i;
- } while ((bytesread<TAPE_RECORD_SIZE) && (i>0));
-
- if (i==0) {
- log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,"End of tape. Please insert new tape\n");
- current_record=-1;
- return(0);
- }
-
- if (i<0) {
- log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,"Tape error.\n");
- current_record=-1;
- return(0);
- }
-
- current_record++;
- update_checkpoint();
- return(1);
-}
-
-int fill_tape_buffer(unsigned char *buffer, int n_records) {
- int i;
- long record;
- char tmpstr[100];
-
- for (i=0;i<n_records;i++) {
- record=current_record;
- //fprintf( stderr, "Reading record %d\n", i);
- if (!tape_read_record((char *)buffer+i*TAPE_RECORD_SIZE)) {
-
- log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,"Tape error at record %d\n", current_record);
- return(0);
- }
- }
- return(1);
-}
-
-/*
- * $Log: readtape.cpp,v $
- * Revision 1.3.4.4 2007/06/07 20:01:52 mattl
- * *** empty log message ***
- *
- * Revision 1.3.4.3 2006/12/14 22:24:47 korpela
- * *** empty log message ***
- *
- * Revision 1.3.4.2 2006/01/13 00:37:57 korpela
- * Moved splitter to using standard BOINC logging mechanisms. All stderr now
- * goes to "error.log"
- *
- * Added command line parameters "-iterations=" (number of workunit groups to
- * create before exiting), "-trigger_file_path=" (path to the splitter_stop trigger
- * file. Default is /disks/setifiler1/wutape/tapedir/splitter_stop).
- *
- * Reduced deadlines by a factor of three. We now need a 30 MFLOP machine to meet
- * the deadline.
- *
- * Revision 1.3.4.1 2006/01/10 00:39:04 jeffc
- * *** empty log message ***
- *
- * Revision 1.3 2003/09/11 18:53:38 korpela
- * *** empty log message ***
- *
- * Revision 1.2 2003/08/05 17:23:41 korpela
- * More work on database stuff.
- * Further tweaks.
- *
- * Revision 1.1 2003/07/29 20:35:49 korpela
- *
- * renames .C files to .cpp
- *
- * Revision 1.1 2003/06/03 00:16:16 korpela
- *
- * Initial splitter under CVS control.
- *
- * Revision 3.3 2003/05/19 17:40:59 eheien
- * *** empty log message ***
- *
- * Revision 3.2 2003/04/23 22:10:29 korpela
- * *** empty log message ***
- *
- * Revision 3.1 2002/06/21 00:06:09 eheien
- * *** empty log message ***
- *
- * Revision 3.0 2001/08/01 19:04:57 korpela
- * Check this in before Paul screws it up.
- *
- * Revision 2.3 1999/02/22 22:21:09 korpela
- * added -nodb option
- *
- * Revision 2.2 1999/02/11 16:46:28 korpela
- * Added some db access functions.
- *
- * Revision 2.1 1998/11/02 16:41:21 korpela
- * Minor Change.
- *
- * Revision 2.0 1998/10/30 22:00:04 korpela
- * Conversion to C++ and merger with client source tree.
- *
- * Revision 1.3 1998/10/27 00:57:47 korpela
- * Bug fixes.
- *
- * Revision 1.2 1998/10/20 21:33:25 korpela
- * Added fill_tape_buffer()
- * Minor bug fixes.
- *
- * Revision 1.1 1998/10/15 17:08:07 korpela
- * Initial revision
- *
- */
-
diff --git a/splitter_pfb/readtape.h b/splitter_pfb/readtape.h
deleted file mode 100644
index 76987f8..0000000
--- a/splitter_pfb/readtape.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/* readtape.h
- *
- * Functions for reading tapes.
- *
- * $Id: readtape.h,v 1.3.2.1 2006/12/14 22:24:47 korpela Exp $
- *
- */
-
-#ifndef READTAPE_H
-#define READTAPE_H
-
-#include "sah_config.h"
-
-/* Status flag to indicate whether open "tape" device is a tape drive */
-extern int is_tape;
-
-/* Check if tape is busy. If so return 1 else return 0 */
-int tape_busy();
-
-/* Rewind and eject the tape. Return 1 if sucessful else return 0 */
-int tape_eject();
-
-/* Rewind to beginning of tape. Return 1 if sucessful, 0 if failure */
-int tape_rewind();
-
-/* Open a device, check if it is a tape device. If so, set is_tape
- * flag. If not, it resets the flag. All tape routines check this flag
- * so routines will work for both tapes and files
- */
-int open_tape_device(char *device);
-
-/* Seek to a specific record number returns 1 if successful */
-int select_record(int record_number);
-
-/* Read a record of length TAPE_RECORD_SIZE into a buffer
- * Returns 1 if successful
- */
-int tape_read_record(char *buffer);
-
-/* Fill a buffer of length n_records*TAPE_RECORD_SIZE
- * with data from tape. Return 1 if sucessful.
- */
-int fill_tape_buffer(unsigned char *buffer, int n_records);
-
-extern int current_record;
-
-#endif
-/*
- * $Log: readtape.h,v $
- * Revision 1.3.2.1 2006/12/14 22:24:47 korpela
- * *** empty log message ***
- *
- * Revision 1.3 2003/09/26 20:48:51 jeffc
- * jeffc - merge in branch setiathome-4_all_platforms_beta.
- *
- * Revision 1.2.2.1 2003/09/23 16:01:45 korpela
- * *** empty log message ***
- *
- * Revision 1.2 2003/08/05 17:23:41 korpela
- * More work on database stuff.
- * Further tweaks.
- *
- * Revision 1.1 2003/06/03 00:23:39 korpela
- *
- * Again
- *
- * Revision 3.0 2001/08/01 19:04:57 korpela
- * Check this in before Paul screws it up.
- *
- * Revision 2.2 1999/02/11 16:46:28 korpela
- * Added db access functions.
- *
- * Revision 2.1 1998/11/02 16:41:21 korpela
- * Minor Change.
- *
- * Revision 2.0 1998/10/30 22:00:04 korpela
- * Conversion to C++ and merger with client source tree.
- *
- * Revision 1.2 1998/10/20 21:35:51 korpela
- * Added fill_tape_buffer()
- *
- * Revision 1.1 1998/10/15 16:49:59 korpela
- * Initial revision
- *
- */
diff --git a/splitter_pfb/splitter.cpp b/splitter_pfb/splitter.cpp
deleted file mode 100644
index c4cea44..0000000
--- a/splitter_pfb/splitter.cpp
+++ /dev/null
@@ -1,717 +0,0 @@
-/*
- *
- * The splitter main program.
- *
- * $Id: splitter.cpp,v 1.22.2.6 2007/06/06 15:58:30 korpela Exp $
- *
- */
-
-#include "sah_config.h"
-#undef USE_MYSQL
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <strings.h>
-#include <sys/types.h>
-#include <sys/statvfs.h>
-#include <sys/wait.h>
-
-#include "boinc_db.h"
-#include "crypt.h"
-#include "backend_lib.h"
-#include "sched_config.h"
-#include "splitparms.h"
-#include "splittypes.h"
-#include "splitter.h"
-#include "validrun.h"
-#include "makebufs.h"
-#include "readtape.h"
-#include "readheader.h"
-#include "wufiles.h"
-#include "dotransform.h"
-#include "polyphase.h"
-#include "message.h"
-#include "sqlrow.h"
-#include "sqlapi.h"
-#include "db/db_table.h"
-#include "db/schema_master.h"
-#include "db/app_config.h"
-
-extern "C" {
- int sqldetach();
-}
-
-char trigger_file_path[1024]="/disks/setifiler1/wutape/tapedir/splitter_stop";
-
-SCHED_CONFIG boinc_config;
-DB_APP app;
-R_RSA_PRIVATE_KEY key;
-
-
-// TEMPLATE DEFS ------------------------------------------------------
-// IMPORTANT: a change to a template should *always* include a change
-// to the template filename. Only the result template is used now.
-const char *wu_template_filename_id = "wu_0.xml";
-const char *wu_template=
- "<file_info>\n"
- " <number>0</number>\n"
- "</file_info>\n"
- "<workunit>\n"
- " <file_ref>\n"
- " <file_number>0</file_number>\n"
- " <open_name>work_unit.sah</open_name>\n"
- " </file_ref>\n"
- "</workunit>\n";
-
-const char *result_template_filename_id = "result_0.xml";
-const char *result_template=
- "<file_info>\n"
- " <name><OUTFILE_0/></name>\n"
- " <generated_locally/>\n"
- " <upload_when_present/>\n"
- " <max_nbytes>65536</max_nbytes>\n"
- " <url>http://setiboincdata.ssl.berkeley.edu/sah_cgi/file_upload_handler</url>\n"
- "</file_info>\n"
- "<result>\n"
- " <file_ref>\n"
- " <file_name><OUTFILE_0/></file_name>\n"
- " <open_name>result.sah</open_name>\n"
- " </file_ref>\n"
- "</result>\n";
-// END TEMPLATE DEFS --------------------------------------------------
-
-unsigned char *tapebuffer; /* A buffer for a tape section */
-workunit wuheaders[NSTRIPS];
-tapeheader_t tapeheaders[TAPE_FRAMES_IN_BUFFER];
-int max_wus_ondisk=MAX_WUS_ONDISK;
-int nodb;
-int noencode;
-int resumetape;
-int norewind;
-int startblock;
-int dataclass;
-int atnight;
-int gregorian;
-int output_xml;
-int polyphase;
-int iters=-1;
-int filter_window = 0;
-double start_time;
-double stop_time;
-unsigned long minvfsbuf=-1;
-char wd[1024];
-//char * scidb = NULL;
-char * projectdir = NULL;
-
-APP_CONFIG sah_config;
-
-//const char *result_template_filename="projectdir"/"SAH_APP_NAME"_result.tpl";
-char result_template_filename[1024];
-char result_template_filepath[1024];
-char wu_template_filename[1024];
-
-int check_for_halt();
-int wait_until_night();
-int check_free_disk_space();
-int wait_for_db_wus_ondisk();
-
-void cprint(char *p) {
- printf("%s\n",p);
-}
-
-/* wulog: File for logging names of completed wu files */
-/* errorlog: File for logging errors */
-
-FILE *wulog,*errorlog;
-buffer_pos_t start_of_wu,end_of_wu; /* position of start and end of wu in
- tape buffer */
-int seqno;
-int records_in_buffer;
-
-void cleanup(void) {
- FILE *tmpfile;
- if ((tmpfile=fopen("seqno.dat","w"))) {
- fprintf(tmpfile,"%d\n",seqno);
- fclose(tmpfile);
- } else {
- log_messages.printf(SCHED_MSG_LOG::MSG_NORMAL,"Unable to open seqno.dat for write\n");
- }
-}
-
-
-int process_command_line(int argc, char *argv[],char **tape_device,
- int *norewind, int *startblock, int *resumetape,
- int *nodb, int *dataclass, int *atnight,
- int *max_wus_ondisk, char **projectdir,
- int *iters) {
- int nargs=0,i;
- char *ep;
- for (i=1;i<argc;i++) {
- if (argv[i][0]=='-') {
- if (!strncmp(argv[i],"-hanning",MAX(strlen(argv[i]),3))) {
- filter_window=2;
- } else
- if (!strncmp(argv[i],"-welch",MAX(strlen(argv[i]),3))) {
- filter_window=1;
- } else
- if (!strncmp(argv[i],"-xml",MAX(strlen(argv[i]),3))) {
- output_xml=1;
- } else
- if (!strncmp(argv[i],"-atnight",MAX(strlen(argv[i]),7))) {
- *atnight=1;
- } else
- if (!strncmp(argv[i],"-nodb",MAX(strlen(argv[i]),4))) {
- if (*resumetape) {
- log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,"-nodb and -resumetape are exclusive\n");
- return(1);
- }
- *nodb=1;
- } else
- if (!strncmp(argv[i],"-gregorian",MAX(strlen(argv[i]),2))) {
- gregorian=1;
- } else
- if (!strncmp(argv[i],"-resumetape",MAX(strlen(argv[i]),2))) {
- if (*startblock || *norewind) {
- log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,"-startblock and -norewind can\'t be used with -resumetape\n");
- return(1);
- }
- if (*nodb) {
- log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,"-nodb and -resumetape are exclusive\n");
- return(1);
- }
- *resumetape=1;
- } else
- if (!strncmp(argv[i],"-norewind",MAX(strlen(argv[i]),4))) {
- if (*startblock || *resumetape) {
- return(1);
- }
- *norewind=1;
- } else
- if ((ep=strchr(argv[i],'='))) {
- if (!strncmp(argv[i],"-trigger_file_path",MAX(ep-argv[i],2))) {
- char *fe=ep+1;
- memset(trigger_file_path,0,sizeof(trigger_file_path));
- while (isgraph(*(fe++))) trigger_file_path[fe-ep-2]=*fe ;
- } else if (!strncmp(argv[i],"-iterations",MAX(ep-argv[i],2))) {
- sscanf(ep+1,"%d",iters);
- } else if (!strncmp(argv[i],"-startblock",MAX(ep-argv[i],2))) {
- if (*norewind || *resumetape) {
- return(1);
- }
- sscanf(ep+1,"%d",startblock);
- } else if (!strncmp(argv[i],"-max_wus_ondisk",MAX(ep-argv[i],2))) {
- sscanf(ep+1,"%d",max_wus_ondisk);
- } else if (!strncmp(argv[i],"-dataclass",MAX(ep-argv[i],2))) {
- sscanf(ep+1,"%d",dataclass);
- } else if (!strncmp(argv[i],"-projectdir",MAX(ep-argv[i],2))) {
- *projectdir=calloc(strlen(ep+1)+5,1)
- strlcpy(*projectdir,ep+1,strlen(ep+1)+5);
- strlcat(*projectdir,"/",strlen(ep+1)+5);
- } else {
- return(1);
- }
- } else {
- return(1);
- }
- } else {
- *tape_device=argv[i];
- nargs++;
- }
- }
- //return(nargs!=1);
-
- // check for required cmd line
- //if (! *scidb) return (1);
- if (! *projectdir) return (1);
- if (! *tape_device) return (1);
-
- return 0;
-}
-
-int main(int argc, char *argv[]) {
- char *tape_device;
- FILE *tmpfile;
- int retval;
- char keyfile[1024];
- char tmpstr[1024];
-
-
- /* Process command line arguments */
- if (process_command_line(argc,argv,&tape_device,&norewind,&startblock,&resumetape,
- &nodb,&dataclass,&atnight,&max_wus_ondisk,&projectdir,&iters)) {
- fprintf(stderr,"Usage: splitter tape_device -projectdir=s [-atnight] [-nodb]\n"
- "[-xml] [-gregorian] [-resumetape | -norewind | -startblock=n] [-dataclass=n]\n"
- "[-max_wus_on_disk=n] [-iterations=n] [-trigger_file_path=filename]\n");
- exit(EXIT_FAILURE);
- }
-
- /* Open log files */
- log_messages.set_debug_level(3);
- log_messages.printf(SCHED_MSG_LOG::MSG_NORMAL,"opening log files\n");
- if (!(wulog=fopen("wu.log","wa")) || !(errorlog=freopen("error.log","wa",stderr))) {
- log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,"Unable to open log files!\n");
- exit(EXIT_FAILURE);
- }
-
- retval = sah_config.parse_file(projectdir);
- if (retval) {
- log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,"Can't parse config file\n");
- exit(EXIT_FAILURE);
- } else {
- log_messages.printf(SCHED_MSG_LOG::MSG_NORMAL,"Using configuration:\n");
- log_messages.printf(SCHED_MSG_LOG::MSG_NORMAL,"scidb_name = %s\n", sah_config.scidb_name);
- log_messages.printf(SCHED_MSG_LOG::MSG_NORMAL,"max_wus_ondisk = %d\n", sah_config.max_wus_ondisk);
- log_messages.printf(SCHED_MSG_LOG::MSG_NORMAL,"min_quorum = %d\n", sah_config.min_quorum);
- log_messages.printf(SCHED_MSG_LOG::MSG_NORMAL,"target_nresults = %d\n", sah_config.target_nresults);
- log_messages.printf(SCHED_MSG_LOG::MSG_NORMAL,"max_error_results = %d\n", sah_config.max_error_results);
- log_messages.printf(SCHED_MSG_LOG::MSG_NORMAL,"max_success_results = %d\n", sah_config.max_success_results);
- log_messages.printf(SCHED_MSG_LOG::MSG_NORMAL,"max_total_results = %d\n", sah_config.max_total_results);
- }
-
- // Will initially open
- if (!db_change(sah_config.scidb_name)) {
- log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,"Could not open science database %s\n", sah_config.scidb_name);
- if (!nodb) exit(EXIT_FAILURE);
- } else {
- log_messages.printf(SCHED_MSG_LOG::MSG_NORMAL,"Using science database %s\n", sah_config.scidb_name);
- }
-
-
- boinc_config.parse_file(projectdir);
- log_messages.printf(SCHED_MSG_LOG::MSG_NORMAL,"Using boinc config dir %s\n", projectdir);
- log_messages.printf(SCHED_MSG_LOG::MSG_NORMAL,"Using boinc database %s\n", boinc_config.db_name);
-
- // check / commit result template
- strcpy(result_template_filename, "templates/"SAH_APP_NAME"_");
- strcat(result_template_filename, result_template_filename_id);
- strcpy(result_template_filepath, projectdir);
- strcat(result_template_filepath, result_template_filename);
- log_messages.printf(SCHED_MSG_LOG::MSG_NORMAL,"%s %s\n", result_template_filename, result_template_filepath);
- if (!(tmpfile=fopen(result_template_filepath,"r"))) {
- if (!(tmpfile=fopen(result_template_filepath,"w"))) {
- log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,"Cannot open result file template : %s\n", result_template_filepath);
- exit(1);
- }
- fprintf(tmpfile,result_template);
- }
- fclose(tmpfile);
-
- if (boinc_db.open(boinc_config.db_name,boinc_config.db_host,boinc_config.db_user,boinc_config.db_passwd)) {
- boinc_db.print_error("boinc_db.open");
- log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,"boinc_db.open\n");
- exit(1);
- }
-
- if (app.lookup("where name ='"SAH_APP_NAME"'")) {
- log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,"Error looking up appname\n");
- boinc_db.print_error("boinc_app lookup");
- log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,"boinc_app lookup\n");
- exit(1);
- } else {
- log_messages.printf(SCHED_MSG_LOG::MSG_NORMAL,"Splitting for application %s (ID = %d)\n", SAH_APP_NAME, app.id);
- }
-
- boinc_db.close();
-
- strcpy(keyfile, projectdir);
- strcat(keyfile, "/keys/upload_private");
- if (read_key_file(keyfile,key)) {
- log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,"Error reading keyfile.\n");
- exit(1);
- }
-
- // if (!getenv("S4_RECEIVER_CONFIG")) putenv(s4cnf_env);
- check_for_halt();
-
- /* Process command line arguments */
- //if (process_command_line(argc,argv,&tape_device,&norewind,&startblock,&resumetape,
- // &nodb,&dataclass,&atnight,&max_wus_ondisk,&scidb,&projectdir)) {
- // fprintf(stderr,"Usage: splitter tape_device [-atnight] [-nodb] [-xml] [-gregorian] [-resumetape | -norewind | -startblock=n] [-dataclass=n]\n");
- // exit(EXIT_FAILURE);
- //}
-
-
- /* Connect to database */
- //if (!sql_database(SCIENCE_DB)) {
- // fprintf(stderr,"Unable to connect to database.\n");
- // if (!nodb) exit(EXIT_FAILURE);
- //}
-
-
-
-
-
- /*
- * Allocate temp files for tape buffer.
- */
- makebuffers(&tapebuffer);
-
- if (!open_tape_device(tape_device)) {
- log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,"Unable to open tape device\n");
- exit(EXIT_FAILURE);
- }
-
- /*
- * Get sequence number
- */
-
- if ((tmpfile=fopen("seqno.dat","r"))) {
- fscanf(tmpfile,"%d",&seqno);
- fclose(tmpfile);
- } else {
- seqno=0;
- }
- /* Start of main loop */
-
- records_in_buffer=0;
- start_of_wu.frame=0;
- start_of_wu.byte=0;
- end_of_wu.frame=0;
- end_of_wu.byte=0;
-
- atexit(cleanup);
-
- getcwd(wd,1024);
-
- if (polyphase) {
- int filter_len;
-
- filter_len = P_FFT_LEN*N_WINDOWS;
-
- filter_r = (double *)malloc(sizeof(double)*filter_len);
- filter_i = (double *)malloc(sizeof(double)*filter_len);
-
- f_data = (float *)malloc(sizeof(float)*P_FFT_LEN*2);
-
- make_FIR(filter_len, N_WINDOWS, filter_window, filter_r);
- make_FIR(filter_len, N_WINDOWS, filter_window, filter_i);
-
- /*
- int i;
- float *data;
- data = (float*)malloc(sizeof(float)*2*2048);
- for (double n=-20;n<20;n+=.05) {
- for (i=0;i<2*2048;i+=2) {
- data[i] = cos(2*(24+n)*3.1415926535*i/(2*2048));
- data[i+1] = sin(2*(24+n)*3.1415926535*i/(2*2048));
- }
- polyphase_seg(data);
- //fprintf( stderr, "%f\n", 3+n/8);
- }
- exit(0);
- for(i=0;i<filter_len;i++)
- printf( "%f\n", filter_r[i] );
- exit(0);*/
- }
-
- log_messages.printf(SCHED_MSG_LOG::MSG_DEBUG,"Entering loop\n" );
- while (iters-- &&
- fill_tape_buffer(tapebuffer+records_in_buffer*TAPE_RECORD_SIZE,
- TAPE_RECORDS_IN_BUFFER-records_in_buffer)) {
- /* check if we should be running now */
- fflush(stderr);
- if (atnight) wait_until_night();
-
- check_for_halt();
-
- // Make sure we have enough free disk space
- check_free_disk_space();
-
- // Wait for ondisk wus in the database to drop below the threshold
- if (!nodb) wait_for_db_wus_ondisk();
- //fprintf( stderr, "Read data\n" );
- log_messages.printf(SCHED_MSG_LOG::MSG_NORMAL,"less than max wus on disk, continuing\n" );
- fflush(stderr);
-
- //printf( "Read tape data, analyzing\n" );
- parse_tape_headers(tapebuffer, &(tapeheaders[0]));
- check_for_halt();
- if (valid_run(tapeheaders,&start_of_wu,&end_of_wu)) {
- if (make_wu_headers(tapeheaders,wuheaders,&start_of_wu)) {
- int child_pid=-1;
- switch (polyphase) {
- case 1:
- do_polyphase(&start_of_wu,&end_of_wu);
- break;
- default:
- log_messages.printf(SCHED_MSG_LOG::MSG_DEBUG,"doing transform..." );
- do_transform(&start_of_wu,&end_of_wu);
- log_messages.printf(SCHED_MSG_LOG::MSG_DEBUG," done\n" );
- }
- wait(0);
- if (!nodb) sql_finish();
-/*
- do {
- sleep(1);
- child_pid=fork();
- if (child_pid<0) log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,"splitter cannot fork");
- //fprintf( stderr, "child pid: %d\n", child_pid);
- } while (child_pid<0);
-*/
- child_pid=0;
- if (!child_pid) {
- if (!nodb) {
- sqldetach();
- while (!sql_database(sah_config.scidb_name)) {
- //fprintf(stderr,"child sleeping\n");
- sleep(10);
- }
- }
- rename_wu_files();
- if (!nodb) sql_finish();
-// _exit(0);
- }
- if (!nodb) {
- while (!sql_database(sah_config.scidb_name)) {
- //fprintf(stderr,"parent sleeping\n");
- sleep(10);
- }
- }
- }
- }
- }
-return(0);
-
-}
-
-int check_for_halt() {
- FILE *tf;
-
- tf = fopen(trigger_file_path, "r");
- // tf=0;
- if (tf != NULL) { // Stop program
- log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,"Found splitter_stop, exiting.\n" );
- exit(1);
- }
- return(0); // Keep going
-}
-
-int wait_until_night() {
- time_t t;
- struct tm *lt;
- do {
- t=time(0);
- lt=localtime(&t);
- // Don't run M-F 8AM-6PM
- if ((lt->tm_wday>0) && (lt->tm_wday<6) && (lt->tm_hour>8) && (lt->tm_hour<18)) {
- sleep(100);
- }
- } while ((lt->tm_wday>0) && (lt->tm_wday<6) && (lt->tm_hour>8) && (lt->tm_hour<18));
- return 0;
-}
-
-int check_free_disk_space() {
- struct statvfs vfsbuf;
-
- /* check disk free space */
- statvfs("wu_inbox/.",&vfsbuf);
- if (vfsbuf.f_bavail < (100000*1024/vfsbuf.f_frsize)) {
- log_messages.printf(SCHED_MSG_LOG::MSG_NORMAL,"Not enough free disk space in working directory to continue\n");
- log_messages.printf(SCHED_MSG_LOG::MSG_NORMAL,"Not enough free disk space in working directory to continue\n");
- exit(EXIT_FAILURE);
- }
- return 0;
-}
-
-int wait_for_db_wus_ondisk() {
- int wus_ondisk,rv;
-
- // The boinc db query below takes a long time. Until we fix this,
- // we will do it only every 100 times into this routine. All other
- // calls here will assume that we need to add WUs. -- jeffc
- static int check_count = 100;
- if (check_count < 100) {
- check_count++;
- return 0;
- } else {
- check_count = 0;
- }
-
- if (boinc_db.open(boinc_config.db_name,boinc_config.db_host,boinc_config.db_user,boinc_config.db_passwd)) {
- boinc_db.print_error("boinc_db.open");
- log_messages.printf(SCHED_MSG_LOG::MSG_NORMAL,"boinc_db.open\n");
- exit(1);
- }
- do {
- DB_RESULT boinc_result;
- char query[1024];
- sprintf(query,"where appid=%d and server_state=2",app.id);
- rv=boinc_result.count(wus_ondisk,query);
- if (rv) {
- boinc_db.print_error("boinc_result.count");
- log_messages.printf(SCHED_MSG_LOG::MSG_NORMAL,"DB Error, unable to count workunits on disk\n");
- exit(EXIT_FAILURE);
- }
- check_for_halt();
- log_messages.printf(SCHED_MSG_LOG::MSG_NORMAL,"%d WUs ondisk\n", wus_ondisk);
- if (wus_ondisk>sah_config.max_wus_ondisk) sleep(600);
- } while (wus_ondisk>sah_config.max_wus_ondisk);
-
- return 0;
-}
-
-/*
- * $Log: splitter.cpp,v $
- * Revision 1.22.2.6 2007/06/06 15:58:30 korpela
- * *** empty log message ***
- *
- * Revision 1.22.2.5 2006/12/14 22:24:48 korpela
- * *** empty log message ***
- *
- * Revision 1.22.2.4 2006/11/08 20:16:26 vonkorff
- * Fixes an error message.
- *
- * Revision 1.22.2.3 2006/11/07 19:26:37 vonkorff
- * Fixed lcgf
- *
- * Revision 1.22.2.2 2006/01/13 00:37:58 korpela
- * Moved splitter to using standard BOINC logging mechanisms. All stderr now
- * goes to "error.log"
- *
- * Added command line parameters "-iterations=" (number of workunit groups to
- * create before exiting), "-trigger_file_path=" (path to the splitter_stop trigger
- * file. Default is /disks/setifiler1/wutape/tapedir/splitter_stop).
- *
- * Reduced deadlines by a factor of three. We now need a 30 MFLOP machine to meet
- * the deadline.
- *
- * Revision 1.22.2.1 2005/08/01 21:16:25 jeffc
- * *** empty log message ***
- *
- * Revision 1.22 2005/01/27 23:03:27 mattl
- *
- * commented out tf=0 in check_for_halt
- *
- * Revision 1.21 2004/12/27 20:48:54 jeffc
- * *** empty log message ***
- *
- * Revision 1.20 2004/08/12 15:45:41 jeffc
- * *** empty log message ***
- *
- * Revision 1.19 2004/07/09 22:35:39 jeffc
- * *** empty log message ***
- *
- * Revision 1.18 2004/06/27 21:07:04 jeffc
- * *** empty log message ***
- *
- * Revision 1.17 2004/06/20 18:56:48 jeffc
- * *** empty log message ***
- *
- * Revision 1.16 2004/06/18 23:23:32 jeffc
- * *** empty log message ***
- *
- * Revision 1.15 2004/06/16 20:57:19 jeffc
- * *** empty log message ***
- *
- * Revision 1.14 2004/04/08 22:25:47 jeffc
- * *** empty log message ***
- *
- * Revision 1.13 2004/01/22 00:57:53 korpela
- * *** empty log message ***
- *
- * Revision 1.12 2004/01/01 18:42:01 korpela
- * *** empty log message ***
- *
- * Revision 1.11 2003/12/03 23:46:41 korpela
- * WU count is now only for SAH workunits.
- *
- * Revision 1.10 2003/11/25 21:59:52 korpela
- * *** empty log message ***
- *
- * Revision 1.9 2003/11/01 20:54:02 korpela
- * *** empty log message ***
- *
- * Revision 1.8 2003/10/24 16:57:03 korpela
- * *** empty log message ***
- *
- * Revision 1.7 2003/09/26 20:48:51 jeffc
- * jeffc - merge in branch setiathome-4_all_platforms_beta.
- *
- * Revision 1.5.2.2 2003/09/23 00:49:12 korpela
- * *** empty log message ***
- *
- * Revision 1.5.2.1 2003/09/22 17:39:34 korpela
- * *** empty log message ***
- *
- * Revision 1.6 2003/09/22 17:05:38 korpela
- * *** empty log message ***
- *
- * Revision 1.5 2003/09/13 20:48:38 korpela
- * directory reorg. Moved client files to ./client
- *
- * Revision 1.4 2003/09/11 18:53:38 korpela
- * *** empty log message ***
- *
- * Revision 1.3 2003/08/13 23:18:47 korpela
- * *** empty log message ***
- *
- * Revision 1.2 2003/08/05 17:23:42 korpela
- * More work on database stuff.
- * Further tweaks.
- *
- * Revision 1.1 2003/07/29 20:35:50 korpela
- *
- * renames .C files to .cpp
- *
- * Revision 1.2 2003/06/03 01:01:17 korpela
- *
- * First working splitter under CVS.
- *
- * Revision 1.1 2003/06/03 00:23:40 korpela
- *
- * Again
- *
- * Revision 3.6 2003/05/21 00:41:42 korpela
- * *** empty log message ***
- *
- * Revision 3.5 2003/05/19 17:40:59 eheien
- * *** empty log message ***
- *
- * Revision 3.4 2003/04/09 17:46:54 korpela
- * *** empty log message ***
- *
- * Revision 3.3 2002/06/20 22:09:17 eheien
- * *** empty log message ***
- *
- * Revision 3.2 2001/11/07 00:51:47 korpela
- * Added splitter version to database.
- * Added max_wus_ondisk option.
- *
- * Revision 3.1 2001/08/16 23:42:08 korpela
- * Mods for splitter to make binary workunits.
- *
- * Revision 3.0 2001/08/01 19:04:57 korpela
- * Check this in before Paul screws it up.
- *
- * Revision 2.7 2000/12/01 01:13:29 korpela
- * *** empty log message ***
- *
- * Revision 2.6 1999/06/07 21:00:52 korpela
- * *** empty log message ***
- *
- * Revision 2.5 1999/03/27 16:19:35 korpela
- * *** empty log message ***
- *
- * Revision 2.4 1999/03/05 01:47:18 korpela
- * Added dataclass paramter.
- *
- * Revision 2.3 1999/02/22 22:21:09 korpela
- * added -nodb option
- *
- * Revision 2.2 1999/02/11 16:46:28 korpela
- * Added some db access functions.
- *
- * Revision 2.1 1998/11/02 16:41:21 korpela
- * Minor Change.
- *
- * Revision 2.0 1998/10/30 22:00:04 korpela
- * Conversion to C++ and merger with client source tree.
- *
- * Revision 1.2 1998/10/30 20:26:03 korpela
- * Bug Fixes. Now mostly working.
- *
- * Revision 1.1 1998/10/27 00:58:16 korpela
- * Initial revision
- *
- *
- */
diff --git a/splitter_pfb/splitter.h b/splitter_pfb/splitter.h
deleted file mode 100644
index 46b73b3..0000000
--- a/splitter_pfb/splitter.h
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * splitter.h
- *
- * Global definitions from the splitter main program.
- *
- * $Id: splitter.h,v 1.6.2.1 2006/01/13 00:37:58 korpela Exp $
- *
- */
-
-#ifndef SPLITTER_H
-#define SPLITTER_H
-
-#include "splitparms.h"
-#include "splittypes.h"
-
-#define MAX(x,y) ( ((x)<(y)) ? (y) : (x) )
-#define MIN(x,y) ( ((y)<(x)) ? (y) : (x) )
-
-/* wulog: File for logging names of completed wu files */
-/* errorlog: File for logging errors */
-#include "boinc_db.h"
-#include "crypt.h"
-#include "backend_lib.h"
-#include "sched_config.h"
-
-extern SCHED_CONFIG boinc_config;
-extern DB_APP app;
-extern R_RSA_PRIVATE_KEY key;
-extern FILE *wulog,*errorlog;
-extern workunit wuheaders[NSTRIPS];
-extern tapeheader_t tapeheaders[TAPE_FRAMES_IN_BUFFER];
-extern int noencode;
-extern int dataclass;
-extern int nodb;
-extern int resumetape;
-extern int startblock;
-extern int norewind;
-extern int output_xml;
-extern int polyphase;
-extern int wu_database_id[NSTRIPS];
-extern int gregorian;
-extern char * projectdir;
-extern char trigger_file_name[1024];
-
-
-/* Buffer that holds tape data */
-extern unsigned char *tapebuffer;
-
-/* Number of records remaining in the buffer after WU creations is complete */
-extern int records_in_buffer;
-
-extern const char *wu_template;
-extern const char *result_template;
-// jeffc
-//extern const char *result_template_filename;
-extern char result_template_filename[];
-extern char result_template_filepath[];
-extern char wu_template_filename[];
-
-/* Persistant sequence number of wu file */
-extern int seqno;
-
-#endif
-
-/*
- * $Log: splitter.h,v $
- * Revision 1.6.2.1 2006/01/13 00:37:58 korpela
- * Moved splitter to using standard BOINC logging mechanisms. All stderr now
- * goes to "error.log"
- *
- * Added command line parameters "-iterations=" (number of workunit groups to
- * create before exiting), "-trigger_file_path=" (path to the splitter_stop trigger
- * file. Default is /disks/setifiler1/wutape/tapedir/splitter_stop).
- *
- * Reduced deadlines by a factor of three. We now need a 30 MFLOP machine to meet
- * the deadline.
- *
- * Revision 1.6 2004/07/09 22:35:39 jeffc
- * *** empty log message ***
- *
- * Revision 1.5 2004/06/16 20:57:19 jeffc
- * *** empty log message ***
- *
- * Revision 1.4 2003/09/26 20:48:52 jeffc
- * jeffc - merge in branch setiathome-4_all_platforms_beta.
- *
- * Revision 1.2.2.1 2003/09/22 17:39:35 korpela
- * *** empty log message ***
- *
- * Revision 1.3 2003/09/22 17:05:38 korpela
- * *** empty log message ***
- *
- * Revision 1.2 2003/08/05 17:23:42 korpela
- * More work on database stuff.
- * Further tweaks.
- *
- * Revision 1.1 2003/06/03 00:23:40 korpela
- *
- * Again
- *
- * Revision 3.2 2003/05/19 17:40:59 eheien
- * *** empty log message ***
- *
- * Revision 3.1 2001/08/16 23:42:08 korpela
- * Mods for splitter to make binary workunits.
- *
- * Revision 3.0 2001/08/01 19:04:57 korpela
- * Check this in before Paul screws it up.
- *
- * Revision 2.5 1999/10/20 19:20:26 korpela
- * *** empty log message ***
- *
- * Revision 2.4 1999/03/05 01:47:18 korpela
- * Added data_class field.
- *
- * Revision 2.3 1999/02/22 22:21:09 korpela
- * Added nodb option
- *
- * Revision 2.2 1999/02/11 16:46:28 korpela
- * Added startblock and norewind support, and wu_database_id.
- *
- * Revision 2.1 1998/11/02 16:41:21 korpela
- * Minor Change.
- *
- * Revision 2.0 1998/10/30 22:00:04 korpela
- * Conversion to C++ and merger with client source tree.
- *
- * Revision 1.1 1998/10/27 01:10:32 korpela
- * Initial revision
- *
- *
- */
diff --git a/splitter_pfb/squarewave.cpp b/splitter_pfb/squarewave.cpp
deleted file mode 100644
index 7ac379d..0000000
--- a/splitter_pfb/squarewave.cpp
+++ /dev/null
@@ -1,75 +0,0 @@
-#include "sah_config.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <time.h>
-#include <math.h>
-#include <string.h>
-#include <unistd.h>
-
-#define NUM_FRAMES 200L
-#define FRAME_DATA_SIZE (1024L*1024)
-#define HEADER_SIZE 1024
-#define FILESIZE (NUM_FRAMES*(FRAME_DATA_SIZE+HEADER_SIZE))
-
-char header[HEADER_SIZE];
-
-int main(void) {
- int i;
- int datapos=0;
- int frameseq=0;
- long written=0;
- int on=0;
- struct tm *tm;
- char data;
-
- char tmpstr[256];
- char telstr[256];
- double time0=(double)time(0);
- time_t clock;
-
- for (written=0;written<NUM_FRAMES;written++) {
- int headerpos=0;
- memset(header,0,HEADER_SIZE);
- strcpy(header,"NAME=sqrwave");
- headerpos+=strlen("NAME=sqrwave")+1;
- strcpy(header+headerpos,"RCDTYPE=1");
- headerpos+=strlen("RCDTYPE=1")+1;
- sprintf(tmpstr,"FRAMESEQ=%d",frameseq);
- strcpy(header+headerpos,tmpstr);
- headerpos+=strlen(tmpstr)+1;
- sprintf(tmpstr,"DATASEQ=%d",frameseq++);
- strcpy(header+headerpos,tmpstr);
- headerpos+=strlen(tmpstr)+1;
- clock=floor(time0);
- tm=localtime(&clock);
- sprintf(tmpstr,"AST=%.2d%.3d%.2d%.2d%.2d%.2d",tm->tm_year,tm->tm_yday,tm->tm_hour,tm->tm_min,tm->tm_sec,(int)((time0-floor(time0))*100));
- strcpy(header+headerpos,tmpstr);
- headerpos+=strlen(tmpstr)+1;
- if (!((frameseq-1)%5)) {
- sprintf(telstr,"TELSTR=%.2d%.3d%.2d%.2d%.2d 0.0 0.0 15.0",tm->tm_year,tm->tm_yday,tm->tm_hour,tm->tm_min+(tm->tm_sec>57),(tm->tm_sec+2)%60);
- }
- strcpy(header+headerpos,telstr);
- headerpos+=strlen(telstr)+1;
- strcpy(header+headerpos,"RECEIVER=ao1420");
- headerpos+=strlen("RECEIVER=ao1420")+1;
- strcpy(header+headerpos,"SAMPLERATE=2.5000");
- headerpos+=strlen("SAMPLERATE=2.5000")+1;
- strcpy(header+headerpos,"VER=1.00");
- headerpos+=strlen("VER=1.00")+1;
- strcpy(header+headerpos,"CENTERFREQ=1420.0");
- headerpos+=strlen("CENTERFREQ=1420.0")+1;
- strcpy(header+headerpos,"NUMRINGBUFS=4");
- headerpos+=strlen("NUMRINGBUFS=4")+1;
- strcpy(header+headerpos,"NUMDISKBUFS=2");
- headerpos+=strlen("NUMDISKBUFS=2")+1;
- strcpy(header+headerpos,"EOH=");
- write(stdout->_file, header, HEADER_SIZE);
- for(i=0;i<FRAME_DATA_SIZE;i++) {
- if (!((datapos++)%(100/8))) on=!on;
- data=0xaa*on;
- write(stdout->_file, &data, 1);
- }
- time0+=(1024.0*1024.0*4.0/2.5e6);
- }
-}
-
diff --git a/splitter_pfb/uttolst.h b/splitter_pfb/uttolst.h
deleted file mode 100644
index 8f29efb..0000000
--- a/splitter_pfb/uttolst.h
+++ /dev/null
@@ -1,2 +0,0 @@
-double tm_UtToLst(double ddtime, double longitude,
- long mon, long day, long year);
diff --git a/splitter_pfb/validrun.cpp b/splitter_pfb/validrun.cpp
deleted file mode 100644
index 45d3854..0000000
--- a/splitter_pfb/validrun.cpp
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * validrun.c
- *
- * Functions for determining if a section of the tape buffer can be
- * turned into a valid work unit
- *
- * $Id: validrun.cpp,v 1.2.4.2 2006/12/14 22:24:48 korpela Exp $
- *
- */
-
-#include "sah_config.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <assert.h>
-#include "splitparms.h"
-#include "splittypes.h"
-#include "splitter.h"
-#include "message.h"
-
-
-int valid_run(tapeheader_t tapeheader[],buffer_pos_t *start_of_wu,
- buffer_pos_t *end_of_wu) {
-
- int i=0,valid=1;
- SCOPE_STRING *first_telstr;
- double first_telstr_time=0;
- double first_jd=tapeheader[0].st.jd;
- char tmpstr[256];
-
- /* find the first telstr that refers to valid data */
-
- do {
- first_telstr=&(tapeheader[++i].telstr);
- first_telstr_time=first_telstr->st.jd;
- } while ((first_telstr_time<=first_jd) && (i<TAPE_FRAMES_IN_BUFFER) &&
- ((first_jd-first_telstr_time)<60.0/86400.0));
-
-
- if (i==TAPE_FRAMES_IN_BUFFER) {
- log_messages.printf(SCHED_MSG_LOG::MSG_NORMAL,"No valid telstr with time later than %14.5f\n",first_jd);
- end_of_wu->frame=1+WU_OVERLAP_FRAMES;
- end_of_wu->byte=0;
- return(0);
- }
-
- /* find the correct byte offset for the start of the work unit */
-
- start_of_wu->frame=i;
- start_of_wu->byte=(long)((tapeheader[i].telstr.st.jd-tapeheader[i].st.jd)*86400.0*tapeheader[i].samplerate*2/CHAR_BIT);
- start_of_wu->byte &= 0xfffffffe;
-
-
- while (start_of_wu->byte<0) {
- start_of_wu->frame--;
- start_of_wu->byte+=TAPE_DATA_SIZE;
- }
-
- while (start_of_wu->byte>TAPE_DATA_SIZE) {
- start_of_wu->frame++;
- start_of_wu->byte-=TAPE_DATA_SIZE;
- }
-
- if (start_of_wu->frame<0) {
- log_messages.printf(SCHED_MSG_LOG::MSG_NORMAL,"Missing telescope strings near %lu\n",
- tapeheader[0].frameseq);
- end_of_wu->frame=0;
- end_of_wu->byte=0;
- records_in_buffer=0;
- return(0);
- }
-
- if ((start_of_wu->frame+TAPE_FRAMES_PER_WU)>TAPE_FRAMES_IN_BUFFER) {
- log_messages.printf(SCHED_MSG_LOG::MSG_NORMAL,"Missing telescope strings near %lu\n",
- tapeheader[0].frameseq);
- end_of_wu->frame=0;
- end_of_wu->byte=0;
- records_in_buffer=0;
- return(0);
- }
-
- /* check for frames in error */
- for (i=0; i<TAPE_FRAMES_PER_WU; i++) {
- int j=start_of_wu->frame+i;
- // missed frames
- if (tapeheader[j].missed) {
- log_messages.printf(SCHED_MSG_LOG::MSG_NORMAL,"Missing frames between %lu and %lu\n",
- tapeheader[j-1].frameseq,tapeheader[j].frameseq);
- valid=0;
- }
- // failed blanking signal acquisition
- if (tapeheader[j].blanking_failed) {
- log_messages.printf(SCHED_MSG_LOG::MSG_NORMAL,"Failed blanking between frames %lu and %lu\n",
- tapeheader[j-1].frameseq,tapeheader[j].frameseq);
- valid=0;
- }
- if(!valid) {
- end_of_wu->frame=j+WU_OVERLAP_FRAMES+1;
- end_of_wu->byte=0;
- assert((j+WU_OVERLAP_FRAMES)<=TAPE_FRAMES_IN_BUFFER);
- }
- }
-
- if (!valid) {
- end_of_wu->frame=0;
- records_in_buffer=0;
- return(valid);
- }
-
- end_of_wu->frame=start_of_wu->frame+TAPE_FRAMES_PER_WU;
- end_of_wu->byte=start_of_wu->byte;
-
- return(valid);
-}
-
-
-/*
- * $Log: validrun.cpp,v $
- * Revision 1.2.4.2 2006/12/14 22:24:48 korpela
- * *** empty log message ***
- *
- * Revision 1.2.4.1 2006/01/13 00:37:58 korpela
- * Moved splitter to using standard BOINC logging mechanisms. All stderr now
- * goes to "error.log"
- *
- * Added command line parameters "-iterations=" (number of workunit groups to
- * create before exiting), "-trigger_file_path=" (path to the splitter_stop trigger
- * file. Default is /disks/setifiler1/wutape/tapedir/splitter_stop).
- *
- * Reduced deadlines by a factor of three. We now need a 30 MFLOP machine to meet
- * the deadline.
- *
- * Revision 1.2 2003/09/11 18:53:38 korpela
- * *** empty log message ***
- *
- * Revision 1.1 2003/07/29 20:35:57 korpela
- *
- * renames .C files to .cpp
- *
- * Revision 1.1 2003/06/03 00:23:43 korpela
- *
- * Again
- *
- * Revision 3.0 2001/08/01 19:04:57 korpela
- * Check this in before Paul screws it up.
- *
- * Revision 2.7 2000/12/01 01:13:29 korpela
- * *** empty log message ***
- *
- * Revision 2.6 1999/06/07 21:00:52 korpela
- * *** empty log message ***
- *
- * Revision 2.5 1999/03/27 16:19:35 korpela
- * *** empty log message ***
- *
- * Revision 2.4 1999/02/22 22:21:09 korpela
- * added -nodb option
- *
- * Revision 2.3 1999/02/11 16:46:28 korpela
- * Added checkpointing.
- *
- * Revision 2.2 1998/11/04 23:08:25 korpela
- * Byte and bit order change.
- *
- * Revision 2.1 1998/11/02 16:41:21 korpela
- * Minor Change.
- *
- * Revision 2.0 1998/10/30 22:00:04 korpela
- * Conversion to C++ and merger with client source tree.
- *
- * Revision 1.3 1998/10/30 20:26:03 korpela
- * Bug Fixes. Now mostly working.
- *
- * Revision 1.2 1998/10/27 00:59:22 korpela
- * Bug fixes.
- *
- * Revision 1.1 1998/10/22 17:48:20 korpela
- * Initial revision
- *
- *
- */
diff --git a/splitter_pfb/validrun.h b/splitter_pfb/validrun.h
deleted file mode 100644
index 89f7c6d..0000000
--- a/splitter_pfb/validrun.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * validrun.h
- *
- * Functions for determining if a section of the tape buffer can be
- * turned into a valid work unit
- *
- * $Id: validrun.h,v 1.1 2003/06/03 00:23:43 korpela Exp $
- *
- */
-
-int valid_run(tapeheader_t tapeheader[],buffer_pos_t *start_of_wu,
- buffer_pos_t *end_of_wu);
-
-/*
- * $Log: validrun.h,v $
- * Revision 1.1 2003/06/03 00:23:43 korpela
- *
- * Again
- *
- * Revision 3.0 2001/08/01 19:04:57 korpela
- * Check this in before Paul screws it up.
- *
- * Revision 2.1 1998/11/02 16:41:21 korpela
- * Minor Change.
- *
- * Revision 2.0 1998/10/30 22:00:04 korpela
- * Conversion to C++ and merger with client source tree.
- *
- * Revision 1.1 1998/10/22 17:49:15 korpela
- * Initial revision
- *
- *
- */
diff --git a/splitter_pfb/writeheader.cpp b/splitter_pfb/writeheader.cpp
deleted file mode 100644
index 89296c3..0000000
--- a/splitter_pfb/writeheader.cpp
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Functions for writing tape and work unit headers
- *
- * $Id: writeheader.cpp,v 1.3.4.1 2006/12/14 22:24:49 korpela Exp $
- *
- */
-
-#include "sah_config.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <time.h>
-#include <sys/types.h>
-
-#include "splitparms.h"
-#include "splittypes.h"
-#include "timecvt.h"
-#include "seti_header.h"
-
-extern int output_xml;
-
-/* Write a tape header into a buffer */
-int write_tape_header(char *buffer, tapeheader_t *header) {
-/* Unimplemented as yet */
-return(0);
-}
-
-char *monthnames[]={"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep"
- "Oct","Nov","Dec"};
-char *daynames[]={"Sun","Mon","Tue","Wed","Thu","Fri","Sat"};
-
-/* Write a work unit header into a FILE */
-/*int splitter_write_wu_header(FILE *file, wuheader_t *header) {
- if (!output_xml)
- write_wu_header(file, header->wuhead);
- return (seti_write_wu_header(file,header->wuinfo,output_xml));
-
-}
-*/
-
-/*
- * $Log: writeheader.cpp,v $
- * Revision 1.3.4.1 2006/12/14 22:24:49 korpela
- * *** empty log message ***
- *
- * Revision 1.3 2003/09/11 18:53:38 korpela
- * *** empty log message ***
- *
- * Revision 1.2 2003/08/05 17:23:44 korpela
- * More work on database stuff.
- * Further tweaks.
- *
- * Revision 1.1 2003/07/29 20:35:59 korpela
- *
- * renames .C files to .cpp
- *
- * Revision 1.2 2003/06/03 01:01:18 korpela
- *
- * First working splitter under CVS.
- *
- * Revision 1.1 2003/06/03 00:23:43 korpela
- *
- * Again
- *
- * Revision 3.1 2003/05/19 17:40:59 eheien
- * *** empty log message ***
- *
- * Revision 3.0 2001/08/01 19:04:57 korpela
- * Check this in before Paul screws it up.
- *
- * Revision 2.6 1999/01/04 22:27:55 korpela
- * Updated return codes.
- *
- * Revision 2.5 1998/11/10 00:02:44 korpela
- * Moved remaining wuheader fields into a WU_INFO structure.
- *
- * Revision 2.4 1998/11/09 23:26:27 korpela
- * Added generic version= to default header.
- *
- * Revision 2.3 1998/11/05 21:18:41 korpela
- * Moved name field from header to seti header.
- *
- * Revision 2.2 1998/11/02 18:42:03 korpela
- * Changed write_wu_header to call seti_write_wu_header
- *
- * Revision 2.1 1998/11/02 16:38:29 korpela
- * Will be transfered to client.
- *
- * Revision 2.0 1998/10/30 22:00:04 korpela
- * Conversion to C++ and merger with client source tree.
- *
- * Revision 1.4 1998/10/30 20:26:03 korpela
- * Bug Fixes. Now mostly working.
- *
- * Revision 1.3 1998/10/27 00:59:43 korpela
- * Bug fixes.
- * /
- *
- * Revision 1.2 1998/10/20 16:32:03 korpela
- * Fixed syntax error.
- *
- * Revision 1.1 1998/10/20 16:27:41 korpela
- * Initial revision
- *
- *
- */
diff --git a/splitter_pfb/writeheader.h b/splitter_pfb/writeheader.h
deleted file mode 100644
index c3d6d4a..0000000
--- a/splitter_pfb/writeheader.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Functions for writing tape and work unit headers
- *
- * $Id: writeheader.h,v 1.2 2003/08/05 17:23:44 korpela Exp $
- *
- */
-
-/* Write a tape header into a buffer */
-int write_tape_header(char *buffer, tapeheader_t *header);
-
-/* Write a work unit header into a FILE */
-// int splitter_write_wu_header(FILE *file, wuheader_t *header);
-
-/*
- * $Log: writeheader.h,v $
- * Revision 1.2 2003/08/05 17:23:44 korpela
- * More work on database stuff.
- * Further tweaks.
- *
- * Revision 1.1 2003/06/03 00:23:44 korpela
- *
- * Again
- *
- * Revision 3.0 2001/08/01 19:04:57 korpela
- * Check this in before Paul screws it up.
- *
- * Revision 2.2 1999/01/04 22:27:55 korpela
- * Updated return codes.
- *
- * Revision 2.1 1998/11/02 16:41:21 korpela
- * Minor Change.
- *
- * Revision 2.0 1998/10/30 22:00:04 korpela
- * Conversion to C++ and merger with client source tree.
- *
- * Revision 1.1 1998/10/15 17:20:01 korpela
- * Initial revision
- *
- */
diff --git a/splitter_pfb/wufiles.cpp b/splitter_pfb/wufiles.cpp
deleted file mode 100644
index d8663ce..0000000
--- a/splitter_pfb/wufiles.cpp
+++ /dev/null
@@ -1,679 +0,0 @@
-/*
- *
- * Functions for managing wufiles and their data
- *
- * $Id: wufiles.cpp,v 1.29.2.18 2007/08/10 18:21:13 korpela Exp $
- *
- */
-
-#include "sah_config.h"
-#undef USE_MYSQL
-#include <cstdio>
-#include <cstdlib>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <limits.h>
-#include <iostream>
-#include <string>
-#include <algorithm>
-#ifdef HAVE_ERRNO_H
-#include <errno.h>
-#endif
-
-#include "boinc_db.h"
-#include "sched_util.h"
-#include "splitparms.h"
-#include "splittypes.h"
-#include "timecvt.h"
-#include "s_util.h"
-#include "util.h"
-#include "str_util.h"
-#include "str_replace.h"
-#include "splitter.h"
-#include "writeheader.h"
-#include "message.h"
-#include "encode.h"
-#include "dotransform.h"
-#include "angdist.h"
-#include "lcgamm.h"
-#include "readtape.h"
-#include "sqlrow.h"
-#include "sqlblob.h"
-#include "sqlapi.h"
-#include "db_table.h"
-#include "schema_master.h"
-#include "seti_tel.h"
-#include "seti_cfg.h"
-#include "xml_util.h"
-#include "db/app_config.h"
-#include "str_util.h"
-#include <errno.h>
-
-int wu_database_id[NSTRIPS];
-static std::vector<unsigned char> bin_data[NSTRIPS];
-
-extern APP_CONFIG sah_config;
-
-int make_wu_headers(tapeheader_t tapeheader[],workunit wuheader[],
- buffer_pos_t *start_of_wu) {
- int procid=getpid();
- int i,j,startframe=start_of_wu->frame;
- double receiver_freq;
- int bandno;
- SCOPE_STRING *lastpos;
- FILE *tmpfile;
- char tmpstr[256];
- char buf[64];
- static int HaveConfigTable=0;
- static ReceiverConfig_t ReceiverConfig;
- static receiver_config r;
- static settings s;
-
- if(!HaveConfigTable) {
- sprintf(buf,"where s4_id=%d",gregorian?AOGREG_1420:AO_1420);
- r.fetch(std::string(buf));
- ReceiverConfig.ReceiverID=r.s4_id;
- strlcpy(ReceiverConfig.ReceiverName,r.name,
- sizeof(ReceiverConfig.ReceiverName));
- ReceiverConfig.Latitude=r.latitude;
- ReceiverConfig.Longitude=r.longitude;
- ReceiverConfig.WLongitude=-r.longitude;
- ReceiverConfig.Elevation=r.elevation;
- ReceiverConfig.Diameter=r.diameter;
- ReceiverConfig.BeamWidth=r.beam_width;
- ReceiverConfig.CenterFreq=r.center_freq;
- ReceiverConfig.AzOrientation=r.az_orientation;
- for (i=0;i<(sizeof(ReceiverConfig.ZenCorrCoeff)/sizeof(ReceiverConfig.ZenCorrCoeff[0]));i++) {
- ReceiverConfig.ZenCorrCoeff[i]=r.zen_corr_coeff[i];
- ReceiverConfig.AzCorrCoeff[i]=r.az_corr_coeff[i];
- }
- HaveConfigTable=1;
- }
- sprintf(buf,"where active=%d",app.id);
- if (!s.fetch(std::string(buf))) {
- log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,"Unable to find active settings for app.id=%d\n",app.id);
- exit(1);
- }
- if (s.receiver_cfg->id != r.id) {
- log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,"Receiver config does not match settings (%d != %d)\n",s.receiver_cfg->id, r.id);
- exit(1);
- }
- s.recorder_cfg->fetch();
- s.splitter_cfg->fetch();
- s.analysis_cfg->fetch();
- if (!strncmp(s.splitter_cfg->data_type,"encoded",
- std::min(static_cast<size_t>(7),sizeof(s.splitter_cfg->data_type)))) {
- noencode=0;
- } else {
- noencode=1;
- }
-
- workunit_grp wugrp;
- sprintf(wugrp.name,"%s.%ld.%d.%ld.%d",tapeheader[startframe].name,
- procid,
- (current_record-TAPE_RECORDS_IN_BUFFER)*8+startframe,
- start_of_wu->byte,s.id);
- wugrp.receiver_cfg=r;
- wugrp.recorder_cfg=s.recorder_cfg;
- wugrp.splitter_cfg=s.splitter_cfg;
- wugrp.analysis_cfg=s.analysis_cfg;
-
- wugrp.data_desc.start_ra=tapeheader[startframe+1].telstr.ra;
- wugrp.data_desc.start_dec=tapeheader[startframe+1].telstr.dec;
- wugrp.data_desc.end_ra=tapeheader[startframe+TAPE_FRAMES_PER_WU].telstr.ra;
- wugrp.data_desc.end_dec=tapeheader[startframe+TAPE_FRAMES_PER_WU].telstr.dec;
- wugrp.data_desc.nsamples=NSAMPLES;
- wugrp.data_desc.true_angle_range=0;
- {
- double sample_rate=tapeheader[startframe].samplerate/NSTRIPS;
- /* startframe+1 contains the first valid RA and Dec */
- TIME st=tapeheader[startframe+1].telstr.st;
- TIME et=tapeheader[startframe+TAPE_FRAMES_PER_WU].telstr.st;
- double diff=(et-st).jd*86400.0;
- for (j=2;j<TAPE_FRAMES_PER_WU;j++) {
- wugrp.data_desc.true_angle_range+=angdist(tapeheader[startframe+j-1].telstr,tapeheader[startframe+j].telstr);
- }
- wugrp.data_desc.true_angle_range*=(double)wugrp.data_desc.nsamples/(double)sample_rate/diff;
- if (wugrp.data_desc.true_angle_range==0) wugrp.data_desc.true_angle_range=1e-10;
- }
- // Calculate the number of unique signals that could be found in a workunit.
- // We will use these numbers to calculate thresholds.
- double numgauss=2.36368e+08/wugrp.data_desc.true_angle_range;
- double numpulse=std::min(4.52067e+10/wugrp.data_desc.true_angle_range,2.00382e+11);
- double numtrip=std::min(3.25215e+12/wugrp.data_desc.true_angle_range,1.44774e+13);
-
-
-
- // Calculate a unique key to describe this analysis config.
- long keyuniq=floor(std::min(wugrp.data_desc.true_angle_range*100,1000.0)+0.5)+
- s.analysis_cfg.id*1024.0;
- if ((keyuniq>(13*1024)) ||(keyuniq<12*1024)) {
- log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,"Invalid keyuniq value!\n");
- log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,"%d %d %f\n",keyuniq,s.analysis_cfg.id,wugrp.data_desc.true_angle_range);
- exit(1);
- }
-
- keyuniq*=-1;
- long save_keyuniq=keyuniq;
- s.analysis_cfg=wugrp.analysis_cfg;
- sprintf(tmpstr,"where keyuniq=%d",keyuniq);
- // Check if we've already done this analysis_config...
- s.analysis_cfg.id=0;
- s.analysis_cfg->fetch(tmpstr);
-
- if (s.analysis_cfg->id==0) {
- if (keyuniq != save_keyuniq) {
- log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,"keyuniq value changed!\n");
- exit(1);
- }
-
- // If not calculate the thresholds based upon the input analysis_config
- // Triplets are distributed exponentially...
- wugrp.analysis_cfg->triplet_thresh+=(log(numtrip)-29.0652);
-
- // Gaussians are based upon chisqr...
- double p_gauss=lcgf(32.0,wugrp.analysis_cfg->gauss_null_chi_sq_thresh*32.0);
- p_gauss-=(log(numgauss)-19.5358);
- wugrp.analysis_cfg->gauss_null_chi_sq_thresh=invert_lcgf(p_gauss,32,1e-4)*0.03125;
-
- // Pulses thresholds are log of the probability
- wugrp.analysis_cfg->pulse_thresh+=(log(numpulse)-24.7894);
-
- wugrp.analysis_cfg->keyuniq=keyuniq;
- wugrp.analysis_cfg->insert();
- } else {
- wugrp.analysis_cfg=s.analysis_cfg;
- }
-
- strlcpy(wugrp.data_desc.time_recorded,
- short_jd_string(tapeheader[startframe+1].telstr.st.jd),
- sizeof(wugrp.data_desc.time_recorded));
- wugrp.data_desc.time_recorded_jd=tapeheader[startframe+1].telstr.st.jd;
-
- lastpos=&(tapeheader[startframe].telstr);
- coordinate_t tmpcoord;
- tmpcoord.time=tapeheader[startframe].telstr.st.jd;
- tmpcoord.ra=tapeheader[startframe].telstr.ra;
- tmpcoord.dec=tapeheader[startframe].telstr.dec;
- wugrp.data_desc.coords.push_back(tmpcoord);
-
- for (j=1;j<TAPE_FRAMES_PER_WU;j++) {
- if ((tapeheader[startframe+j].telstr.st.jd-lastpos->st.jd) > (1.0/86400.0))
- {
- lastpos=&(tapeheader[startframe+j].telstr);
- tmpcoord.time=tapeheader[startframe+j].telstr.st.jd;
- tmpcoord.ra=tapeheader[startframe+j].telstr.ra;
- tmpcoord.dec=tapeheader[startframe+j].telstr.dec;
- wugrp.data_desc.coords.push_back(tmpcoord);
- }
- }
-
- wugrp.tape_info->id=0;
- wugrp.tape_info->fetch(std::string("where name=\'")+tapeheader[startframe].name+"\'");
- wugrp.tape_info->start_time=tapeheader[startframe].st.jd;
- wugrp.tape_info->last_block_time=tapeheader[startframe].st.jd;
- wugrp.tape_info->last_block_done=tapeheader[startframe].frameseq;
-
- if (!nodb) {
- if (wugrp.tape_info.id) {
- if (!(wugrp.tape_info->update())) {
- char buf[1024];
- log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,"%s",sql_error_message());
- exit(1);
- }
- } else {
- strlcpy(wugrp.tape_info->name,tapeheader[startframe].name,sizeof(wugrp.tape_info->name));
- wugrp.tape_info->insert();
- }
- }
-
- if (!nodb) wugrp.insert();
-
- for (i=0;i<NSTRIPS;i++) {
- bin_data[i].clear();
- wuheader[i].group_info=wugrp;
- sprintf(wuheader[i].name,"%s.%ld.%d.%ld.%d.%d",tapeheader[startframe].name,
- procid, (current_record-TAPE_RECORDS_IN_BUFFER)*8+startframe,
- start_of_wu->byte,s.id,i);
- wuheader[i].subband_desc.sample_rate=tapeheader[startframe].samplerate/NSTRIPS;
-
- receiver_freq=tapeheader[startframe].centerfreq;
-
- bandno=((i+NSTRIPS/2)%NSTRIPS)-NSTRIPS/2;
-
- wuheader[i].subband_desc.base=receiver_freq+
- (double)(bandno)*wuheader[i].subband_desc.sample_rate;
- wuheader[i].subband_desc.center=receiver_freq+wuheader[i].subband_desc.sample_rate*NSTRIPS*((double)IFFT_LEN*bandno/FFT_LEN+(double)IFFT_LEN/(2*FFT_LEN)-1.0/(2*FFT_LEN));
- wuheader[i].subband_desc.number=i;
-
- if (!nodb ) {
- if (!(wu_database_id[i]=wuheader[i].insert())) {
- log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,"Database error in make_wu_headers()\n");
- exit(EXIT_FAILURE);
- }
- }
-
- sprintf(tmpstr,"./wu_inbox/%s",wuheader[i].name);
- if ((tmpfile=fopen(tmpstr,"w"))) {
- fprintf(tmpfile,"<workunit>\n");
- fprintf(tmpfile,wuheader[i].print_xml().c_str());
- fclose(tmpfile);
- } else {
- log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,"Unable to open file ./wu_inbox/%s, errno=%d\n",wuheader[i].name,errno);
- exit(1);
- }
- bin_data[i].reserve(wuheaders[i].group_info->recorder_cfg->bits_per_sample*
- wuheaders[i].group_info->data_desc.nsamples/8);
- }
- return(1);
-}
-
-
-void write_wufile_blocks(int nbytes) {
- static bool first_call=true;
- int i,j;
-
-
- for (i=0;i<NSTRIPS;i++) {
- for (j=0;j<nbytes;j++) {
- bin_data[i].push_back(output_buf[i][j]);
- }
- }
-}
-
-int filecopy(char *oldname,char *newname) {
- FILE *oldfile,*newfile;
- char buffer[16384];
- int nread;
- if ((oldfile=fopen(oldname,"rb")) && (newfile=fopen(newname,"wb"))) {
- do {
- nread=fread(buffer,1,16384,oldfile);
- fwrite(buffer,1,nread,newfile);
- } while (nread>0);
- fclose(oldfile);
- fclose(newfile);
- return 0;
- } else {
- return 1;
- }
-}
-
-
-
-void rename_wu_files() {
- int i, retval;
- char oldname[256],newname[1024];
- unsigned long sz;
- DB_WORKUNIT db_wu;
- const char *name[1];
- char *wudir="./wu_inbox";
- xml_encoding encoding=(noencode?_binary:_x_setiathome);
- FILE *tmpfile;
-
- if (boinc_db.open(boinc_config.db_name,boinc_config.db_host,boinc_config.db_user,boinc_config.db_passwd)) {
- boinc_db.print_error("boinc_db.open");
- log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,"Fatal error in boinc_db.open\n");
- exit(1);
- }
-
- for (i=0;i<NSTRIPS;i++) {
- name[0]=wuheaders[i].name;
- sprintf(oldname,"%s/%s",wudir,name[0]);
-
- //sprintf(newname,"%s%s/%s",projectdir,WU_SUBDIR,name[0]);
- retval = dir_hier_path(name[0],
- boinc_config.download_dir,
- boinc_config.uldl_dir_fanout,
- newname,
- true
- );
- if (retval) {
- char buf[1024];
- log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,"[%s] dir_hier_path() failed: %d\n", name[0], retval);
- exit(1);
- }
-
- struct stat sbuf;
- if (!stat(oldname,&sbuf) && (tmpfile=fopen(oldname,"a"))) {
- std::string tmpstr=xml_encode_string(bin_data[i],encoding);
- fprintf(tmpfile,"<data length=%ld encoding=\"%s\">",tmpstr.size(),
- xml_encoding_names[encoding]);
- fwrite(tmpstr.c_str(),tmpstr.size(),1,tmpfile);
- fprintf(tmpfile,"</data>\n");
- fprintf(tmpfile,"</workunit>\n");
- sz=bin_data[i].size();
-
- fclose(tmpfile);
- } else {
- log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,"Header file no longer exists! splitter start script may be failing\n ");
- exit(1);
- }
- if (!nodb) {
- if (!filecopy(oldname,newname)) {
- db_wu.clear();
- db_wu.opaque=wuheaders[i].id;
- strncpy(db_wu.name,name[0],sizeof(db_wu.name)-2);
- db_wu.appid=app.id;
- //db_wu.rsc_fpops_est=2.79248e+13*6;
- //db_wu.rsc_fpops_bound=4.46797e+14*6;
- double ar=wuheaders[i].group_info->data_desc.true_angle_range;
- double dur=(double)(wuheaders[i].group_info->data_desc.nsamples)/wuheaders[i].subband_desc.sample_rate;
- double min_slew=wuheaders[i].group_info->analysis_cfg->pot_min_slew;
- double max_slew=wuheaders[i].group_info->analysis_cfg->pot_max_slew;
- if ( ar < ( dur*min_slew )/2 ) {
- db_wu.rsc_fpops_est=4.95e+13;
- } else {
- if ( ar < ( dur*min_slew ) ) {
- db_wu.rsc_fpops_est=(2.85e+13+2.0e+14*ar);
- } else {
- if ( ar <= (dur*max_slew) ) {
- db_wu.rsc_fpops_est=(2.22e+13/pow(ar,1.25));
- } else {
- db_wu.rsc_fpops_est=1.125e+13;
- }
- }
- }
- db_wu.rsc_fpops_bound=db_wu.rsc_fpops_est*10;
- db_wu.rsc_memory_bound=32505856;
- db_wu.rsc_disk_bound=500000;
- // Our minimum is 10% of a 100 MFLOP machine
- db_wu.delay_bound=db_wu.rsc_fpops_est/3e+7;
- db_wu.min_quorum=sah_config.min_quorum;
- db_wu.target_nresults=sah_config.target_nresults;
- db_wu.max_error_results=sah_config.max_error_results;
- db_wu.max_total_results=sah_config.max_total_results;
- db_wu.max_success_results=sah_config.max_success_results;
- strncpy(db_wu.app_name,SAH_APP_NAME,sizeof(db_wu.app_name)-2);
- if (create_work(db_wu,
- wu_template,
- result_template_filename,
- result_template_filepath,
- name,
- 1,
- boinc_config,
- NULL
- )
- ) {
- log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,"create work failed\n");
- exit(1);
- }
- //unlink(oldname); // we now *always* unlink
- } else {
- log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,"file copy failed\n");
- exit(1);
- }
- unlink(oldname);
- }
- }
- boinc_db.close();
-}
-
-/*
- * $Log: wufiles.cpp,v $
- * Revision 1.29.2.18 2007/08/10 18:21:13 korpela
- * *** empty log message ***
- *
- * Revision 1.29.2.17 2007/06/07 20:01:52 mattl
- * *** empty log message ***
- *
- * Revision 1.29.2.16 2007/06/06 15:58:30 korpela
- * *** empty log message ***
- *
- * Revision 1.29.2.15 2006/12/14 22:24:49 korpela
- * *** empty log message ***
- *
- * Revision 1.29.2.14 2006/05/03 19:14:31 korpela
- * Updated work estimates.
- *
- * Revision 1.29.2.13 2006/04/24 18:41:02 korpela
- * *** empty log message ***
- *
- * Revision 1.29.2.12 2006/01/13 00:37:58 korpela
- * Moved splitter to using standard BOINC logging mechanisms. All stderr now
- * goes to "error.log"
- *
- * Added command line parameters "-iterations=" (number of workunit groups to
- * create before exiting), "-trigger_file_path=" (path to the splitter_stop trigger
- * file. Default is /disks/setifiler1/wutape/tapedir/splitter_stop).
- *
- * Reduced deadlines by a factor of three. We now need a 30 MFLOP machine to meet
- * the deadline.
- *
- * Revision 1.29.2.11 2006/01/10 00:39:04 jeffc
- * *** empty log message ***
- *
- * Revision 1.29.2.10 2006/01/05 23:55:22 korpela
- * *** empty log message ***
- *
- * Revision 1.29.2.9 2005/12/05 22:11:40 korpela
- * Fixed bug in flops estimate.
- *
- * Revision 1.29.2.8 2005/10/05 16:22:17 jeffc
- * removed reference to old/new boolean for directory hash.
- *
- * Revision 1.29.2.7 2005/09/22 23:05:22 korpela
- * Fixed threshold calculation. Was using chisqr rather than reduced chisqr.
- *
- * Revision 1.29.2.6 2005/09/21 22:11:23 korpela
- * Updated Makefile.in for OpenSSL.
- * Added dynamic threshold generation to wufiles.cpp.
- *
- * Revision 1.29.2.5 2005/08/01 17:47:38 korpela
- * Type fixed.
- *
- * Revision 1.29.2.4 2005/08/01 17:43:20 korpela
- * Refinement of FLOPS estimate for workunits.
- *
- * Revision 1.29.2.3 2005/07/26 17:17:01 korpela
- * Typo fix
- *
- * Revision 1.29.2.2 2005/07/19 00:15:19 korpela
- * Revised delay bound and FLOP estimate for setiathome_enhanced.
- *
- * Revision 1.29.2.1 2005/07/06 01:30:17 korpela
- * Updated estimates of FPOPS per workunit for setiathome enhanced.
- *
- * Revision 1.29 2005/03/08 22:36:15 jeffc
- * jeffc - fixed call to create_work()
- *
- * Revision 1.28 2005/02/15 23:06:47 korpela
- * Fixed missing dir_hier symbol.
- *
- * Revision 1.27 2004/12/27 20:48:54 jeffc
- * *** empty log message ***
- *
- * Revision 1.26 2004/11/18 22:24:48 korpela
- * *** empty log message ***
- *
- * Revision 1.25 2004/08/25 22:42:11 jeffc
- * *** empty log message ***
- *
- * Revision 1.24 2004/08/14 04:44:26 jeffc
- * *** empty log message ***
- *
- * Revision 1.23 2004/08/12 15:45:41 jeffc
- * *** empty log message ***
- *
- * Revision 1.22 2004/07/15 17:54:20 jeffc
- * *** empty log message ***
- *
- * Revision 1.21 2004/07/09 22:35:39 jeffc
- * *** empty log message ***
- *
- * Revision 1.20 2004/07/01 17:56:51 korpela
- * *** empty log message ***
- *
- * Revision 1.19 2004/06/25 13:49:33 jeffc
- * *** empty log message ***
- *
- * Revision 1.18 2004/06/18 23:23:32 jeffc
- * *** empty log message ***
- *
- * Revision 1.17 2004/06/16 20:57:19 jeffc
- * *** empty log message ***
- *
- * Revision 1.16 2004/06/02 20:51:32 jeffc
- * *** empty log message ***
- *
- * Revision 1.15 2004/01/22 00:57:54 korpela
- * *** empty log message ***
- *
- * Revision 1.14 2004/01/20 22:33:44 korpela
- * *** empty log message ***
- *
- * Revision 1.13 2004/01/06 22:44:05 korpela
- * *** empty log message ***
- *
- * Revision 1.12 2004/01/01 18:42:01 korpela
- * *** empty log message ***
- *
- * Revision 1.11 2003/12/12 01:51:39 korpela
- * Now using the opaque field in workunit to store SAH wuid.
- *
- * Revision 1.10 2003/12/03 23:46:41 korpela
- * WU count is now only for SAH workunits.
- *
- * Revision 1.9 2003/11/25 21:59:53 korpela
- * *** empty log message ***
- *
- * Revision 1.8 2003/11/11 06:20:30 korpela
- * Increased max fpops_max to prevent timeout on windows clients
- *
- * Revision 1.7 2003/10/25 18:19:44 korpela
- * *** empty log message ***
- *
- * Revision 1.6 2003/10/24 16:57:03 korpela
- * *** empty log message ***
- *
- * Revision 1.5 2003/09/26 20:48:52 jeffc
- * jeffc - merge in branch setiathome-4_all_platforms_beta.
- *
- * Revision 1.3.2.2 2003/09/22 19:00:31 korpela
- * *** empty log message ***
- *
- * Revision 1.3.2.1 2003/09/22 17:39:35 korpela
- * *** empty log message ***
- *
- * Revision 1.4 2003/09/22 17:05:38 korpela
- * *** empty log message ***
- *
- * Revision 1.3 2003/09/11 18:53:38 korpela
- * *** empty log message ***
- *
- * Revision 1.2 2003/08/05 17:23:44 korpela
- * More work on database stuff.
- * Further tweaks.
- *
- * Revision 1.1 2003/07/29 20:36:00 korpela
- *
- * renames .C files to .cpp
- *
- * Revision 1.3 2003/06/05 15:52:47 korpela
- *
- * Fixed coordinate bug that was using the wrong zenith angle from the telescope
- * strings when handling units from the gregorian.
- *
- * Revision 1.2 2003/06/03 01:01:18 korpela
- *
- * First working splitter under CVS.
- *
- * Revision 1.1 2003/06/03 00:23:44 korpela
- *
- * Again
- *
- * Revision 3.8 2003/05/19 17:40:59 eheien
- * *** empty log message ***
- *
- * Revision 3.7 2003/04/10 17:32:25 korpela
- * *** empty log message ***
- *
- * Revision 3.6 2002/06/21 01:42:15 eheien
- * *** empty log message ***
- *
- * Revision 3.5 2001/11/07 00:51:47 korpela
- * Added splitter version to database.
- * Added max_wus_ondisk option.
- *
- * Revision 3.4 2001/08/17 22:20:54 korpela
- * *** empty log message ***
- *
- * Revision 3.3 2001/08/17 01:22:31 korpela
- * *** empty log message ***
- *
- * Revision 3.2 2001/08/17 01:16:53 korpela
- * *** empty log message ***
- *
- * Revision 3.1 2001/08/16 23:42:08 korpela
- * Mods for splitter to make binary workunits.
- *
- * Revision 3.0 2001/08/01 19:04:57 korpela
- * Check this in before Paul screws it up.
- *
- * Revision 2.18 2000/12/01 01:13:29 korpela
- * *** empty log message ***
- *
- * Revision 2.17 1999/06/07 21:00:52 korpela
- * *** empty log message ***
- *
- * Revision 2.16 1999/03/27 16:19:35 korpela
- * *** empty log message ***
- *
- * Revision 2.15 1999/03/05 01:47:18 korpela
- * Added data_class field.
- *
- * Revision 2.14 1999/02/22 22:21:09 korpela
- * added -nodb option
- *
- * Revision 2.13 1999/02/11 16:46:28 korpela
- * Added db access functions.
- *
- * Revision 2.12 1999/01/04 22:27:55 korpela
- * Updated return codes.
- *
- * Revision 2.11 1998/12/14 23:41:44 korpela
- * Added subband_base to work unit header.
- * Changed frequency calculation.
- *
- * Revision 2.10 1998/12/14 21:55:07 korpela
- * Added fft_len and ifft_len to work unit header.
- *
- * Revision 2.9 1998/11/13 23:58:52 korpela
- * Modified for move of name field between structures.
- *
- * Revision 2.8 1998/11/13 22:18:12 davea
- * *** empty log message ***
- *
- * Revision 2.7 1998/11/10 01:55:26 korpela
- * Server requires a CR at the end of a WU file
- * ???
- *
- * Revision 2.6 1998/11/10 00:02:44 korpela
- * Moved remaining wuheader fields into a WU_INFO structure.
- *
- * Revision 2.5 1998/11/05 21:33:02 korpela
- * Fixed angle_range bug.
- *
- * Revision 2.4 1998/11/05 21:18:41 korpela
- * Moved name field from header to seti header.
- *
- * Revision 2.3 1998/11/02 21:20:58 korpela
- * Modified for (internal) integer receiver ID.
- *
- * Revision 2.2 1998/11/02 18:45:39 korpela
- * Changed location of timecvt.h
- *
- * Revision 2.1 1998/11/02 16:38:29 korpela
- * Variable type changes.
- *
- * Revision 2.0 1998/10/30 22:00:04 korpela
- * Conversion to C++ and merger with client source tree.
- *
- * Revision 1.2 1998/10/30 20:26:03 korpela
- * Bug Fixes. Now mostly working.
- *
- * Revision 1.1 1998/10/27 01:01:16 korpela
- * Initial revision
- *
- *
- */
diff --git a/splitter_pfb/wufiles.h b/splitter_pfb/wufiles.h
deleted file mode 100644
index 046c378..0000000
--- a/splitter_pfb/wufiles.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- *
- * Functions for managing wufiles and their data
- *
- * $Id: wufiles.h,v 1.2 2003/08/05 17:23:45 korpela Exp $
- *
- */
-
-
-
-int make_wu_headers(tapeheader_t tapeheader[],workunit wuheaders[],
- buffer_pos_t *start_of_wu) ;
-void write_wufile_blocks(int nbytes) ;
-void rename_wu_files();
-
-/*
- * $Log: wufiles.h,v $
- * Revision 1.2 2003/08/05 17:23:45 korpela
- * More work on database stuff.
- * Further tweaks.
- *
- * Revision 1.1 2003/06/03 00:23:44 korpela
- *
- * Again
- *
- * Revision 3.0 2001/08/01 19:04:57 korpela
- * Check this in before Paul screws it up.
- *
- * Revision 2.1 1998/11/02 16:41:21 korpela
- * Minor Change.
- *
- * Revision 2.0 1998/10/30 22:00:04 korpela
- * Conversion to C++ and merger with client source tree.
- *
- * Revision 1.1 1998/10/27 01:13:16 korpela
- * Initial revision
- *
- *
- */
diff --git a/validate/sah_validate.cpp b/validate/sah_validate.cpp
index a045a41..6e4f74f 100644
--- a/validate/sah_validate.cpp
+++ b/validate/sah_validate.cpp
@@ -19,7 +19,7 @@
extern char app_name[256];
-const int MAX_ALLOWABLE_CREDIT = 115;
+const int MAX_ALLOWABLE_CREDIT = 225;
struct VALIDATE_STATS {
int nstrong_compare;
@@ -31,8 +31,8 @@ struct VALIDATE_STATS {
void print();
};
-int validate_single(vector<RESULT>& results, int& canonical_id, double& granted_credit);
-int validate_plural(vector<RESULT>& results, vector<SAH_RESULT>& sah_results, int& canonical_id, double& granted_credit);
+int validate_single(vector<RESULT>& results, long & canonical_id, double& granted_credit);
+int validate_plural(vector<RESULT>& results, vector<SAH_RESULT>& sah_results, long & canonical_id, double& granted_credit);
void check_overflow_result(RESULT& r);
int log_cuda_result(RESULT& result, double& granted_credit);
bool is_cuda(RESULT result);
@@ -56,7 +56,7 @@ VALIDATE_STATS validate_stats;
//
//------------------------------------------------------------
int check_set(
- vector<RESULT>& results, WORKUNIT& wu, int& canonicalid, double& granted_credit, bool& retry) {
+ vector<RESULT>& results, WORKUNIT& wu, long & canonicalid, double& granted_credit, bool& retry) {
//------------------------------------------------------------
// Note that SAH_RESULT is not the same type as the standard sah
@@ -80,7 +80,7 @@ int check_set(
log_messages.printf(
SCHED_MSG_LOG::MSG_DEBUG,
- "check_set() checking %d results\n",
+ "check_set() checking %ld results\n",
results.size()
);
@@ -90,14 +90,14 @@ int check_set(
SAH_RESULT s = {0};
log_messages.printf(
SCHED_MSG_LOG::MSG_DEBUG,
- "[RESULT#%lld] getting result file %s\n",
+ "[RESULT#%ld] getting result file %s\n",
results[i].id, results[i].name
);
retval = get_result_file(results[i], s);
if (retval) {
log_messages.printf(
SCHED_MSG_LOG::MSG_DEBUG,
- "[RESULT#%lld] read/parse of %s FAILED with retval %d\n",
+ "[RESULT#%ld] read/parse of %s FAILED with retval %d\n",
results[i].id, results[i].name, retval
);
// A directory problem may be transient.
@@ -119,7 +119,7 @@ int check_set(
if (good_result_count < wu.min_quorum) {
log_messages.printf(
SCHED_MSG_LOG::MSG_DEBUG,
- "[WU#%lld] IO error(s) led to less than quorum results. Will retry WU upon receiving more results.\n",
+ "[WU#%ld] IO error(s) led to less than quorum results. Will retry WU upon receiving more results.\n",
wu.id
);
canonicalid = 0;
@@ -133,7 +133,7 @@ int check_set(
if (sah_results[i].bad_values()) {
log_messages.printf(
SCHED_MSG_LOG::MSG_DEBUG,
- "[RESULT#%lld] has one or more bad values.\n",
+ "[RESULT#%ld] has one or more bad values.\n",
results[i].id
);
bad_result.push_back(true);
@@ -159,13 +159,13 @@ return_retval:
}
//------------------------------------------------------------
-int validate_single(vector<RESULT>& results, int& canonicalid, double& granted_credit) {
+int validate_single(vector<RESULT>& results, long& canonicalid, double& granted_credit) {
// This routine is called for single validation (from a trusted client).
//------------------------------------------------------------
log_messages.printf(
SCHED_MSG_LOG::MSG_DEBUG,
- "[RESULT#%lld] is trusted nonredundant and therefore canonical\n",
+ "[RESULT#%ld] is trusted nonredundant and therefore canonical\n",
results[0].id
);
@@ -179,7 +179,7 @@ int validate_single(vector<RESULT>& results, int& canonicalid, double& granted_c
} else {
log_messages.printf(
SCHED_MSG_LOG::MSG_DEBUG,
- "[RESULT#%lld] is claiming greater than max allowable credit (%d). Granting max allowable.\n",
+ "[RESULT#%ld] is claiming greater than max allowable credit (%d). Granting max allowable.\n",
results[0].id, MAX_ALLOWABLE_CREDIT
);
granted_credit = MAX_ALLOWABLE_CREDIT;
@@ -189,7 +189,7 @@ int validate_single(vector<RESULT>& results, int& canonicalid, double& granted_c
}
//------------------------------------------------------------
-int validate_plural(vector<RESULT>& results, vector<SAH_RESULT>& sah_results, int& canonicalid, double& granted_credit) {
+int validate_plural(vector<RESULT>& results, vector<SAH_RESULT>& sah_results, long& canonicalid, double& granted_credit) {
// This routine is called for redundant validation (from nontrusted or test case clients) .
//------------------------------------------------------------
@@ -213,7 +213,7 @@ int validate_plural(vector<RESULT>& results, vector<SAH_RESULT>& sah_results, in
results[i].validate_state = VALIDATE_STATE_INVALID;
log_messages.printf(
SCHED_MSG_LOG::MSG_DEBUG,
- "[RESULT#%lld] is from an invalid app_version\n", results[i].id
+ "[RESULT#%ld] is from an invalid app_version\n", results[i].id
);
continue;
}
@@ -227,14 +227,14 @@ int validate_plural(vector<RESULT>& results, vector<SAH_RESULT>& sah_results, in
results[j].validate_state = VALIDATE_STATE_INVALID;
log_messages.printf(
SCHED_MSG_LOG::MSG_DEBUG,
- "[RESULT#%lld] is from an invalid app_version\n", results[j].id
+ "[RESULT#%ld] is from an invalid app_version\n", results[j].id
);
continue;
}
if (sah_results[i].strongly_similar(sah_results[j])) {
log_messages.printf(
SCHED_MSG_LOG::MSG_DEBUG,
- "[RESULT#%lld (%d signals) and RESULT#%lld (%d signals)] ARE strongly similar\n",
+ "[RESULT#%ld (%d signals) and RESULT#%ld (%d signals)] ARE strongly similar\n",
results[i].id, sah_results[i].num_signals, results[j].id,
sah_results[j].num_signals
);
@@ -245,7 +245,7 @@ int validate_plural(vector<RESULT>& results, vector<SAH_RESULT>& sah_results, in
handle_cuda_notvalid(results[i], results[j]); // temporary for cuda debugging
log_messages.printf(
SCHED_MSG_LOG::MSG_DEBUG,
- "[RESULT#%lld (%d signals) and RESULT#%lld (%d signals)] are NOT strongly similar\n",
+ "[RESULT#%ld (%d signals) and RESULT#%ld (%d signals)] are NOT strongly similar\n",
results[i].id, sah_results[i].num_signals, results[j].id,
sah_results[j].num_signals
);
@@ -270,7 +270,7 @@ int validate_plural(vector<RESULT>& results, vector<SAH_RESULT>& sah_results, in
validate_stats.nweak++;
log_messages.printf(
SCHED_MSG_LOG::MSG_DEBUG,
- "[CANONICAL RESULT#%lld (%d signals) and RESULT#%lld (%d signals)] ARE weakly similar\n",
+ "[CANONICAL RESULT#%ld (%d signals) and RESULT#%ld (%d signals)] ARE weakly similar\n",
results[i].id, sah_results[i].num_signals, results[k].id,
sah_results[k].num_signals
);
@@ -278,7 +278,7 @@ int validate_plural(vector<RESULT>& results, vector<SAH_RESULT>& sah_results, in
} else {
log_messages.printf(
SCHED_MSG_LOG::MSG_DEBUG,
- "[CANONICAL RESULT#%lld (%d signals) and RESULT#%lld (%d signals)] are NOT weakly similar\n",
+ "[CANONICAL RESULT#%ld (%d signals) and RESULT#%ld (%d signals)] are NOT weakly similar\n",
results[i].id, sah_results[i].num_signals, results[k].id,
sah_results[k].num_signals
);
@@ -354,14 +354,14 @@ int check_pair(RESULT& new_result, RESULT& canonical, bool& retry) {
log_messages.printf(
SCHED_MSG_LOG::MSG_DEBUG,
- "[RESULT#%lld] getting new result file %s\n",
+ "[RESULT#%ld] getting new result file %s\n",
new_result.id, new_result.name
);
retval = get_result_file((RESULT&)new_result, sah_new);
if (retval) {
log_messages.printf(
SCHED_MSG_LOG::MSG_DEBUG,
- "[RESULT#%lld] read/parse of %s FAILED with retval %d\n",
+ "[RESULT#%ld] read/parse of %s FAILED with retval %d\n",
new_result.id, new_result.name, retval
);
// Someone is trying to process v7 workunits with v6
@@ -372,7 +372,7 @@ int check_pair(RESULT& new_result, RESULT& canonical, bool& retry) {
retval = 0;
log_messages.printf(
SCHED_MSG_LOG::MSG_DEBUG,
- "[RESULT#%lld] is from an invalid app_version\n", new_result.id
+ "[RESULT#%ld] is from an invalid app_version\n", new_result.id
);
goto return_retval;
}
@@ -392,14 +392,14 @@ int check_pair(RESULT& new_result, RESULT& canonical, bool& retry) {
log_messages.printf(
SCHED_MSG_LOG::MSG_DEBUG,
- "[RESULT#%lld] getting canonical result file %s\n",
+ "[RESULT#%ld] getting canonical result file %s\n",
canonical.id, canonical.name
);
retval = get_result_file((RESULT &)canonical, sah_canonical);
if (retval) {
log_messages.printf(
SCHED_MSG_LOG::MSG_DEBUG,
- "[RESULT#%lld] read/parse of %s FAILED with retval %d\n",
+ "[RESULT#%ld] read/parse of %s FAILED with retval %d\n",
canonical.id, canonical.name, retval
);
// A directory problem may be transient.
@@ -419,14 +419,14 @@ int check_pair(RESULT& new_result, RESULT& canonical, bool& retry) {
if (sah_canonical.weakly_similar(sah_new)) {
log_messages.printf(
SCHED_MSG_LOG::MSG_DEBUG,
- "[CANONICAL RESULT#%lld (%d signals) and NEW RESULT#%lld (%d signals)] ARE weakly similar\n",
+ "[CANONICAL RESULT#%ld (%d signals) and NEW RESULT#%ld (%d signals)] ARE weakly similar\n",
canonical.id, sah_canonical.num_signals, new_result.id, sah_new.num_signals
);
new_result.validate_state = VALIDATE_STATE_VALID;
} else {
log_messages.printf(
SCHED_MSG_LOG::MSG_DEBUG,
- "[CANONICAL RESULT#%lld (%d signals) and NEW RESULT#%lld (%lld signals)] are NOT weakly similar\n",
+ "[CANONICAL RESULT#%ld (%d signals) and NEW RESULT#%ld (%d signals)] are NOT weakly similar\n",
canonical.id, sah_canonical.num_signals, new_result.id, sah_new.num_signals
);
new_result.validate_state = VALIDATE_STATE_INVALID;
@@ -449,10 +449,10 @@ void check_overflow_result(RESULT& r) {
if (strstr(r.stderr_out, "result_overflow")) {
r.runtime_outlier = true;
- result_flags = (int)r.opaque;
+ result_flags = (long)r.opaque;
result_flags |= RESULT_FLAG_OVERFLOW;
r.opaque = (double)result_flags;
- log_messages.printf(SCHED_MSG_LOG::MSG_DEBUG, "[RESULT#%lld] is an OVERFLOW result\n", r.id);
+ log_messages.printf(SCHED_MSG_LOG::MSG_DEBUG, "[RESULT#%ld] is an OVERFLOW result\n", r.id);
}
}
@@ -477,7 +477,7 @@ int log_cuda_result(RESULT& result, double& granted_credit) {
if (!log_fp) {
log_messages.printf(
SCHED_MSG_LOG::MSG_CRITICAL,
- "[RESULT#%lld] cannot open cuda_result_log\n",
+ "[RESULT#%ld] cannot open cuda_result_log\n",
result.id
);
exit(1);
@@ -491,14 +491,14 @@ int log_cuda_result(RESULT& result, double& granted_credit) {
if (p == NULL) {
log_messages.printf(
SCHED_MSG_LOG::MSG_DEBUG,
- "[RESULT#%lld] is not a cuda result\n",
+ "[RESULT#%ld] is not a cuda result\n",
result.id
);
return(0); // not a cuda result - nothing more to do
} else {
log_messages.printf(
SCHED_MSG_LOG::MSG_DEBUG,
- "[RESULT#%lld] is a cuda result\n",
+ "[RESULT#%ld] is a cuda result\n",
result.id
);
return(1); // is a cuda result - hack - we will remove this entire routine later
@@ -517,16 +517,16 @@ int log_cuda_result(RESULT& result, double& granted_credit) {
log_time = time(NULL);
- retval = fprintf(log_fp, "%d %d %d %d %d %d %lf %lf %s\n",
- log_time, result.received_time, result.id,
+ retval = fprintf(log_fp, "%ld %ld %ld %ld %ld %ld %lf %lf %s\n",
+ log_time, (time_t)result.received_time, result.id,
result.hostid, result.userid,
result.teamid, result.claimed_credit,
granted_credit, device_str);
if (retval < 0) {
log_messages.printf(
SCHED_MSG_LOG::MSG_CRITICAL,
- "[RESULT#%lld] cannot write to cuda_result_log : %s\n",
- strerror(errno)
+ "[RESULT#%ld] cannot write to cuda_result_log : %s\n",
+ result.id,strerror(errno)
);
}
@@ -574,7 +574,7 @@ int handle_cuda_notvalid(RESULT& result_1, RESULT& result_2) {
}
log_messages.printf(
SCHED_MSG_LOG::MSG_DEBUG,
- "[%s RESULT#%lld and %s RESULT#%lld] do not covalidate\n",
+ "[%s RESULT#%ld and %s RESULT#%ld] do not covalidate\n",
result_1_cuda_str, result_1.id, result_2_cuda_str, result_2.id
);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-boinc/boinc-app-seti.git
More information about the pkg-boinc-commits
mailing list