]>
Commit | Line | Data |
---|---|---|
3e6ec852 | 1 | //-*- Mode: C++ -*- |
2 | // @(#) $Id$ | |
3 | ||
4 | #ifndef ALIHLTTPCDIGITDUMPCOMPONENT_H | |
5 | #define ALIHLTTPCDIGITDUMPCOMPONENT_H | |
6 | /* This file is property of and copyright by the ALICE HLT Project * | |
7 | * ALICE Experiment at CERN, All rights reserved. * | |
8 | * See cxx source for full Copyright notice */ | |
9 | ||
10 | /** @file AliHLTTPCDigitDumpComponent.h | |
11 | @author Matthias Richter | |
12 | @date | |
13 | @brief Special file writer converting TPC digit input to ASCII. | |
14 | */ | |
15 | ||
16 | // see below for class documentation | |
17 | // or | |
18 | // refer to README to build package | |
19 | // or | |
20 | // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt | |
21 | ||
22 | #include "AliHLTFileWriter.h" | |
23 | ||
24 | /** | |
25 | * @class AliHLTTPCDigitDumpComponent | |
26 | * A converter for digit data of the TPC input to ASCII output. | |
2efb85be | 27 | * Data blocks of type ::kAliHLTDataTypeDDLRaw and origin 'TPC ' is docoded |
32a35f9f | 28 | * written in readable ASCII format to a file. |
3e6ec852 | 29 | * |
30 | * Component ID: \b TPCDigitDump <br> | |
31 | * Library: \b libAliHLTTPC | |
32 | * | |
33 | * See AliHLTFileWriter for arguments, further specific options | |
34 | * Mandatory arguments: <br> | |
35 | * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formating --> | |
36 | * | |
37 | * Optional arguments: <br> | |
38 | * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formating --> | |
8c27b00a | 39 | * \li -digitreader <i> reader </i> <br> |
7c9a4e09 | 40 | * type of the digit reader: <i>unpacked, packed, raw, decoder</i> |
41 | * default 'decoder' | |
70d0b23e | 42 | * \li -rcutrailersize <i> size </i> <br> |
7c9a4e09 | 43 | * size of the RCU trailer in 32bit words (default 2), if digitreader |
44 | * 'decoder' is used, the trailer size is determined automatically | |
45 | * \li -rawreadermode <i> mode </i> <br> | |
46 | * data mode of the <b>AliHLTTPCDigitReaderRaw</b> | |
70d0b23e | 47 | * \li -unsorted <br> |
48 | * unsorted mode of digit readers (default sorted) | |
49 | * \li -sorted <br> | |
50 | * sorted mode of digit readers (default) | |
3e6ec852 | 51 | * |
2efb85be | 52 | * @ingroup alihlt_tpc_components |
3e6ec852 | 53 | */ |
54 | class AliHLTTPCDigitDumpComponent : public AliHLTFileWriter { | |
55 | public: | |
56 | /** default constructor */ | |
57 | AliHLTTPCDigitDumpComponent(); | |
58 | /** destructor */ | |
59 | virtual ~AliHLTTPCDigitDumpComponent(); | |
60 | ||
61 | // interface functions: property getters | |
62 | virtual const char* GetComponentID(); | |
63 | virtual void GetInputDataTypes(AliHLTComponentDataTypeList& list); | |
64 | virtual AliHLTComponent* Spawn(); | |
65 | ||
66 | protected: | |
67 | // interface functions: processing | |
00b50bfa | 68 | int InitWriter(); |
69 | int CloseWriter(); | |
70 | int DumpEvent( const AliHLTComponentEventData& evtData, | |
71 | const AliHLTComponentBlockData* blocks, | |
72 | AliHLTComponentTriggerData& trigData ); | |
73 | using AliHLTDataSink::DumpEvent; | |
74 | ||
75 | int ScanArgument(int argc, const char** argv); | |
3e6ec852 | 76 | |
3e6ec852 | 77 | private: |
78 | /** copy constructor prohibited */ | |
79 | AliHLTTPCDigitDumpComponent(const AliHLTTPCDigitDumpComponent&); | |
80 | /** assignment operator prohibited */ | |
81 | AliHLTTPCDigitDumpComponent& operator=(const AliHLTTPCDigitDumpComponent&); | |
82 | ||
8c27b00a | 83 | enum { |
84 | kDigitReaderInvalid, | |
85 | kDigitReaderUnpacked, | |
86 | kDigitReaderPacked, | |
7c9a4e09 | 87 | kDigitReaderRaw, |
88 | kDigitReaderDecoder | |
8c27b00a | 89 | }; |
90 | ||
e1440dab | 91 | /** the mode for the DigitReaderRaw */ |
92 | unsigned fRawreaderMode; //!transient | |
93 | ||
8c27b00a | 94 | /** the digit reader to use */ |
95 | short fDigitReaderType; //!transient | |
96 | ||
70d0b23e | 97 | /** size of the RCU trailer in 32bit words */ |
98 | short fRcuTrailerSize; //! transient | |
99 | ||
100 | /** unsorted/sorted mode of digit readers */ | |
101 | bool fUnsorted; //!transient | |
102 | ||
3e6ec852 | 103 | ClassDef(AliHLTTPCDigitDumpComponent, 0); |
104 | }; | |
105 | ||
106 | #endif |