]>
Commit | Line | Data |
---|---|---|
7131ea63 | 1 | // $Id$ |
2 | ||
3 | //************************************************************************** | |
4 | //* This file is property of and copyright by the ALICE HLT Project * | |
5 | //* ALICE Experiment at CERN, All rights reserved. * | |
6 | //* * | |
7 | //* Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no> * | |
8 | //* for The ALICE HLT Project. * | |
9 | //* * | |
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 | //************************************************************************** | |
18 | ||
19 | /** @file AliHLTOUTTask.cxx | |
20 | @author Matthias Richter | |
21 | @date | |
22 | @brief A special HLTOUT sibling working as a data sink in chains | |
23 | */ | |
24 | ||
25 | #include "AliHLTOUTTask.h" | |
26 | ||
27 | /** ROOT macro for the implementation of ROOT specific class methods */ | |
28 | ClassImp(AliHLTOUTTask) | |
29 | ||
30 | AliHLTOUTTask::AliHLTOUTTask(const char* chains) | |
31 | : | |
32 | AliHLTOUT(), | |
8b0b58e2 | 33 | AliHLTDumpTask(chains) |
7131ea63 | 34 | { |
35 | // see header file for class documentation | |
36 | // or | |
37 | // refer to README to build package | |
38 | // or | |
39 | // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt | |
7131ea63 | 40 | } |
41 | ||
42 | AliHLTOUTTask::~AliHLTOUTTask() | |
43 | { | |
44 | // see header file for class documentation | |
7131ea63 | 45 | } |
46 | ||
47 | int AliHLTOUTTask::GenerateIndex() | |
48 | { | |
49 | // see header file for class documentation | |
50 | int iResult=0; | |
8b0b58e2 | 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); | |
7131ea63 | 56 | } |
57 | return iResult; | |
58 | } | |
59 | ||
60 | int AliHLTOUTTask::GetDataBuffer(AliHLTUInt32_t index, const AliHLTUInt8_t* &pBuffer, | |
61 | AliHLTUInt32_t& size) | |
62 | { | |
63 | // see header file for class documentation | |
64 | int iResult=0; | |
8b0b58e2 | 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; | |
7131ea63 | 69 | return iResult; |
70 | } | |
71 | ||
72 | AliHLTOUT::AliHLTOUTByteOrder AliHLTOUTTask::CheckBlockByteOrder(AliHLTUInt32_t /*index*/) | |
73 | { | |
74 | // see header file for class documentation | |
75 | return kInvalidByteOrder; | |
76 | } | |
77 | ||
78 | int AliHLTOUTTask::CheckBlockAlignment(AliHLTUInt32_t /*index*/, AliHLTOUT::AliHLTOUTDataType /*type*/) | |
79 | { | |
80 | // see header file for class documentation | |
81 | int iResult=0; | |
82 | return iResult; | |
83 | } | |
84 | ||
85 | int AliHLTOUTTask::ResetInput() | |
86 | { | |
87 | // see header file for class documentation | |
8b0b58e2 | 88 | return ReleaseDataBlocks(); |
19b5c321 | 89 | } |