]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/BASE/AliHLTComponentHandler.h
- singleton functionality added for component and configuration handler
[u/mrichter/AliRoot.git] / HLT / BASE / AliHLTComponentHandler.h
index d82e55cbfb4ecfaa1f0014b69b74acc0996c4e3b..a06839430088f6160b53dcf6e5cffc6b1df3070a 100644 (file)
@@ -45,6 +45,18 @@ class AliHLTComponentHandler : public AliHLTLogging {
   /** destructor */
   virtual ~AliHLTComponentHandler();
 
+  /**
+   * Create an instance from the global sigleton.
+   * Instance has to be destroyed by the Destroy function
+   */
+  static AliHLTComponentHandler* CreateHandler();
+
+  /**
+   * Destroy an instance of the global singleton retrieved by
+   * AliHLTComponentHandler::CreateHandler()
+   */
+  int Destroy();
+
   /**
    * Library mode.
    * - kDynamic: library can be unloaded (unload forced at termination of the
@@ -308,7 +320,12 @@ class AliHLTComponentHandler : public AliHLTLogging {
   /** library mode effects all loaded libraries until a new mode is set */
   TLibraryMode fLibraryMode;                                       // see above 
 
-  ClassDef(AliHLTComponentHandler, 0);
+  /** the global singleton */
+  static AliHLTComponentHandler* fgpInstance;                      //!transient
+  /** number of used instances of the global singleton */
+  static int fgNofInstances;                                       //!transient 
+
+  ClassDef(AliHLTComponentHandler, 1);
 
 };
 #endif