+
//-*- Mode: C++ -*-
// @(#) $Id$
// or
// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
*/
-
-#include "AliHLTLogging.h"
+#include "AliHLTDataTypes.h"
+#include "TObject.h" // for ClassDef/Imp
class AliHLTHOMERReader;
class AliHLTHOMERWriter;
* AliHLTMonitoringReader* pReader=manager.OpenReader(localhost, 23000);
*
* // read next event, timeout 5s
- * while (pReader && pReader->ReadNextEvent(5000000)) {
+ * while (pReader && pReader->ReadNextEvent(5000000)==0) {
* unsigned long count=pReader->GetBlockCnt();
+ * gSystem->Sleep(5);
* ...
* }
*
* manager.DeleteReader(pReader);
* </pre>
*
- * The manager does not not provide methods to create a HOMER reader on
+ * The manager does not provide methods to create a HOMER reader on
* basis of shared memory. This is most likely a depricated functionality,
- * although kept for the sake of completeness.
+ * although kept for the sake of completeness. However, at some point it
+ * might become useful. Please notify the developers if you need that
+ * functionality.
+ *
+ * @ingroup alihlt_homer
*/
-class AliHLTHOMERLibManager : public AliHLTLogging {
+class AliHLTHOMERLibManager {
public:
/** standard constructor */
AliHLTHOMERLibManager();
* Load HOMER library dynamically and create object working on the provided
* buffer.
*/
- AliHLTHOMERReader* OpenReader(const AliHLTUInt8_t* pBuffer, int size);
+ AliHLTHOMERReader* OpenReaderBuffer(const AliHLTUInt8_t* pBuffer, int size);
/**
* Delete a HOMER reader.
*/
int LoadHOMERLibrary();
+ /**
+ * Unloads the HOMER library.
+ */
+ int UnloadHOMERLibrary();
+
/** status of the loading of the HOMER library */
int fLibraryStatus; //!transient
/** entry in the HOMER library */
- void* fFctCreateReaderFromTCPPort; //!transient
+ void (*fFctCreateReaderFromTCPPort)(); //!transient
/** entry in the HOMER library */
- void* fFctCreateReaderFromTCPPorts; //!transient
+ void (*fFctCreateReaderFromTCPPorts)(); //!transient
/** entry in the HOMER library */
- void* fFctCreateReaderFromBuffer; //!transient
+ void (*fFctCreateReaderFromBuffer)(); //!transient
/** entry in the HOMER library */
- void* fFctDeleteReader; //!transient
+ void (*fFctDeleteReader)(); //!transient
/** entry in the HOMER library */
- void* fFctCreateWriter; //!transient
+ void (*fFctCreateWriter)(); //!transient
/** entry in the HOMER library */
- void* fFctDeleteWriter; //!transient
+ void (*fFctDeleteWriter)(); //!transient
+
+ /** Indicates the library that was actually (and if) loaded in LoadHOMERLibrary(). */
+ const char* fLoadedLib; //!transient
+
+ static const char* fgkLibraries[]; /// List of libraries to try and load.
+ static int fgkLibRefCount[]; /// The library reference count to control when to unload the library.
ClassDef(AliHLTHOMERLibManager, 0)
};