added first version of data buffer handler, not yet functional
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 28 Nov 2005 07:40:58 +0000 (07:40 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 28 Nov 2005 07:40:58 +0000 (07:40 +0000)
HLT/BASE/AliHLTDataBuffer.cxx [new file with mode: 0644]
HLT/BASE/AliHLTDataBuffer.h [new file with mode: 0644]
HLT/BASE/HLTbaseLinkDef.h
HLT/BASE/Makefile

diff --git a/HLT/BASE/AliHLTDataBuffer.cxx b/HLT/BASE/AliHLTDataBuffer.cxx
new file mode 100644 (file)
index 0000000..8440767
--- /dev/null
@@ -0,0 +1,418 @@
+// $Id$
+
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Authors: Matthias Richter <Matthias.Richter@ift.uib.no>                *
+ *          for The ALICE Off-line Project.                               *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+// handling of HLT data buffers                                              //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
+#if __GNUC__== 3
+using namespace std;
+#endif
+
+#include "AliHLTDataBuffer.h"
+#include <string>
+#include "AliHLTSystem.h"
+
+AliHLTConsumerDescriptor::AliHLTConsumerDescriptor()
+{
+  fpConsumer=NULL;
+  memset(&fDataType, 0, sizeof(AliHLTComponent_DataType));
+  fDataType.fStructSize=sizeof(AliHLTComponent_DataType);
+  fpSegment=NULL;
+}
+
+AliHLTConsumerDescriptor::AliHLTConsumerDescriptor(AliHLTComponent* pConsumer, AliHLTComponent_DataType datatype)
+{
+  fpConsumer=pConsumer;
+  fDataType=datatype;
+  fpSegment=NULL;
+}
+
+AliHLTConsumerDescriptor::~AliHLTConsumerDescriptor()
+{
+}
+
+int AliHLTConsumerDescriptor::SetActiveDataSegment(AliHLTDataSegment* pSegment)
+{
+  int iResult=0;
+  return iResult;
+}
+
+int AliHLTConsumerDescriptor::CheckActiveDataSegment(AliHLTUInt32_t offset, AliHLTUInt32_t size)
+{
+  int iResult=0;
+  return iResult;
+}
+
+int AliHLTConsumerDescriptor::ReleaseActiveDataSegment()
+{
+  int iResult=0;
+  return iResult;
+}
+
+ClassImp(AliHLTDataBuffer)
+
+int AliHLTDataBuffer::fNofInstances=0;
+vector<AliHLTRawBuffer*> AliHLTDataBuffer::fFreeBuffers;
+vector<AliHLTRawBuffer*> AliHLTDataBuffer::fActiveBuffers;
+AliHLTUInt32_t AliHLTDataBuffer::fMargin=1024;
+
+
+AliHLTDataBuffer::AliHLTDataBuffer()
+{
+  // TODO: do the right initialization 
+  //fSegments.empty();
+  //fConsumers;
+  //fActiveConsumers;
+  //fReleasedConsumers;
+  fpBuffer=NULL;
+  fFlags=0;
+  fNofInstances++;
+}
+
+AliHLTDataBuffer::~AliHLTDataBuffer()
+{
+  if (--fNofInstances<=0) {
+    DeleteRawBuffers();
+  }
+  CleanupConsumerList();
+}
+
+int AliHLTDataBuffer::SetConsumer(AliHLTComponent* pConsumer, AliHLTComponent_DataType datatype)
+{
+  int iResult=0;
+  if (pConsumer) {
+    AliHLTConsumerDescriptor* pDesc=new AliHLTConsumerDescriptor(pConsumer, datatype);
+    if (pDesc) {
+      fConsumers.push_back(pDesc);
+    } else {
+      HLTError("memory allocation failed");
+      iResult=-ENOMEM;
+    }
+  } else {
+    HLTError("invalid parameter");
+    iResult=-EINVAL;
+  }
+  return iResult;
+}
+
+int AliHLTDataBuffer::Subscribe(AliHLTComponent_DataType datatype, const AliHLTComponent* pConsumer, AliHLTComponent_BlockData* pBlockDesc)
+{
+  int iResult=0;
+  if (pConsumer && pBlockDesc) {
+    if (fpBuffer) {
+      AliHLTConsumerDescriptor* pDesc=FindConsumer(pConsumer, datatype, fConsumers);
+      if (pDesc) {
+       AliHLTDataSegment* pSegment=FindDataSegment(datatype);
+       if (pSegment) {
+         // move this consumer to the active list
+         if ((iResult=ChangeConsumerState(pDesc, fConsumers, fActiveConsumers))>=0) {
+           pDesc->SetActiveDataSegment(pSegment);
+           // fill the block data descriptor
+           pBlockDesc->fStructSize=sizeof(AliHLTComponent_BlockData);
+           // the shared memory key is not used in AliRoot
+           pBlockDesc->fShmKey.fStructSize=sizeof(AliHLTComponent_ShmData);
+           pBlockDesc->fShmKey.fShmType=0;
+           pBlockDesc->fShmKey.fShmID=0;
+           pBlockDesc->fOffset=pSegment->fSegmentOffset;
+           pBlockDesc->fPtr=fpBuffer->fPtr;
+           pBlockDesc->fSize=pSegment->fSegmentSize;
+           pBlockDesc->fDataType=pSegment->fDataType;
+           pBlockDesc->fSpecification=pSegment->fSpecification;
+           HLTDebug("component %p (%s) subscribed to data buffer %p (%s)", pConsumer, ((AliHLTComponent*)pConsumer)->GetComponentID(), this, datatype.fID);
+         } else {
+           HLTError("can not activate consumer %p for data buffer %p", pConsumer, this);
+           iResult=-EACCES;
+         }
+       } else {
+         HLTError("unresolved data segment: %s::%s is not available", datatype.fID, datatype.fOrigin);
+         iResult=-EBADF;
+       }
+      } else {
+       HLTWarning("can not find consumer %p in component list of data buffer %d", pConsumer, this);
+       iResult=-ENOENT;
+      }
+    } else {
+      HLTError("data buffer %p is empty", this);
+      iResult=-ENODATA;
+    }
+  } else {
+    HLTError("invalid parameter");
+    iResult=-EINVAL;
+  }
+  return iResult;
+}
+
+int AliHLTDataBuffer::Release(AliHLTComponent_BlockData* pBlockDesc, const AliHLTComponent* pConsumer)
+{
+  int iResult=0;
+  if (pBlockDesc && pConsumer) {
+      AliHLTConsumerDescriptor* pDesc=FindConsumer(pConsumer, pBlockDesc->fDataType, fActiveConsumers);
+      if (pDesc) {
+       if ((iResult=pDesc->CheckActiveDataSegment(pBlockDesc->fOffset, pBlockDesc->fSize))!=1) {
+         HLTWarning("data segment missmatch, component %p has not subscribed to a segment with offset %#x and size %d", pBlockDesc->fOffset, pBlockDesc->fSize);
+         // TODO: appropriate error handling, but so far optional
+         iResult=0;
+       }
+       pDesc->ReleaseActiveDataSegment();
+       pBlockDesc->fOffset=0;
+       pBlockDesc->fPtr=NULL;
+       pBlockDesc->fSize=0;
+       if ((iResult=ChangeConsumerState(pDesc, fActiveConsumers, fReleasedConsumers))>=0) {
+         if (GetNofActiveConsumers()==0) {
+           // this is the last consumer, release the raw buffer
+           AliHLTRawBuffer* pBuffer=fpBuffer;
+           ResetDataBuffer();
+           ReleaseRawBuffer(pBuffer);
+         }
+       } else {
+         HLTError("can not deactivate consumer %p for data buffer %p", pConsumer, this);
+         iResult=-EACCES;
+       }
+      } else {
+       HLTWarning("component %p has currently not subscribed to the data buffer", pConsumer);
+       iResult=-ENOENT;
+      }
+  } else {
+    HLTError("inavalid parameter: pBlockDesc=%p pConsumer=%p", pBlockDesc, pConsumer);
+    iResult=-EINVAL;
+  }
+  return iResult;
+}
+
+AliHLTUInt8_t* AliHLTDataBuffer::GetTargetBuffer(int iMinSize)
+{
+  AliHLTUInt8_t* pTargetBuffer=NULL;
+  fpBuffer=CreateRawBuffer(iMinSize);
+  pTargetBuffer=(AliHLTUInt8_t*)fpBuffer;
+  return pTargetBuffer;
+}
+
+int AliHLTDataBuffer::SetSegments(AliHLTUInt8_t* pTgt, AliHLTComponent_BlockData* arrayBlockData, int iSize)
+{
+  int iResult=0;
+  if (pTgt && arrayBlockData && iSize>=0) {
+    AliHLTDataSegment segment;
+    memset(&segment, 0, sizeof(AliHLTDataSegment));
+    for (int i=0; i<iSize; i++) {
+      if (arrayBlockData[i].fOffset+arrayBlockData[i].fSize<fpBuffer->fSize) {
+      segment.fSegmentOffset=arrayBlockData[i].fOffset;
+      segment.fSegmentSize=arrayBlockData[i].fSize;
+      segment.fDataType=arrayBlockData[i].fDataType;
+      segment.fSpecification=arrayBlockData[i].fSpecification;
+      fSegments.push_back(segment);
+      } else {
+       HLTError("block data specification #%d (%s@%s) exceeds size of data buffer", i, arrayBlockData[i].fDataType.fOrigin, arrayBlockData[i].fDataType.fID);
+      }
+    }
+  } else {
+    HLTError("inavalid parameter: pTgtBuffer=%p arrayBlockData=%p", pTgt, arrayBlockData);
+    iResult=-EINVAL;
+  }
+  return iResult;
+}
+
+int AliHLTDataBuffer::IsEmpty()
+{
+  int iResult=fpBuffer==NULL || GetNofSegments()==0;
+  return iResult;
+}
+
+int AliHLTDataBuffer::GetNofSegments()
+{
+  int iResult=fSegments.size();
+  return iResult;
+}
+
+int AliHLTDataBuffer::GetNofConsumers()
+{
+  int iResult=fConsumers.size() + GetNofActiveConsumers() + fReleasedConsumers.size();
+  return iResult;
+}
+
+int AliHLTDataBuffer::GetNofActiveConsumers()
+{
+  int iResult=fActiveConsumers.size();
+  return iResult;
+}
+
+AliHLTRawBuffer* AliHLTDataBuffer::CreateRawBuffer(AliHLTUInt32_t size)
+{
+  AliHLTRawBuffer* pRawBuffer=NULL;
+  vector<AliHLTRawBuffer*>::iterator buffer=fFreeBuffers.begin();
+  while (buffer!=fFreeBuffers.end() && pRawBuffer==NULL) {
+    if ((*buffer)->fTotalSize>=size && ((*buffer)->fTotalSize-size)<fMargin) {
+      // assign this element
+      pRawBuffer=*buffer;
+      pRawBuffer->fSize=size;
+      fFreeBuffers.erase(buffer);
+      //HLTDebug("raw buffer container %p provided for request of %d bytes (total %d available in buffer %p)", pRawBuffer, size, pRawBuffer->fTotalSize, pRawBuffer->fPtr);
+      fActiveBuffers.push_back(pRawBuffer);
+    } else {
+      // check the next element
+      buffer++;
+    }
+  }
+  if (pRawBuffer==NULL) {
+    pRawBuffer=new AliHLTRawBuffer;
+    if (pRawBuffer) {
+      memset(pRawBuffer, 0, sizeof(AliHLTRawBuffer));
+      pRawBuffer->fPtr=malloc(size);
+      if (pRawBuffer->fPtr) {
+       pRawBuffer->fSize=size;
+       pRawBuffer->fTotalSize=size;
+       fActiveBuffers.push_back(pRawBuffer);
+       //HLTDebug("new raw buffer %p of size %d created (container %p)", pRawBuffer->fPtr, pRawBuffer->fTotalSize, pRawBuffer);
+      } else {
+       delete pRawBuffer;
+       pRawBuffer=NULL;
+       //HLTError("memory allocation failed");
+      } 
+    } else {
+      //HLTError("memory allocation failed");
+    }
+  }
+  return pRawBuffer;
+}
+
+int AliHLTDataBuffer::ReleaseRawBuffer(AliHLTRawBuffer* pBuffer)
+{
+  int iResult=0;
+  if (pBuffer) {
+    vector<AliHLTRawBuffer*>::iterator buffer=fActiveBuffers.begin();
+    while (buffer!=fActiveBuffers.end() && (*buffer)!=pBuffer) {
+      buffer++;
+    }
+    if (buffer!=fActiveBuffers.end()) {
+      (*buffer)->fSize=0;
+      fFreeBuffers.push_back(*buffer);
+      fActiveBuffers.erase(buffer);
+    } else {
+      //HLTWarning("can not find raw buffer container %p in the list of active containers", pBuffer);
+      iResult=-ENOENT;
+    }
+  } else {
+    //HLTError("invalid parameter");
+    iResult=-EINVAL;
+  }
+  return iResult;
+}
+
+
+int AliHLTDataBuffer::DeleteRawBuffers() 
+{
+  int iResult=0;
+  vector<AliHLTRawBuffer*>::iterator buffer=fFreeBuffers.begin();
+  while (buffer!=fFreeBuffers.end()) {
+    free((*buffer)->fPtr);
+    delete *buffer;
+    fFreeBuffers.erase(buffer);
+    buffer=fFreeBuffers.begin();
+  }
+  buffer=fActiveBuffers.begin();
+  while (buffer!=fFreeBuffers.end()) {
+    //HLTWarning("request to delete active raw buffer container %d (raw buffer %p, size %d)", *buffer, *buffer->fPtr, *buffer->fTotalSize);
+    free((*buffer)->fPtr);
+    delete *buffer;
+    fActiveBuffers.erase(buffer);
+    buffer=fActiveBuffers.begin();
+  }
+  return iResult;
+}
+
+AliHLTConsumerDescriptor* AliHLTDataBuffer::FindConsumer(const AliHLTComponent* pConsumer, AliHLTComponent_DataType datatype, vector<AliHLTConsumerDescriptor*> &list)
+{
+  AliHLTConsumerDescriptor* pDesc=NULL;
+  vector<AliHLTConsumerDescriptor*>::iterator desc=list.begin();
+  while (desc!=list.end() && pDesc==NULL) {
+    if ((pConsumer==NULL || (*desc)->GetComponent()==pConsumer) && (*desc)->GetDataType()==datatype) {
+      pDesc=*desc;
+    }
+  }
+  return pDesc;
+}
+
+int AliHLTDataBuffer::ResetDataBuffer() {
+  int iResult=0;
+  fpBuffer=NULL;
+  vector<AliHLTConsumerDescriptor*>::iterator desc=fReleasedConsumers.begin();
+  while (desc!=fReleasedConsumers.end()) {
+    AliHLTConsumerDescriptor* pDesc=*desc;
+    fReleasedConsumers.erase(desc);
+    desc=fReleasedConsumers.begin();
+    fConsumers.push_back(pDesc);
+  }
+  desc=fActiveConsumers.begin();
+  while (desc!=fActiveConsumers.end()) {
+    AliHLTConsumerDescriptor* pDesc=*desc;
+    HLTWarning("consumer %p was not released", pDesc);
+    fActiveConsumers.erase(desc);
+    desc=fActiveConsumers.begin();
+    fConsumers.push_back(pDesc);
+  }
+  return iResult;
+}
+
+int AliHLTDataBuffer::ChangeConsumerState(AliHLTConsumerDescriptor* pDesc, vector<AliHLTConsumerDescriptor*> &srcList, vector<AliHLTConsumerDescriptor*> &tgtList)
+{
+  int iResult=0;
+  if (pDesc) {
+    vector<AliHLTConsumerDescriptor*>::iterator desc=srcList.begin();
+    while (desc!=srcList.end()) {
+      if ((*desc)==pDesc) {
+       srcList.erase(desc);
+       tgtList.push_back(pDesc);
+       break;
+      }
+    }
+    if (desc==srcList.end()) {
+      HLTError("can not find consumer descriptor %p in list", pDesc);
+      iResult=-ENOENT;
+    }
+  } else {
+    HLTError("invalid parameter");
+    iResult=-EINVAL;
+  }
+  return iResult;
+}
+
+int AliHLTDataBuffer::CleanupConsumerList() {
+  int iResult=0;
+  ResetDataBuffer();
+  vector<AliHLTConsumerDescriptor*>::iterator desc=fConsumers.begin();
+  while (desc!=fConsumers.end()) {
+    delete *desc;
+    fConsumers.erase(desc);
+    desc=fConsumers.begin();
+  }
+  return iResult;
+}
+
+AliHLTDataSegment* AliHLTDataBuffer::FindDataSegment(AliHLTComponent_DataType datatype)
+{
+  AliHLTDataSegment* pSegment=NULL;
+  vector<AliHLTDataSegment>::iterator segment=fSegments.begin();
+  while (segment!=fSegments.end() && pSegment==NULL) {
+    if ((*segment).fDataType==datatype) {
+      // TODO: check this use of the vector
+      //pSegment=segment;
+    }
+  }
+  return pSegment;
+}
diff --git a/HLT/BASE/AliHLTDataBuffer.h b/HLT/BASE/AliHLTDataBuffer.h
new file mode 100644 (file)
index 0000000..754cf25
--- /dev/null
@@ -0,0 +1,186 @@
+// @(#) $Id$
+
+#ifndef ALIHLTDATABUFFER_H
+#define ALIHLTDATABUFFER_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* AliHLTDataBuffer
+   handling of data buffers for the HLT
+ */
+
+#include <cerrno>
+#include "AliHLTLogging.h"
+#include "AliHLTDataTypes.h"
+#include "AliHLTDefinitions.h"
+#include "AliHLTComponent.h"
+#include "TObject.h"
+#include "TList.h"
+
+/* internal data structure
+ */
+struct AliHLTDataSegment {
+  AliHLTComponent_DataType fDataType; // the data type of this buffer
+  Int_t fSegmentOffset;               // offset in byte within the data buffer
+  Int_t fSegmentSize;                 // size of the actual content
+  AliHLTUInt32_t fSpecification;      // data specification
+};
+
+/* internal data structure
+ */
+struct AliHLTRawBuffer {
+  AliHLTUInt32_t fSize;                        // size of the buffer
+  AliHLTUInt32_t fTotalSize;                   // total size of the buffer, including safety margin
+  void* fPtr;                         // the buffer
+};
+
+/* internal data structure
+ * there is unfortunately no unique determination of the data type from the component
+ * itself possible, thats way both component and data type have to be initialized
+ * and are stored in a compound
+ */
+class AliHLTConsumerDescriptor : public TObject, public AliHLTLogging {
+ private:
+  AliHLTComponent* fpConsumer;
+  AliHLTComponent_DataType fDataType;
+  AliHLTDataSegment* fpSegment;
+
+ public:
+  AliHLTConsumerDescriptor();
+  AliHLTConsumerDescriptor(AliHLTComponent* pConsumer, AliHLTComponent_DataType datatype);
+  ~AliHLTConsumerDescriptor();
+
+  AliHLTComponent* GetComponent() {return fpConsumer;}
+  AliHLTComponent_DataType GetDataType() {return fDataType;}
+
+  int SetActiveDataSegment(AliHLTDataSegment* pSegment);
+  int CheckActiveDataSegment(AliHLTUInt32_t offset, AliHLTUInt32_t size);
+  int ReleaseActiveDataSegment();
+};
+
+class AliHLTDataBuffer : public AliHLTLogging, public TObject {
+ public:
+  AliHLTDataBuffer();
+  virtual ~AliHLTDataBuffer();
+
+  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+  // initialization
+
+  /* add component to the list of consumers
+   * parameter:
+   *   pConsumer - a consumer of type AliHLTComponent
+   *   datatype - data type of the segement, the consumer is registered for
+   */
+  int SetConsumer(AliHLTComponent* pConsumer, AliHLTComponent_DataType datatype);
+
+  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+  // component to component communication
+
+  /* subscribe to a segment of the data buffer
+   * the function prepares the block descriptor for subsequent use with the AliHLTComponent::ProcessEvent
+   * method
+   * parameter:
+   *   datatype - type of the data segment
+   *   pConsumer - the component which subscribes to the buffer
+   *   pBlockDesc - pointer to receive the prepared block descriptor
+   * return: >0 if success, negative error code if failed
+   */
+  int Subscribe(AliHLTComponent_DataType datatype, const AliHLTComponent* pConsumer, AliHLTComponent_BlockData* pBlockDesc);
+
+  /* release an instance of the data buffer
+   * resets the variables of the block descriptor
+   * parameter:
+   *   pBlockDesc - descriptor of the data segment
+   *   pConsumer - the component which subscribes to the buffer
+   * return: >0 if success, negative error code if failed
+   */
+  int Release(AliHLTComponent_BlockData* pBlockDesc, const AliHLTComponent* pConsumer);
+
+  /* get a target buffer if minimum size iMinSize
+   */
+  AliHLTUInt8_t* GetTargetBuffer(int iMinSize);
+
+  /* set the segments for the data buffer
+   * this is usually done after the component has written the data to the buffer
+   * parameter:
+   *   pTgt - the target buffer the segments refer to
+   *   arraySegments - the output block descriptors of the component
+   *   iSize - size of the array
+   */
+  int SetSegments(AliHLTUInt8_t* pTgt, AliHLTComponent_BlockData* arraySegments, int iSize);
+
+  /* check if the data buffer is empty
+   */
+  int IsEmpty();
+
+  /* get the total and maximum size of the buffer
+   * lets see if this is needed later
+   */
+  //int GetTotalSize();
+
+  /* get the number of segments
+   */
+  int GetNofSegments();
+
+  /* get the number of consumers
+   */
+  int GetNofConsumers();
+
+  /* get the number of consumers
+   */
+  int GetNofActiveConsumers();
+
+ private:
+  AliHLTDataSegment* FindDataSegment(AliHLTComponent_DataType datatype);
+
+  /* reset the data buffer
+   * removes all condumers back to the fConsumers list
+   */
+  int ResetDataBuffer();
+
+
+  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+  // the data description
+  vector<AliHLTDataSegment> fSegments;// the data segments within this buffer
+
+  vector<AliHLTConsumerDescriptor*> fConsumers;                   // the list of all consumers which are going to subscribe to the buffer
+  vector<AliHLTConsumerDescriptor*> fActiveConsumers;             // the list of all consumers which are currently subscribed to the buffer
+  vector<AliHLTConsumerDescriptor*> fReleasedConsumers;           // the list of all consumers which are already released for the current event
+
+  AliHLTRawBuffer* fpBuffer;           // the buffer instance
+
+  AliHLTUInt32_t fFlags;                // flags indicating the state of the buffer
+
+  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+  // global buffer handling
+
+  /* create a raw buffer of a certain size
+   * the function tries to find a buffer of the given size (or a little bit bigger) from the list of free buffers
+   * if no buffer is available, a new one is created
+   */
+  static AliHLTRawBuffer* CreateRawBuffer(AliHLTUInt32_t size);
+
+  /* mark a buffer as free
+   */
+  static int ReleaseRawBuffer(AliHLTRawBuffer* pBuffer);
+
+  /* deletes all the raw buffers
+   */
+  static int DeleteRawBuffers();
+
+  static int fNofInstances;
+  static vector<AliHLTRawBuffer*> fFreeBuffers;
+  static vector<AliHLTRawBuffer*> fActiveBuffers;
+  static AliHLTUInt32_t fMargin;
+
+  /*
+   */
+  AliHLTConsumerDescriptor* FindConsumer(const AliHLTComponent* pConsumer, AliHLTComponent_DataType datatype, vector<AliHLTConsumerDescriptor*> &pList);
+
+  int ChangeConsumerState(AliHLTConsumerDescriptor* pDesc, vector<AliHLTConsumerDescriptor*> &srcList, vector<AliHLTConsumerDescriptor*> &tgtList);
+
+  int CleanupConsumerList();
+
+  ClassDef(AliHLTDataBuffer, 0)
+};
+#endif // ALIHLTDATABUFFER_H
index 0a65e1b..479bd00 100644 (file)
@@ -14,6 +14,7 @@
 #pragma link C++ class AliHLTConfigurationHandler;
 #pragma link C++ class AliHLTTask;
 #pragma link C++ class AliHLTLogging;
+#pragma link C++ class AliHLTDataBuffer;
 
 #endif
 
index 6424aa0..6354e0b 100644 (file)
@@ -18,7 +18,7 @@ include $(ALIHLT_TOPDIR)/Makefile.conf
 SRCS   = AliHLTComponent.cxx AliHLTComponentHandler.cxx \
           AliHLTSystem.cxx AliHLT_C_Component_WrapperInterface.cxx \
          AliHLTProcessor.cxx AliHLTConfiguration.cxx \
-         AliHLTLogging.cxx
+         AliHLTLogging.cxx AliHLTDataBuffer.cxx
 
 SRCS += $(EXTRA_SRCS)