]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/BASE/AliHLTDataSource.h
- added warning for track id mismatch
[u/mrichter/AliRoot.git] / HLT / BASE / AliHLTDataSource.h
index 97a22958a8abade3d66c74a5b9826d0063c96d82..0f63f992beaf70ae087ad964b5e7dbb75e75a7a6 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"
 
 /**
@@ -23,7 +31,6 @@
  * - @ref DoDeinit (optional)
  * - @ref GetEvent
  * - @ref GetComponentID
- * - @ref GetInputDataTypes
  * - @ref GetOutputDataType
  * - @ref GetOutputDataSize
  * - @ref Spawn
@@ -41,16 +48,16 @@ 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 AliHLTComponent_EventData& evtData,
-                   const AliHLTComponent_BlockData* blocks, 
-                   AliHLTComponent_TriggerData& trigData,
+  int DoProcessing( const AliHLTComponentEventData& evtData,
+                   const AliHLTComponentBlockData* blocks, 
+                   AliHLTComponentTriggerData& trigData,
                    AliHLTUInt8_t* outputPtr, 
                    AliHLTUInt32_t& size,
-                   AliHLTUInt32_t& outputBlockCnt, 
-                   AliHLTComponent_BlockData*& outputBlocks,
-                   AliHLTComponent_EventDoneData*& edd );
+                   vector<AliHLTComponentBlockData>& outputBlocks,
+                   AliHLTComponentEventDoneData*& edd );
 
   // Information member functions for registration.
 
@@ -60,23 +67,44 @@ class AliHLTDataSource : public AliHLTComponent {
    */
   TComponentType GetComponentType() { return AliHLTComponent::kSource;}
 
- private:
   /**
-   * Data processing method for the component.
+   * Default implementation for all data sources.
+   * There are no input data types.
+   */
+  void GetInputDataTypes( vector<AliHLTComponentDataType>& list);
+
+protected:
+
+  /**
+   * The low-level data processing method for the component.
+   * This is the custom processing method and can be overloaded by 
+   * 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
    *                     <i>output</i>:size of produced data
    * @param outputBlocks  list to receive output block descriptors
-   * @return
+   * @return neg. error code if failed
    */
-  virtual int GetEvent( const AliHLTComponent_EventData& evtData,
-                       AliHLTComponent_TriggerData& trigData,
-                       AliHLTUInt8_t* outputPtr, 
-                       AliHLTUInt32_t& size,
-                       vector<AliHLTComponent_BlockData>& outputBlocks ) = 0;
+  virtual int GetEvent( const AliHLTComponentEventData& evtData,
+               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