Commit b26c9f61 authored by John Douglas Veitch's avatar John Douglas Veitch
Browse files

Attempt to work with StringVector

parent 79612411
......@@ -117,7 +117,8 @@ class LALInferenceCBCWrapper(object):
List of command line arguments that will be used to
set up the lalinference state. (similar to argv)
"""
procParams=li.ParseCommandLine(len(argv),argv)
procParams=li.ParseStringVector(lal.CreateStringVector(*argv))
self.state = li.InitRunState(procParams)
self.state.commandLine=procParams
li.InitCBCThreads(self.state,1)
......
......@@ -1831,12 +1831,19 @@ void LALInferenceParseCharacterOptionString(char *input, char **strings[], UINT4
}
ProcessParamsTable *LALInferenceParseCommandLine(int argc, char *argv[])
{
return LALInferenceParseStringVector(XLALCreateStringVector(argv));
}
ProcessParamsTable *LALInferenceParseStringVector(LALStringVector *arglist)
/* parse command line and set up & fill in 'ProcessParamsTable' linked list. */
/* If no command line arguments are supplied, the 'ProcessParamsTable' still contains */
/* one empty entry. */
{
int i, state=1;
int argc = arglist->count;
int dbldash;
char *argv[] = arglist->data;
ProcessParamsTable *head, *ptr=NULL;
/* always (even for argc==1, i.e. no arguments) put one element in list: */
head = (ProcessParamsTable*) XLALCalloc(1, sizeof(ProcessParamsTable));
......
......@@ -765,6 +765,9 @@ void LALInferenceParseCharacterOptionString(char *input, char **strings[], UINT4
/** Return a ProcessParamsTable from the command line arguments */
ProcessParamsTable *LALInferenceParseCommandLine(int argc, char *argv[]);
/** Return a ProcessParamsTrable from a string vector */
ProcessParamsTable *LALInferenceParseStringVector(LALStringVector *arglist)
/** Return a ProcessParamsTable from the command line arguments (SWIG version) */
ProcessParamsTable *LALInferenceParseCommandLineStringVector(LALStringVector *args);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment