]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/BASE/AliHLTDataSource.h
store all HLTOUT data blocks of an event in one DDL and use a round robin schedule...
[u/mrichter/AliRoot.git] / HLT / BASE / AliHLTDataSource.h
index 723c503766800ca4c981351e49cb11160ab2a723..b70225c470f789aed9c49da6ae5db00b63a52167 100644 (file)
@@ -1,8 +1,10 @@
+//-*- Mode: C++ -*-
 // @(#) $Id$
 
 #ifndef ALIHLTDATASOURCE_H
 #define ALIHLTDATASOURCE_H
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+/* This file is property of and copyright by the ALICE HLT Project        * 
+ * ALICE Experiment at CERN, All rights reserved.                         *
  * See cxx source for full Copyright notice                               */
 
 /** @file   AliHLTDataSource.h
     @note   The class is used in Offline (AliRoot) context
 */
 
+// see below for class documentation
+// or
+// refer to README to build package
+// or
+// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt   
+
 #include "AliHLTComponent.h"
 
 /**
@@ -40,15 +48,15 @@ class AliHLTDataSource : public AliHLTComponent {
    * Event processing function.
    * The method is called by the framework to process one event. After 
    * preparation of data structures. The call is redirected to GetEvent.
-   * @return neg. error code if failed
+   * @return neg. error code if failed                                <br>
+   *         -ENOSPC      output buffer too small
    */
-  int ProcessEvent( const AliHLTComponentEventData& evtData,
+  int DoProcessing( const AliHLTComponentEventData& evtData,
                    const AliHLTComponentBlockData* blocks, 
                    AliHLTComponentTriggerData& trigData,
                    AliHLTUInt8_t* outputPtr, 
                    AliHLTUInt32_t& size,
-                   AliHLTUInt32_t& outputBlockCnt, 
-                   AliHLTComponentBlockData*& outputBlocks,
+                   vector<AliHLTComponentBlockData>& outputBlocks,
                    AliHLTComponentEventDoneData*& edd );
 
   // Information member functions for registration.
@@ -65,23 +73,38 @@ class AliHLTDataSource : public AliHLTComponent {
    */
   void GetInputDataTypes( vector<AliHLTComponentDataType>& list);
 
- private:
+protected:
+
   /**
-   * Data processing method for the component.
-   * @param evtData       event data structure
-   * @param trigData     trigger data structure
-   * @param outputPtr    pointer to target buffer
-   * @param size         <i>input</i>: size of target buffer
+   * The low-level data processing method for the component.
+   * This is the custom processing method and can be overloaded by 
+   * the component.
+   * @param [in] evtData       event data structure
+   * @param [in] trigData        trigger data structure
+   * @param [in] outputPtr       pointer to target buffer
+   * @param [in,out] size        <i>input</i>: size of target buffer
    *                     <i>output</i>:size of produced data
-   * @param outputBlocks  list to receive output block descriptors
-   * @return
+   * @param [in] outputBlocks  list to receive output block descriptors
+   * @return neg. error code if failed
    */
   virtual int GetEvent( const AliHLTComponentEventData& evtData,
-                       AliHLTComponentTriggerData& trigData,
-                       AliHLTUInt8_t* outputPtr, 
-                       AliHLTUInt32_t& size,
-                       vector<AliHLTComponentBlockData>& outputBlocks ) = 0;
+               AliHLTComponentTriggerData& trigData,
+               AliHLTUInt8_t* outputPtr, 
+               AliHLTUInt32_t& size,
+               vector<AliHLTComponentBlockData>& outputBlocks );
+
+  /**
+   * The high-level data processing method.
+   * This is the default processing method; the method is called
+   * if no low level @ref GetEvent method is overloaded by the component.
+   * @param evtData       event data structure
+   * @param trigData     trigger data structure
+   * @return neg. error code if failed
+   */
+  virtual int GetEvent( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData);
+
+private:
 
-  ClassDef(AliHLTDataSource, 0)
+  ClassDef(AliHLTDataSource, 3)
 };
 #endif