2 // @(#) $Id: AliRawHLTManager.h 23318 2008-01-14 12:43:28Z hristov $
4 #ifndef ALIRAWHLTMANAGER_H
5 #define ALIRAWHLTMANAGER_H
6 //* This file is property of and copyright by the ALICE HLT Project *
7 //* ALICE Experiment at CERN, All rights reserved. *
8 //* See cxx source for full Copyright notice *
10 /** @file AliRawHLTManager.h
11 @author Matthias Richter
13 @brief dynamic generation of HLT RAW readers and streams
16 // see below for class documentation
18 // refer to README to build package
20 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
26 typedef AliRawReader* (*AliRawReaderHLTCreateInstance_t)(AliRawReader* pParentReader, const char* options);
30 * @class AliRawHLTManager
31 * The class gives dynamic access to creater methods for HLT RAW readers and
32 * streams without any library dependencies to HLT libraries.
34 class AliRawHLTManager {
37 virtual ~AliRawHLTManager();
40 * Create an instance of the AliRawReaderHLT.
41 * The AliRawReaderHLT instance needs the parent RAW reader and a list
42 * of detectors for which it should access data from the HLT stream.
44 static AliRawReader* CreateRawReaderHLT(AliRawReader* pParent, const char* detectors);
47 * Create an instance of a RAW stream.
48 * There is no common base class for RAW streams due to the different nature of the
49 * detectors and the data. The least common class is the TObject. The calling code
50 * should check if the right class has been created by
52 * TObject pObject=AliRawHLTManager::CreateRawStream("MyClass");
53 * MyClass* pClass=dynamic_cast<MyClass*>(pObject)
56 * \b NOTE: The function redirects the request to the HLT framework, a handler
57 * to actually create the RAW stream must be implemented in the corresponding
60 static TObject* CreateRawStream(const char* className);
63 enum {kUnloaded=0, kLoaded, kUnavailable};
66 * Load the HLT interface library
68 static int LoadLibrary();
70 /** status of the loading of the HOMER library */
71 static int fLibraryStatus; //!transient
73 /** entry in the HOMER library */
74 static AliRawReaderHLTCreateInstance_t fFctCreateRawReaderHLT; //!transient
76 /** entry in the HOMER library */
77 static void* fFctCreateRawStream; //!transient
79 ClassDef(AliRawHLTManager, 0)
82 // those definitions have been copied one to one from rec/AliRawReaderHLT.h
83 // to avoid including this header file
84 #define ALIHLTREC_LIBRARY "libHLTrec.so"
85 #define ALIHLTREC_LIBRARY_VERSION 0
86 #define ALIRAWREADERHLT_CREATE_INSTANCE "AliRawReaderHLTCreateInstance"
89 #endif //ALIRAWHLTMANAGER_H