3 //**************************************************************************
4 //* This file is property of and copyright by the ALICE HLT Project *
5 //* ALICE Experiment at CERN, All rights reserved. *
7 //* Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no> *
8 //* for The ALICE HLT Project. *
10 //* Permission to use, copy, modify and distribute this software and its *
11 //* documentation strictly for non-commercial purposes is hereby granted *
12 //* without fee, provided that the above copyright notice appears in all *
13 //* copies and that both the copyright notice and this permission notice *
14 //* appear in the supporting documentation. The authors make no claims *
15 //* about the suitability of this software for any purpose. It is *
16 //* provided "as is" without express or implied warranty. *
17 //**************************************************************************
19 /** @file AliHLTOUTTask.cxx
20 @author Matthias Richter
22 @brief A special HLTOUT sibling working as a data sink in chains
25 #include "AliHLTOUTTask.h"
27 /** ROOT macro for the implementation of ROOT specific class methods */
28 ClassImp(AliHLTOUTTask)
30 AliHLTOUTTask::AliHLTOUTTask(const char* chains)
33 AliHLTDumpTask(chains)
35 // see header file for class documentation
37 // refer to README to build package
39 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
42 AliHLTOUTTask::~AliHLTOUTTask()
44 // see header file for class documentation
47 int AliHLTOUTTask::GenerateIndex()
49 // see header file for class documentation
51 const AliHLTComponentBlockDataList& list=GetDataBlocks();
52 for (unsigned int i=0; i<list.size(); i++) {
53 AliHLTOUTBlockDescriptor desc(list[i].fDataType, list[i].fSpecification, i, this);
54 //HLTDebug("adding block %d: %s %#x", i, AliHLTComponent::DataType2Text(list[i].fDataType).c_str(), list[i].fSpecification);
55 iResult=AddBlockDescriptor(desc);
60 int AliHLTOUTTask::GetDataBuffer(AliHLTUInt32_t index, const AliHLTUInt8_t* &pBuffer,
63 // see header file for class documentation
65 const AliHLTComponentBlockDataList& list=GetDataBlocks();
66 if (index>=list.size()) return -ENOENT;
67 pBuffer=reinterpret_cast<AliHLTUInt8_t*>(list[index].fPtr);
68 size=list[index].fSize;
72 AliHLTOUT::AliHLTOUTByteOrder AliHLTOUTTask::CheckBlockByteOrder(AliHLTUInt32_t /*index*/)
74 // see header file for class documentation
75 return kInvalidByteOrder;
78 int AliHLTOUTTask::CheckBlockAlignment(AliHLTUInt32_t /*index*/, AliHLTOUT::AliHLTOUTDataType /*type*/)
80 // see header file for class documentation
85 int AliHLTOUTTask::ResetInput()
87 // see header file for class documentation
88 return ReleaseDataBlocks();