]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/BASE/AliHLTSystem.h
Move cluster sorting from CA tracker component inside CA tracker and pipeline with...
[u/mrichter/AliRoot.git] / HLT / BASE / AliHLTSystem.h
index cb840ff77edbeca97921ea8d506321337cc598aa..f25c687ede49354eec08884023d0db71b6489536 100644 (file)
@@ -131,7 +131,11 @@ class TStopwatch;
 class AliHLTSystem : public AliHLTLogging {
  public:
   /** default constructor */
-  AliHLTSystem(AliHLTComponentLogSeverity loglevel=kHLTLogDefault, const char* name="");
+  AliHLTSystem(AliHLTComponentLogSeverity loglevel=kHLTLogDefault,
+              const char* name="",
+              AliHLTComponentHandler* pCompHandler=NULL,
+              AliHLTConfigurationHandler* pConfHandler=NULL
+              );
   /** destructor */
   virtual ~AliHLTSystem();
 
@@ -206,10 +210,14 @@ class AliHLTSystem : public AliHLTLogging {
    * @param trgMask    ctp trigger mask from the rawreader
    * @param timestamp  timestamp of the event, read from the rawreader
    * @param eventtype  event type, read from the rawreader
+   * @param participatingDetectors  the bit flags of the participating detectors
+   *           as will we inserted into the Common Data Header. This should only
+   *           be used for software event types.
    * @return number of reconstructed events, neg error code if failed
    */
   int Run(Int_t iNofEvents, int bStop, AliHLTUInt64_t trgMask,
-         AliHLTUInt32_t timestamp, AliHLTUInt32_t eventtype);
+         AliHLTUInt32_t timestamp, AliHLTUInt32_t eventtype,
+         AliHLTUInt32_t participatingDetectors = 0);
 
   /**
    * Run the tasklist
@@ -274,7 +282,8 @@ class AliHLTSystem : public AliHLTLogging {
    * @return neg error code if failed
    */
   int ProcessTasks(Int_t eventNo, AliHLTUInt64_t trgMask,
-                  AliHLTUInt32_t timestamp, AliHLTUInt32_t eventtype);
+                  AliHLTUInt32_t timestamp, AliHLTUInt32_t eventtype,
+                  AliHLTUInt32_t participatingDetectors = 0);
 
   /**
    * Stop task list.
@@ -302,8 +311,9 @@ class AliHLTSystem : public AliHLTLogging {
 
   /**
    * Cleanup all internal objects from HLTOUT processing.
+   * Go through the list of HLTOUT handlers and release them.
    */
-  int CleanHLTOUT();
+  int CleanupHLTOUTHandlers();
 
   /**
    * The memory allocation function for components.
@@ -381,6 +391,36 @@ class AliHLTSystem : public AliHLTLogging {
    */
   int FillESD(int eventNo, AliRunLoader* runLoader, AliESDEvent* esd);
 
+  /**
+   * Init the HLTOUT instance for the current event.
+   * The instance can be used by other classes to get hold on the data
+   * from HLTOUT.
+   * @param  instance     instance to be set as the active HLTOUT
+   * @return -EBUSY other active instance already existing
+   */
+  int InitHLTOUT(AliHLTOUT* instance);
+
+  /**
+   * Invalidate the HLTOUT instance.
+   * @param  instance     target variable for the instance
+   * @return -EBUSY if instance in use
+   */
+  int InvalidateHLTOUT(AliHLTOUT** instance=NULL);
+
+  /**
+   * Get the HLTOUT instance.
+   * User method for processing classes. To be released after use.
+   * @return pointer to HLTOUT instance
+   */
+  AliHLTOUT* RequestHLTOUT();
+
+  /**
+   * Release the HLTOUT instance after use.
+   * @param instance      pointer to instance to be released
+   * @return -ENOENT if instance does not match
+   */
+  int ReleaseHLTOUT(const AliHLTOUT* instance);
+
   /**
    * Process the HLTOUT data.
    * The provided instance of AliHLTOUT provides the access to the data.
@@ -604,6 +644,12 @@ class AliHLTSystem : public AliHLTLogging {
   /** active HLTOUT task for the reconstruction */
   AliHLTOUTTask* fpHLTOUTTask;                                     //!transient
 
+  /** HLTOUT instance for the current event */
+  AliHLTOUT* fpHLTOUT;                                            //!transient
+
+  /** HLTOUT use counter */
+  int fHLTOUTUse;                                                  //!transient
+
   /** special task to publish the control events */
   AliHLTControlTask* fpControlTask;                                //!transient
 
@@ -613,7 +659,10 @@ class AliHLTSystem : public AliHLTLogging {
   /// ECS parameter string
   TString fECSParams;                                              //!transient
 
-  ClassDef(AliHLTSystem, 13);
+  /// indicate the argument 'hltout-type'
+  bool fUseHLTOUTComponentTypeGlobal;                              //!transient
+
+  ClassDef(AliHLTSystem, 0);
 };
 
 #endif