]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/BASE/AliHLTMisc.h
ALIROOT-5433 Transition to CDHv3 in HLT
[u/mrichter/AliRoot.git] / HLT / BASE / AliHLTMisc.h
index 02fb23920f177399550eb88de68258ac8ce70423..86657be3298c832df551836e63287d8900f0d908 100644 (file)
@@ -3,7 +3,7 @@
 
 #ifndef ALIHLTMISC_H
 #define ALIHLTMISC_H
-//* This file is property of and copyright by the ALICE HLT Project        * 
+//* This file is property of and copyright by the                          * 
 //* ALICE Experiment at CERN, All rights reserved.                         *
 //* See cxx source for full Copyright notice                               */
 
 class AliCDBManager;
 class AliCDBEntry;
 class AliRawReader;
-class AliHLTComponentDataType;
+struct AliHLTComponentDataType;
 class AliHLTGlobalTriggerDecision;
 class TMap;
 
+/**
+ * @class AliHLTMisc
+ * Abstract interface of various glue functions implemented in dynamically
+ * loaded libraries.
+ *
+ * The HLT base library is independent from AliRoot and binds AliRoot
+ * functionality via dynamic libraries. The provided methods can be used
+ * from any module library without introducing additional dependencies.
+ */
 class AliHLTMisc : public TObject {
  public:
   AliHLTMisc();
   ~AliHLTMisc();
 
+  /// dynamically load a class from a library
   template<class T>
   static T* LoadInstance(const T* dummy, const char* classname, const char* library=NULL);
 
+  /// the global instance of the interface implementation
   static AliHLTMisc& Instance();
 
+  /// init the CDB patch
   virtual int InitCDB(const char* cdbpath);
 
+  /// init the CDB run number
   virtual int SetCDBRunNo(int runNo);
+  /// get the run number from CDB manager
   virtual int GetCDBRunNo() const;
 
   /// Load an OCDB object
-  virtual AliCDBEntry* LoadOCDBEntry(const char* path, int runNo=-1, int version = -1, int subVersion = -1) const;
+  virtual AliCDBEntry* LoadOCDBEntry(const char* path, int runNo=-1) const;
 
   // Extract the TObject instance from the CDB object
   virtual TObject* ExtractObject(AliCDBEntry* entry) const;
@@ -53,11 +67,12 @@ class AliHLTMisc : public TObject {
   ///  value : auxiliary object - short description
   virtual int CheckOCDBEntries(const TMap* const pMap) const;
 
+  /// init the global magnetic field
   virtual int InitMagneticField() const;
 
   /// extract the triggermask from the rawreader
   /// NOTE: not to be used in the online system
-  virtual AliHLTUInt64_t GetTriggerMask(AliRawReader* rawReader) const;
+  virtual AliHLTTriggerMask_t GetTriggerMask(AliRawReader* rawReader) const;
 
   /// extract the timestamp from the rawreader
   /// NOTE: not to be used in the online system, use AliHLTComponent::GetTimeStamp()
@@ -83,6 +98,12 @@ class AliHLTMisc : public TObject {
   /// Init streamer info for a collection of classes
   virtual int InitStreamerInfos(TObjArray* pSchemas) const;
 
+  /// merge streamer info entries from source array to target array
+  /// add all existing infos if not existing in the current one, or having
+  /// different class version
+  /// return 1 if target array has been changed
+  virtual int MergeStreamerInfo(TObjArray* tgt, const TObjArray* src, int iVerbosity=0) const;
+
   /// set the online mode flag of AliESDtrack
   virtual void SetAliESDtrackOnlineModeFlag(bool mode) const;
 
@@ -100,7 +121,7 @@ class AliHLTMisc : public TObject {
   };
 
  private:
-  static AliHLTMisc* fgInstance;
+  static AliHLTMisc* fgInstance; //! global instance
 
   ClassDef(AliHLTMisc, 0)
 };
@@ -144,7 +165,7 @@ extern "C" {
 template<class T>
 T* AliHLTMisc::LoadInstance(const T* /*t*/, const char* classname, const char* library)
 {
-  // see header file for function documentation
+  /// dynamically load a class from a library
   int iLibResult=0;
   T* pInstance=NULL;
   AliHLTLogging log;