]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/BASE/AliHLTConfiguration.h
Enlarged cut on cluster matching in AliITSVertexerCosmics. Needed to improve efficien...
[u/mrichter/AliRoot.git] / HLT / BASE / AliHLTConfiguration.h
index 5a0d4e459f4b26ff82a1072bd7e5bb0adc3c7f09..88ed254a3b0ff548b944a6bb2d1b3235bd37d961 100644 (file)
@@ -67,9 +67,12 @@ class AliHLTConfiguration : public TObject, public AliHLTLogging {
    * @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 */
@@ -110,6 +113,16 @@ class AliHLTConfiguration : public TObject, public AliHLTLogging {
    */
   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.
@@ -177,6 +190,31 @@ class AliHLTConfiguration : public TObject, public AliHLTLogging {
    */
   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:
   
 
@@ -190,11 +228,9 @@ class AliHLTConfiguration : public TObject, public AliHLTLogging {
   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
@@ -222,6 +258,9 @@ class AliHLTConfiguration : public TObject, public AliHLTLogging {
   /** 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