]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/BASE/AliHLTMisc.h
Enlarged cut on cluster matching in AliITSVertexerCosmics. Needed to improve efficien...
[u/mrichter/AliRoot.git] / HLT / BASE / AliHLTMisc.h
index 17cf9e93a27b37db493adeb4e1dfd8aa6af1844f..d33cef3587bbb90df235d9904b8624d75b5beb1f 100644 (file)
@@ -1,4 +1,5 @@
-// @(#) $Id$
+//-*- Mode: C++ -*-
+// $Id$
 
 #ifndef ALIHLTMISC_H
 #define ALIHLTMISC_H
@@ -6,12 +7,42 @@
 //* ALICE Experiment at CERN, All rights reserved.                         *
 //* See cxx source for full Copyright notice                               */
 
-/** @file   AliHLTMisc.h
-    @author Matthias Richter
-    @date   
-    @brief  Definition of various glue functions implemented in dynamically
-            loaded libraries
-*/
+/// @file   AliHLTMisc.h
+/// @author Matthias Richter
+/// @date   
+/// @brief  Definition of various glue functions implemented in dynamically
+///         loaded libraries
+
+#include "TObject.h"
+#include "AliHLTStdIncludes.h"
+
+class AliCDBManager;
+class AliCDBEntry;
+class AliHLTComponentDataType;
+
+class AliHLTMisc : public TObject {
+ public:
+  AliHLTMisc();
+  ~AliHLTMisc();
+
+  template<class T>
+  static T* LoadInstance(const T* dummy, const char* classname, const char* library);
+
+  static AliHLTMisc& Instance();
+
+  virtual int InitCDB(const char* cdbpath);
+
+  virtual int SetCDBRunNo(int runNo);
+
+  virtual AliCDBEntry* LoadOCDBEntry(const char* path, int runNo=-1, int version = -1, int subVersion = -1);
+
+  virtual TObject* ExtractObject(AliCDBEntry* entry);
+
+ private:
+  static AliHLTMisc* fgInstance;
+
+  ClassDef(AliHLTMisc, 0)
+};
 
 #define ALIHLTMISC_LIBRARY "libHLTrec.so"
 #define ALIHLTMISC_INIT_CDB "AliHLTMiscInitCDB"
@@ -26,7 +57,9 @@ extern "C" {
    * The method is used from the C wrapper interface utilized by the  on-line
    * framework. The path of the (H)CDB is set to the specified path.<br>
    * When running from AliRoot, the CDB path is set in the startup of the
-   * reconstruction.
+   * reconstruction.<br>
+   * If cdbpath is nil or empty and the CDB is not already initialized, the
+   * CDB storage is set to local://$ALICE_ROOT/OCDB and the run no to 0.
    * @param cdbpath     path to the CDB
    * @return neg. error code if failed
    * @note function implemented in libHLTrec
@@ -34,7 +67,6 @@ extern "C" {
   int AliHLTMiscInitCDB(const char* cdbpath);
   typedef int (*AliHLTMiscInitCDB_t)(const char* cdbpath);
 
-
   /**
    * Init the Run no for the CDB access.
    * @param runNo       the run no
@@ -47,4 +79,8 @@ extern "C" {
 #ifdef __cplusplus
 }
 #endif
+
+// direct printout of data type struct
+ostream  &operator<<(ostream &str, const AliHLTComponentDataType&);
+
 #endif //ALIHLTMISC_H