]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/BASE/AliHLTModulePreprocessor.h
Fixes for compile issues in HLT branch with clang 5.0/C++11 (savannah #103408).
[u/mrichter/AliRoot.git] / HLT / BASE / AliHLTModulePreprocessor.h
index 7571e46fceac9e72dfd92db2899b8889cd8ec716..c8f78e19f69e5206b443bc0fcf8869412a7e4f9b 100644 (file)
@@ -1,5 +1,5 @@
 //-*- Mode: C++ -*-
-// @(#) $Id$
+// $Id$
 
 #ifndef ALIHLTMODULEPREPROCESSOR_H
 #define ALIHLTMODULEPREPROCESSOR_H
@@ -7,12 +7,11 @@
 //* ALICE Experiment at CERN, All rights reserved.                         *
 //* See cxx source for full Copyright notice                               *
 
-/**
- * @file   AliHLTModulePreprocessor.h
- * @author Matthias Richter
- * @date   2008-01-22
- * @brief  Base class for HLT module preprocessors
- */
+// @file   AliHLTModulePreprocessor.h
+// @author Matthias Richter
+// @date   2008-01-22
+// @brief  Base class for HLT module preprocessors
+// 
 
 // see below for class documentation
 // or
@@ -73,13 +72,56 @@ public:
   virtual UInt_t Process(TMap* dcsAliasMap) = 0;
 
   /** Get the run no */
-  Int_t GetRun();
+  Int_t GetRun() const;
 
   /** Get the start time */
-  UInt_t GetStartTime();
+  UInt_t GetStartTime() const;
 
   /** Get the end time */
-  UInt_t GetEndTime();
+  UInt_t GetEndTime() const;
+
+ /**
+   * Get the id of the module
+   * Each module preprocessor is identified by a unique id.
+   * The function is pure virtual and must be implemented by the child class.
+   * @return module id (string)
+   */
+  virtual const char* GetModuleID() {return ClassName();}
+
+ /**
+   * Get all detectors the module process
+   * Detectors are determined in the bit mask as provided by "detectorMask"
+   * implement: GetModuleNumber() {return AliHLTModulePreprocessor::DetetorID("detectorname");}
+   * The function is pure virtual and must be implemented by the child class.
+   * @return bit mask for active detectors (Int_t)
+   */
+  virtual Int_t GetModuleNumber() = 0;
+
+  /** Get detector bit mask (bit mask comparable to the detectorMask but for the respective detector only)
+   *  out of detector name
+   *@param detectorName const char* of the detector
+   *@return Int_t for the detector bit mask
+   */
+  Int_t DetectorBitMask(const char *detectorName);
+
+ /** Get the information whether detector was active (return value: 1 = active, 0 = inactive) 
+      @param detectorbitmask bitmask of the detector to be checked (s. DetectorBitMask)
+      @return 1 if active 0 if inactive
+ */
+  Bool_t GetDetectorStatus(Int_t detectorbitmask);
+
+  /** Get detector name out of detector id (bit position in detectorMask of the resp. detector)
+   *@param detectorID integer ID of the detector
+   *@return const char* name of the detector corresponding to the ID
+   */
+  const char *DetectorName(Int_t detectorID);
+
+  /// extract object from the alias map
+  /// return the last object from the value set
+  TObject* GetFromMap(TMap* dcsAliasMap, const char* stringId) const;
+
+  /** number of detectors */
+  static const Int_t kNDetectors;    // Number of detectors
 
 protected:
   // the AliPreprocessor interface, all functions redirected via the
@@ -115,6 +157,12 @@ private:
   /** the interface class which is the gateway to the shuttle */
   AliHLTShuttleInterface* fpInterface;                             //! transient
 
-  ClassDef(AliHLTModulePreprocessor, 0);
+ /** determine which which detectors were active */
+  Int_t fActiveDetectors; // bit array of active detectors
+
+  /** array of detector names */
+  static const char *fgkDetectorName[]; // Detector names
+
+  ClassDef(AliHLTModulePreprocessor, 1);
 };
 #endif