Line data Source code
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 126 : ClassImp(AliHLTOUTTask)
29 :
30 : AliHLTOUTTask::AliHLTOUTTask(const char* chains)
31 : :
32 0 : AliHLTOUT(),
33 0 : AliHLTDumpTask(chains)
34 0 : {
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
40 0 : }
41 :
42 0 : AliHLTOUTTask::~AliHLTOUTTask()
43 0 : {
44 : // see header file for class documentation
45 0 : }
46 :
47 : int AliHLTOUTTask::GenerateIndex()
48 : {
49 : // see header file for class documentation
50 : int iResult=0;
51 0 : const AliHLTComponentBlockDataList& list=GetDataBlocks();
52 0 : for (unsigned int i=0; i<list.size(); i++) {
53 0 : 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 0 : iResult=AddBlockDescriptor(desc);
56 0 : }
57 0 : return iResult;
58 0 : }
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;
65 0 : const AliHLTComponentBlockDataList& list=GetDataBlocks();
66 0 : if (index>=list.size()) return -ENOENT;
67 0 : pBuffer=reinterpret_cast<AliHLTUInt8_t*>(list[index].fPtr);
68 0 : size=list[index].fSize;
69 0 : return iResult;
70 0 : }
71 :
72 : AliHLTOUT::AliHLTOUTByteOrder AliHLTOUTTask::CheckBlockByteOrder(AliHLTUInt32_t /*index*/)
73 : {
74 : // see header file for class documentation
75 0 : 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 0 : return iResult;
83 : }
84 :
85 : int AliHLTOUTTask::ResetInput()
86 : {
87 : // see header file for class documentation
88 0 : return ReleaseDataBlocks();
89 : }
|