/** destructor */
virtual ~AliHLTComponentHandler();
+ /**
+ * Library mode.
+ * - kDynamic: library can be unloaded (unload forced at termination of the
+ * handler
+ * - kStatic: library persistent, once loaded it stays
+ */
+ enum TLibraryMode {kDynamic, kStatic};
+
/**
* Set the environment for the HLT framework.
* The environment mainly consists of function pointers for the integration
*/
void SetEnvironment(AliHLTComponentEnvironment* pEnv);
+ /**
+ * Set library mode.
+ * The mode effects all loaded libraries until another mode is set.
+ * @param mode persistent library or not
+ * @param previous mode
+ */
+ TLibraryMode SetLibraryMode(TLibraryMode mode);
+
/**
* Load a component shared library.
* The component library needs to be loaded from the ComponentHanler in order
* @param bActivateAgents activate agents after loading (@ref ActivateAgents)
* @return 0 if succeeded, neg. error code if failed
*/
- int LoadLibrary( const char* libraryPath, int bActivateAgents=1 );
+ int LoadLibrary( const char* libraryPath, int bActivateAgents=1);
/**
* Find a symbol in a dynamically loaded library.
void* fHandle; //! transient
/** name of the library, casted to TString* before use */
void* fName; //! transient
+ /** library mode: kStatic means never unloaded */
+ TLibraryMode fMode; //! transient
};
/**
AliHLTComponentEnvironment fEnvironment; // see above
/** list of owned components, deleted at termination of the handler */
vector<AliHLTComponent*> fOwnedComponents; // see above
+ /** library mode effects all loaded libraries until a new mode is set */
+ TLibraryMode fLibraryMode; // see above
ClassDef(AliHLTComponentHandler, 0);