]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/comp/AliHLTCOMPHuffmanAltroComponent.h
Corrected documentation in READMEbase.txt
[u/mrichter/AliRoot.git] / HLT / comp / AliHLTCOMPHuffmanAltroComponent.h
CommitLineData
c2440081 1// @(#) $Id$
2
3#ifndef ALIHLTCOMPHUFFMANALTROCOMPONENT_H
4#define ALIHLTCOMPHUFFMANALTROCOMPONENT_H
5
6/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
7 * See cxx source for full Copyright notice */
8
9/** @file AliHLTCOMPHuffmanAltroComponent.h
10 @author Jenny Wagner
11 @date 20-11-2007
12 @brief The Huffman compressor component.
13*/
14
15#include "AliHLTProcessor.h"
16
17class AliHLTCOMPHuffmanAltro;
18class AliHLTCOMPHuffmanData;
19
20/**
21 * @class AliHLTCOMPHuffmanAltroComponent
22 * Implementation of the Huffman compressor component.
23 * The component implements the interface methods of the @ref AliHLTProcessor.
24 * The actual Huffman compression and decompression algorithms are implemented in @ref AliHLTCOMPHuffmanAltro.
25 * The component can handle compressed and decompressed data of different formats.
26 * Two components are registered, the HuffmanCompressor and the HuffmanDecompressor.
27 * Component ID: \b COMPHuffmanCompressor, COMPHuffmanCompressor <br>
28 * Library: \b libAliHLTComp
29 *
30 * Mandatory arguments: <br>
31 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formating -->
32 * \li -origin <i> detector <\i> <br>
33 * set origin of data to specify Huffman code table to be read in (parameter transient)
34 * \li -runnumber <i> decimal number <\i> <br>
35 * set runnumber to specify Huffman code table to be read in (parameter transient)
36 * \li -dataspec <i> 0xYYXXaabb <\i> <br>
37 * set usual HLT dataspec (last slice, first slice, last patch, first patch)_Hexadezimal to specify Huffman code table to be read in
38 * \li -trailerwords <i> decimal number <\i> <br>
39 * set number of trailerwords of incoming data (ranging from 1 to 3)
40 *
41 * Optional arguments: <br>
42 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formating -->
43 * \li -tablepath <i> path to Huffman code table <\i> <br>
44 * set path to read Huffman code table from root file, if no path is given, path is set to current path (parameter transient)
45 *
46 * @ingroup alihlt_comp
47 */
48class AliHLTCOMPHuffmanAltroComponent : public AliHLTProcessor {
49 public:
50 /**
51 * constructor
52 * @param compression whether to use the compressor or decompressor
53 **/
54 AliHLTCOMPHuffmanAltroComponent(bool compression);
55 /** destructor */
56 virtual ~AliHLTCOMPHuffmanAltroComponent();
57
58 // Public functions to implement AliHLTComponent's interface.
59 // These functions are required for the registration process
60
61 const char* GetComponentID();
62 void GetInputDataTypes( vector<AliHLTComponentDataType>& list);
63 AliHLTComponentDataType GetOutputDataType();
64 virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
65 AliHLTComponent* Spawn();
66
67
68 protected:
69
70 // Protected functions to implement AliHLTComponent's interface.
71 // These functions provide initialization as well as the actual processing
72 // capabilities of the component.
73
74 int DoInit( int argc, const char** argv );
75 int DoDeinit();
76 int DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks,
77 AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr,
78 AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks );
79
80 private:
81 /** copy constructor prohibited */
82 AliHLTCOMPHuffmanAltroComponent(const AliHLTCOMPHuffmanAltroComponent&);
83 /** assignment operator prohibited */
84 AliHLTCOMPHuffmanAltroComponent& operator=(const AliHLTCOMPHuffmanAltroComponent&);
85
86 /** the entropy encoder object */
87 AliHLTCOMPHuffmanAltro* fHuffmanCompressor; // instance of Huffman compressor component
88 /** bool to decide whether to compress (TRUE) or to decompress (FALSE) */
89 Bool_t fCompressionSwitch; // mode choice for compressor instance from input line arguments
c2440081 90 /** bool to decide wheter to calibrate (create a new code table) (TRUE) or to (de)compress data (FALSE) */
91 Bool_t fTrainingMode; // mode choice for training instance from input line arguments
c2440081 92 /** specification of origin of input data to load correct Huffman code table */
93 TString fOrigin; // gets input line argument to specify the origin of the Huffman table
94 /** specification of run number to load correct Huffman code table */
95 AliHLTUInt64_t fRunNumber; // gets input line argument to specify run type of Huffman Table
96 /** data specifications (0xYYXXaabb) to load correct Huffman code table */
97 AliHLTUInt64_t fDataSpec; // gets input line argument to specify the data of the Huffman table
98 /** path to load Huffman code table from (if not explicitly given, table is taken from current path) */
99 TString fTablePath; // gets explicit path for Huffman table from command line
bf7a3243 100 /** number of NRCU trailer words of incoming data */
101 Int_t fNrcuTrailerwords; // number of rcu trailer words
102 /** pointer to Huffman code table for read in */
103 AliHLTCOMPHuffmanData* fHuffmanData; // instance of Huffman Data containing the code table
c2440081 104
105 //AliHLTUInt8_t fSlice; // determine slice number from input event block
106 //AliHLTUInt8_t fPatch; // determine patch number from input event bloc
107
108 ClassDef(AliHLTCOMPHuffmanAltroComponent, 0)
109 };
110#endif