]>
Commit | Line | Data |
---|---|---|
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 | #include "AliHLTFileWriter.h" | |
17 | ||
18 | /** | |
19 | * @class AliHLTTPCDigitDumpComponent | |
20 | * A converter for digit data of the TPC input to ASCII output. | |
21 | * Data blocks of type ::kAliHLTDataTypeDDLRaw and origin 'TPC ' is docoded | |
22 | * written in readable ASCII format to a file. | |
23 | * | |
24 | * Component ID: \b TPCDigitDump <br> | |
25 | * Library: \b libAliHLTTPC | |
26 | * | |
27 | * See AliHLTFileWriter for arguments, further specific options | |
28 | * Mandatory arguments: <br> | |
29 | * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting --> | |
30 | * | |
31 | * Optional arguments: <br> | |
32 | * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting --> | |
33 | * \li -digitreader <i> reader </i> <br> | |
34 | * type of the digit reader: <i>unpacked, packed, raw, decoder</i> | |
35 | * default 'decoder' | |
36 | * \li -rcutrailersize <i> size </i> <br> | |
37 | * size of the RCU trailer in 32bit words (default 2), if digitreader | |
38 | * 'decoder' is used, the trailer size is determined automatically | |
39 | * \li -rawreadermode <i> mode </i> <br> | |
40 | * data mode of the <b>AliHLTTPCDigitReaderRaw</b> | |
41 | * \li -unsorted <br> | |
42 | * unsorted mode of digit readers (default sorted) | |
43 | * \li -sorted <br> | |
44 | * sorted mode of digit readers (default) | |
45 | * | |
46 | * @ingroup alihlt_tpc_components | |
47 | */ | |
48 | class AliHLTTPCDigitDumpComponent : public AliHLTFileWriter { | |
49 | public: | |
50 | /** default constructor */ | |
51 | AliHLTTPCDigitDumpComponent(); | |
52 | /** destructor */ | |
53 | virtual ~AliHLTTPCDigitDumpComponent(); | |
54 | ||
55 | // interface functions: property getters | |
56 | virtual const char* GetComponentID(); | |
57 | virtual void GetInputDataTypes(AliHLTComponentDataTypeList& list); | |
58 | virtual AliHLTComponent* Spawn(); | |
59 | ||
60 | protected: | |
61 | // interface functions: processing | |
62 | int InitWriter(); | |
63 | int CloseWriter(); | |
64 | int DumpEvent( const AliHLTComponentEventData& evtData, | |
65 | const AliHLTComponentBlockData* blocks, | |
66 | AliHLTComponentTriggerData& trigData ); | |
67 | using AliHLTDataSink::DumpEvent; | |
68 | ||
69 | int ScanArgument(int argc, const char** argv); | |
70 | ||
71 | private: | |
72 | /** copy constructor prohibited */ | |
73 | AliHLTTPCDigitDumpComponent(const AliHLTTPCDigitDumpComponent&); | |
74 | /** assignment operator prohibited */ | |
75 | AliHLTTPCDigitDumpComponent& operator=(const AliHLTTPCDigitDumpComponent&); | |
76 | ||
77 | enum { | |
78 | kDigitReaderInvalid, | |
79 | kDigitReaderUnpacked, | |
80 | kDigitReaderPacked, | |
81 | kDigitReaderRaw, | |
82 | kDigitReaderDecoder | |
83 | }; | |
84 | ||
85 | /** the mode for the DigitReaderRaw */ | |
86 | unsigned fRawreaderMode; //!transient | |
87 | ||
88 | /** the digit reader to use */ | |
89 | short fDigitReaderType; //!transient | |
90 | ||
91 | /** size of the RCU trailer in 32bit words */ | |
92 | short fRcuTrailerSize; //! transient | |
93 | ||
94 | /** unsorted/sorted mode of digit readers */ | |
95 | bool fUnsorted; //!transient | |
96 | ||
97 | ClassDef(AliHLTTPCDigitDumpComponent, 0); | |
98 | }; | |
99 | ||
100 | #endif |