* @param component component id
* @param sources blank separated list of source configuration ids
* @param arguments argument string passed to the component at initialization
+ * @param bufsize size of the output buffer in byte, the string can contain a
+ * number prepended by a unit, e.g. 1M, allowed units 'k' and 'M'
*/
AliHLTConfiguration(const char* id, const char* component,
- const char* sources, const char* arguments);
+ const char* sources, const char* arguments,
+ const char* bufsize=NULL);
/** copy constructor */
AliHLTConfiguration(const AliHLTConfiguration& src);
/** assignment op */
*/
const char* GetComponentID() const {return fComponent;}
+ /**
+ * Return the source string.
+ */
+ const char* GetSourceSettings() const {return fStringSources;}
+
+ /**
+ * Return the argument string.
+ */
+ const char* GetArgumentSettings() const {return fArguments;}
+
/**
* Print status info.
* Short summary on id, component, sources and unresolved sources.
*/
int GetArguments(const char*** pArgv);
+ /**
+ * Get output buffer size.
+ * @return size in byte or -1 if not specified
+ */
+ int GetOutputBufferSize() const {return fBufferSize;}
+
+ /**
+ * Two configurations are considered equal if all properties match
+ */
+ bool operator==(const AliHLTConfiguration& c) const {
+ return (fID==c.fID) && (fComponent==c.fComponent) && (fStringSources==c.fStringSources) && (fArguments==c.fArguments);
+ }
+ bool operator!=(const AliHLTConfiguration& c) const {
+ return !(*this==c);
+ }
+
+ /**
+ * Helper function to build a vector from an argument string.
+ * The function allocates memory for each token. The caller is responsible
+ * for cleaning the strings recursively.
+ * @param arg pointer to argument string
+ * @param argList target to receive the argument list
+ */
+ static int InterpreteString(const char* arg, vector<char*>& argList);
+
protected:
int ExtractArguments();
/**
- * Helper function to build a vector from an argument string
- * @param arg pointer to argument string
- * @param argList target to receive the argument list
+ * Convert buffer size string to number
*/
- int InterpreteString(const char* arg, vector<char*>& argList);
+ int ConvertSizeString(const char* strSize) const;
/** id of this configuration */
TString fID; // see above
/** argument array */
char** fArgv; // see above
+ /** size of the output buffer */
+ int fBufferSize; // see above
+
/** the instance of the global configuration handler */
static AliHLTConfigurationHandler* fgConfigurationHandler; //! transient