]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/BASE/AliHLTOUT.h
Cosmetics. Fixed bug preventing creation of async block list
[u/mrichter/AliRoot.git] / HLT / BASE / AliHLTOUT.h
index 820dcf25667d99712301514f80f6fdcf054ab97a..747cfbad0e6c15e5cfc71c6e9ebe2645b21a3cae 100644 (file)
@@ -58,6 +58,13 @@ class AliHLTOUT {
    */
   static AliHLTOUT* New(TTree* pDigitTree, int event=-1);
 
+  /**
+   * Create an AliHLTOUTDigitReader instance
+   * Helper function to transparently access classes from the
+   * libHLTrec library.
+   */
+  static AliHLTOUT* New(const char* filename, int event=-1);
+
   /**
    * Get the global instance.
    * The global instance is set temporarily by the AliHLTOUTGlobalInstanceGuard
@@ -170,6 +177,7 @@ class AliHLTOUT {
     kCDHFlagsHLTPayload=7 //! see above
   };
 
+  class AliHLTOUTHandlerListEntry;
   /**
    * Block descriptor.
    */
@@ -207,6 +215,11 @@ class AliHLTOUT {
       return -ENODEV;
     }
 
+    /**
+     * Get the handler descriptor
+     */
+    const AliHLTOUTHandlerListEntry& GetHandlerDesc();
+
   private:      
     /** data type of the block */
     AliHLTComponentDataType fDataType; //!transient
@@ -260,6 +273,7 @@ class AliHLTOUT {
     /**
      * Compare the handler descriptor of this list entry with another
      * descriptor.
+     * @return true if both handler and agent match
      */
     bool operator==(const AliHLTModuleAgent::AliHLTOUTHandlerDesc desc) const; 
 
@@ -360,6 +374,11 @@ class AliHLTOUT {
    */
   int Reset();
 
+  /**
+   * Get the current event id
+   */
+  AliHLTUInt64_t EventId() {return fCurrentEventId;}
+
   /**
    * Get number of data blocks in the HLTOUT data
    */
@@ -430,6 +449,17 @@ class AliHLTOUT {
    */
   int ReleaseDataBuffer(const AliHLTUInt8_t* pBuffer);
 
+  /**
+   * Get a TObject from the data buffer
+   * @return TObject pointer if data block is a streamed object
+   */
+  TObject* GetDataObject();
+
+  /**
+   * Release data object
+   */
+  int ReleaseDataObject(TObject* pObject);
+
   /**
    * Add the current data block to the selection.
    * Note: enables also the block selection
@@ -585,6 +615,11 @@ class AliHLTOUT {
    */
   int AddBlockDescriptor(const AliHLTOUTBlockDescriptor desc);
 
+  /**
+   * Set the event id, only for child classes
+   */
+  void SetEventId(AliHLTUInt64_t id);
+
   /**
    * Print output or suppress.
    */
@@ -703,13 +738,6 @@ class AliHLTOUT {
    */
   const AliHLTOUTHandlerListEntry& FindHandlerDesc(AliHLTUInt32_t blockIndex);
 
-  /**
-   * Internal New function for the external HLTOUT instances.
-   * Currently supported classes are AliHLTOUTRawReader and
-   * AliHLTOUTDigitReader, both implemented in libHLTrec.so.
-   */
-  static AliHLTOUT* New(const char* classname);
-
   /**
    * Set the RawReader as parameter.
    * The function is for internal use only in conjunction with the
@@ -724,6 +752,13 @@ class AliHLTOUT {
    */
   virtual void SetParam(TTree* pDigitTree, int event=-1);
 
+  /**
+   * Set name of the digit file as parameter
+   * The function is for internal use only in conjunction with the
+   * New() functions.
+   */
+  virtual void SetParam(const char* filename, int event=-1);
+
   /** data type for the current block search, set from @ref SelectFirstDataBlock */
   AliHLTComponentDataType fSearchDataType; //!transient
 
@@ -757,6 +792,14 @@ class AliHLTOUT {
   /** logging methods */
   AliHLTLogging fLog; //! transient
 
-  ClassDef(AliHLTOUT, 4)
+  /** current buffer converted to a TObject */
+  TObject* fpDataObject; //!
+  const AliHLTUInt8_t* fpObjectBuffer; //!
+  AliHLTUInt32_t fObjectBufferSize; //!
+
+  /** current event id */
+  AliHLTUInt64_t fCurrentEventId; //!
+
+  ClassDef(AliHLTOUT, 6)
 };
 #endif