Skip to content

Commit

Permalink
Added support for multiple input folders
Browse files Browse the repository at this point in the history
  • Loading branch information
SENSS committed May 23, 2023
1 parent bc453de commit f87a7a4
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 88 deletions.
12 changes: 5 additions & 7 deletions amonsenss.cc
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,6 @@ enum dim{vol, sym};
double* stats[NUMB][2][3][2];
double* cusum[NUMB][2];

string label;

// Parameters from as.config
map<string,double> parms;

Expand Down Expand Up @@ -1897,7 +1895,7 @@ int main (int argc, char *argv[])
out.close();

char c, buf[32];
char *file_in = NULL;
vector<string> file_in;
bool stream_in = false;
char *startfile = NULL, *endfile = NULL;
char* format;
Expand Down Expand Up @@ -1925,8 +1923,7 @@ int main (int argc, char *argv[])
stream_in = true;
break;
case 'r':
file_in = strdup(optarg);
label = file_in;
file_in.push_back(strdup(optarg));
break;
case 'f':
sim_filter = true;
Expand All @@ -1947,7 +1944,7 @@ int main (int argc, char *argv[])
break;
}
}
if (file_in == NULL && stream_in == 0)
if (file_in.empty() && stream_in == 0)
{
cerr<<"You must specify an input folder, which holds Netflow records\n";
exit(-1);
Expand Down Expand Up @@ -1984,7 +1981,8 @@ int main (int argc, char *argv[])
inputs.clear();
newfiles.clear();
struct stat s;
inputs.push_back(file_in);
for (auto it=file_in.begin(); it != file_in.end(); it++)
inputs.push_back(*it);
int i = 0;
// Recursively read if there are several directories that hold the files
while(i < inputs.size())
Expand Down
162 changes: 81 additions & 81 deletions autom4te.cache/requests
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was generated by Autom4te Sun Aug 20 18:29:13 UTC 2017.
# This file was generated by Autom4te Sun Aug 20 23:09:08 UTC 2017.
# It contains the lists of macros which have been traced.
# It can be safely removed.

Expand Down Expand Up @@ -34,47 +34,47 @@
'configure.ac'
],
{
'_AM_DEPENDENCIES' => 1,
'AC_CONFIG_MACRO_DIR_TRACE' => 1,
'AM_INIT_AUTOMAKE' => 1,
'AM_PROG_INSTALL_SH' => 1,
'AU_DEFUN' => 1,
'_AC_AM_CONFIG_HEADER_HOOK' => 1,
'm4_pattern_allow' => 1,
'_AM_SUBST_NOTMAKE' => 1,
'm4_pattern_forbid' => 1,
'AM_SET_DEPDIR' => 1,
'AM_AUX_DIR_EXPAND' => 1,
'AM_RUN_LOG' => 1,
'AM_SUBST_NOTMAKE' => 1,
'AM_PROG_INSTALL_SH' => 1,
'AM_SANITY_CHECK' => 1,
'_m4_warn' => 1,
'AM_SILENT_RULES' => 1,
'_AM_AUTOCONF_VERSION' => 1,
'_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
'AM_MAKE_INCLUDE' => 1,
'm4_include' => 1,
'_AM_PROG_TAR' => 1,
'AM_MISSING_PROG' => 1,
'AC_DEFUN_ONCE' => 1,
'AM_AUTOMAKE_VERSION' => 1,
'm4_pattern_forbid' => 1,
'AM_MISSING_PROG' => 1,
'AC_CONFIG_MACRO_DIR_TRACE' => 1,
'_AM_PROG_TAR' => 1,
'AM_DEP_TRACK' => 1,
'_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
'AM_CONDITIONAL' => 1,
'AM_PROG_CC_C_O' => 1,
'AM_PROG_INSTALL_STRIP' => 1,
'_AM_CONFIG_MACRO_DIRS' => 1,
'_AM_SET_OPTIONS' => 1,
'AM_SET_DEPDIR' => 1,
'm4_pattern_allow' => 1,
'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1,
'_AC_AM_CONFIG_HEADER_HOOK' => 1,
'include' => 1,
'AC_CONFIG_MACRO_DIR' => 1,
'AM_SET_LEADING_DOT' => 1,
'_AM_SET_OPTION' => 1,
'AM_INIT_AUTOMAKE' => 1,
'_m4_warn' => 1,
'AC_DEFUN' => 1,
'AC_DEFUN_ONCE' => 1,
'AM_MISSING_HAS_RUN' => 1,
'AM_PROG_CC_C_O' => 1,
'_AM_SUBST_NOTMAKE' => 1,
'include' => 1,
'_AM_PROG_CC_C_O' => 1,
'_AM_IF_OPTION' => 1,
'AM_DEP_TRACK' => 1,
'AM_CONDITIONAL' => 1,
'_AM_MANGLE_OPTION' => 1,
'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
'_AM_SET_OPTION' => 1,
'AM_PROG_INSTALL_STRIP' => 1,
'AU_DEFUN' => 1
'AM_MAKE_INCLUDE' => 1,
'AM_SANITY_CHECK' => 1,
'AM_SILENT_RULES' => 1,
'_AM_MANGLE_OPTION' => 1,
'_AM_DEPENDENCIES' => 1,
'_AM_IF_OPTION' => 1,
'_AM_PROG_CC_C_O' => 1,
'AM_SUBST_NOTMAKE' => 1,
'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1,
'_AM_AUTOCONF_VERSION' => 1,
'm4_include' => 1,
'AM_MISSING_HAS_RUN' => 1,
'_AM_SET_OPTIONS' => 1
}
], 'Autom4te::Request' ),
bless( [
Expand All @@ -89,66 +89,66 @@
'configure.ac'
],
{
'AC_PROG_LIBTOOL' => 1,
'AC_FC_PP_SRCEXT' => 1,
'include' => 1,
'_AM_SUBST_NOTMAKE' => 1,
'AM_EXTRA_RECURSIVE_TARGETS' => 1,
'AC_CANONICAL_TARGET' => 1,
'm4_pattern_forbid' => 1,
'AC_CANONICAL_BUILD' => 1,
'AC_FC_PP_DEFINE' => 1,
'AM_POT_TOOLS' => 1,
'AM_GNU_GETTEXT' => 1,
'AM_PROG_F77_C_O' => 1,
'AM_CONDITIONAL' => 1,
'AC_INIT' => 1,
'AM_MAINTAINER_MODE' => 1,
'm4_pattern_allow' => 1,
'_AM_COND_ENDIF' => 1,
'm4_pattern_forbid' => 1,
'AC_FC_PP_SRCEXT' => 1,
'AC_CONFIG_AUX_DIR' => 1,
'AM_CONDITIONAL' => 1,
'include' => 1,
'AC_CANONICAL_TARGET' => 1,
'AM_PATH_GUILE' => 1,
'AM_AUTOMAKE_VERSION' => 1,
'_AM_COND_ELSE' => 1,
'LT_SUPPORTED_TAG' => 1,
'AM_NLS' => 1,
'AM_ENABLE_MULTILIB' => 1,
'AH_OUTPUT' => 1,
'AM_SILENT_RULES' => 1,
'AC_SUBST' => 1,
'AC_CANONICAL_HOST' => 1,
'AM_PROG_LIBTOOL' => 1,
'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
'AM_AUTOMAKE_VERSION' => 1,
'm4_include' => 1,
'AC_FC_PP_DEFINE' => 1,
'AH_OUTPUT' => 1,
'_AM_MAKEFILE_INCLUDE' => 1,
'LT_SUPPORTED_TAG' => 1,
'AM_EXTRA_RECURSIVE_TARGETS' => 1,
'AM_INIT_AUTOMAKE' => 1,
'AM_PROG_MOC' => 1,
'AC_FC_FREEFORM' => 1,
'AC_CONFIG_SUBDIRS' => 1,
'AM_PROG_AR' => 1,
'AC_CANONICAL_SYSTEM' => 1,
'AM_PROG_CXX_C_O' => 1,
'AM_PROG_CC_C_O' => 1,
'AC_REQUIRE_AUX_FILE' => 1,
'AM_PATH_GUILE' => 1,
'AC_CANONICAL_BUILD' => 1,
'm4_sinclude' => 1,
'AM_PROG_MKDIR_P' => 1,
'AC_FC_SRCEXT' => 1,
'LT_INIT' => 1,
'AC_CONFIG_LIBOBJ_DIR' => 1,
'AC_CONFIG_AUX_DIR' => 1,
'AM_POT_TOOLS' => 1,
'AC_INIT' => 1,
'AM_MAKEFILE_INCLUDE' => 1,
'AC_DEFINE_TRACE_LITERAL' => 1,
'AM_PROG_MKDIR_P' => 1,
'_LT_AC_TAGCONFIG' => 1,
'_AM_COND_IF' => 1,
'AM_SILENT_RULES' => 1,
'LT_INIT' => 1,
'AC_CONFIG_LINKS' => 1,
'AM_GNU_GETTEXT' => 1,
'AC_CONFIG_FILES' => 1,
'AC_LIBSOURCE' => 1,
'AM_PROG_FC_C_O' => 1,
'sinclude' => 1,
'AC_SUBST_TRACE' => 1,
'AC_CANONICAL_HOST' => 1,
'AM_PROG_AR' => 1,
'AC_FC_SRCEXT' => 1,
'm4_sinclude' => 1,
'm4_pattern_allow' => 1,
'AM_PROG_CC_C_O' => 1,
'AC_DEFINE_TRACE_LITERAL' => 1,
'_AM_COND_ENDIF' => 1,
'_m4_warn' => 1,
'AC_REQUIRE_AUX_FILE' => 1,
'AC_CONFIG_FILES' => 1,
'AC_CONFIG_HEADERS' => 1,
'AM_NLS' => 1,
'_AM_COND_IF' => 1,
'AC_LIBSOURCE' => 1,
'LT_CONFIG_LTDL_DIR' => 1,
'AC_SUBST_TRACE' => 1,
'AM_PROG_FC_C_O' => 1,
'sinclude' => 1,
'AM_PROG_MOC' => 1,
'AC_FC_FREEFORM' => 1,
'_AM_MAKEFILE_INCLUDE' => 1,
'AM_XGETTEXT_OPTION' => 1
'AM_PROG_LIBTOOL' => 1,
'AC_CANONICAL_SYSTEM' => 1,
'AM_XGETTEXT_OPTION' => 1,
'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
'AM_ENABLE_MULTILIB' => 1,
'm4_include' => 1,
'AM_MAKEFILE_INCLUDE' => 1,
'AC_PROG_LIBTOOL' => 1,
'AM_PROG_CXX_C_O' => 1
}
], 'Autom4te::Request' )
);
Expand Down

0 comments on commit f87a7a4

Please sign in to comment.