]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/BASE/AliHLTOUTHandler.h
Analysis task used to extract the VZERO event-plane flatenning parameters.
[u/mrichter/AliRoot.git] / HLT / BASE / AliHLTOUTHandler.h
index 90c5edc23b6318be8546e8f9ce9fc00a2c8b767f..b401f83540476ae7a0e7bb3a092c1210e2aafeae 100644 (file)
@@ -40,7 +40,10 @@ class AliHLTOUTHandler : public AliHLTLogging {
 
   /**
    * Process the data.
-   * The data and it's properties can be retrieved by the following member
+   * The data blocks can be selected by AliHLTOUT::SelectFirstDataBlock() and
+   * AliHLTOUT::SelectNextDataBlock()
+   *
+   * Properties of the current data block can be retrieved by the following member
    * functions of AliHLTOUT:
    * - AliHLTOUT::GetDataBlockDescription(AliHLTComponentDataType& dt, AliHLTUInt32_t& spec)
    * - AliHLTOUT::GetDataBlockIndex()
@@ -77,7 +80,40 @@ class AliHLTOUTHandler : public AliHLTLogging {
    */
   virtual int ReleaseProcessedData(const AliHLTUInt8_t* pData, int size);
 
+  /**
+   * Cleanup the current event processing.
+   */
+  virtual int FinishEvent();
+
+  enum {
+    kHandlerUndefined = 0,
+    kHandlerOK    = 0,
+    kHandlerError = 0x1000
+  };
+
+  /**
+   * Check state flag of the handler.
+   * @return true if flag matches
+   */
+  bool CheckStatus(unsigned int flag) {
+    return (fState&flag)!=0;
+  }
+
+  /**
+   * Reset the state flag.
+   */
+  void ResetState() {
+    fState=kHandlerOK;
+  }
+
  protected:
+  void SetStatusFlag(unsigned int flag) {
+    fState|=flag;
+  }
+
+  void ClearStatusFlag(unsigned int flag) {
+    fState&=~flag;
+  }
 
  private:
   /** copy constructor prohibited */
@@ -85,6 +121,9 @@ class AliHLTOUTHandler : public AliHLTLogging {
   /** assignment operator prohibited */
   AliHLTOUTHandler& operator=(const AliHLTOUTHandler&);
 
+  /** internal state of the handler */
+  int fState; //!transient
+
   ClassDef(AliHLTOUTHandler, 0)
 };
 #endif