]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/TPCLib/AliHLTTPCDigitDumpComponent.h
Bugfix, comparison of string -sorted was not correct.
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCDigitDumpComponent.h
CommitLineData
3e6ec852 1//-*- Mode: C++ -*-
2// @(#) $Id$
3
4#ifndef ALIHLTTPCDIGITDUMPCOMPONENT_H
5#define ALIHLTTPCDIGITDUMPCOMPONENT_H
297174de 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 *
3e6ec852 9
10/** @file AliHLTTPCDigitDumpComponent.h
11 @author Matthias Richter
12 @date
13 @brief Special file writer converting TPC digit input to ASCII.
14*/
15
3e6ec852 16#include "AliHLTFileWriter.h"
17
7e1566e3 18class AliHLTTPCDigitReader;
19
3e6ec852 20/**
21 * @class AliHLTTPCDigitDumpComponent
22 * A converter for digit data of the TPC input to ASCII output.
2efb85be 23 * Data blocks of type ::kAliHLTDataTypeDDLRaw and origin 'TPC ' is docoded
32a35f9f 24 * written in readable ASCII format to a file.
3e6ec852 25 *
7e1566e3 26 * The component supports different types of readers in order to
27 * choose different data formats (raw/digits) and reading modes.
28 *
3e6ec852 29 * Component ID: \b TPCDigitDump <br>
30 * Library: \b libAliHLTTPC
31 *
32 * See AliHLTFileWriter for arguments, further specific options
33 * Mandatory arguments: <br>
1ac82ce6 34 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
3e6ec852 35 *
36 * Optional arguments: <br>
1ac82ce6 37 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
8c27b00a 38 * \li -digitreader <i> reader </i> <br>
7c9a4e09 39 * type of the digit reader: <i>unpacked, packed, raw, decoder</i>
40 * default 'decoder'
70d0b23e 41 * \li -rcutrailersize <i> size </i> <br>
7c9a4e09 42 * size of the RCU trailer in 32bit words (default 2), if digitreader
43 * 'decoder' is used, the trailer size is determined automatically
70d0b23e 44 * \li -unsorted <br>
7e1566e3 45 * unsorted mode of digit readers (default mode)
70d0b23e 46 * \li -sorted <br>
7e1566e3 47 * sorted mode of digit readers (default is unsorted)
48 * \li -bulk <br>
49 * bulk read mode: NextChannel/Bunch
50 * \li -stream <br>
51 * stream read mode: Next
3e6ec852 52 *
2efb85be 53 * @ingroup alihlt_tpc_components
3e6ec852 54 */
55class AliHLTTPCDigitDumpComponent : public AliHLTFileWriter {
56 public:
57 /** default constructor */
58 AliHLTTPCDigitDumpComponent();
59 /** destructor */
60 virtual ~AliHLTTPCDigitDumpComponent();
61
62 // interface functions: property getters
63 virtual const char* GetComponentID();
64 virtual void GetInputDataTypes(AliHLTComponentDataTypeList& list);
65 virtual AliHLTComponent* Spawn();
66
67 protected:
68 // interface functions: processing
00b50bfa 69 int InitWriter();
70 int CloseWriter();
71 int DumpEvent( const AliHLTComponentEventData& evtData,
72 const AliHLTComponentBlockData* blocks,
73 AliHLTComponentTriggerData& trigData );
74 using AliHLTDataSink::DumpEvent;
75
76 int ScanArgument(int argc, const char** argv);
3e6ec852 77
3e6ec852 78 private:
79 /** copy constructor prohibited */
80 AliHLTTPCDigitDumpComponent(const AliHLTTPCDigitDumpComponent&);
81 /** assignment operator prohibited */
82 AliHLTTPCDigitDumpComponent& operator=(const AliHLTTPCDigitDumpComponent&);
83
7e1566e3 84 /**
85 * Print slice/partition/row/pad header if changed.
86 */
87 int PrintHeaders(int slice, int &iPrintedSlice,
88 int part, int &iPrintedPart,
89 AliHLTTPCDigitReader* pReader,
90 int &iPrintedRow, int &iPrintedPad,
91 ofstream &dump) const;
92
8c27b00a 93 enum {
94 kDigitReaderInvalid,
95 kDigitReaderUnpacked,
96 kDigitReaderPacked,
51b88d1e 97 kDigitReaderRaw, // deprecated but kept for backward compatiobility of macros
7c9a4e09 98 kDigitReaderDecoder
8c27b00a 99 };
100
8c27b00a 101 /** the digit reader to use */
102 short fDigitReaderType; //!transient
103
70d0b23e 104 /** size of the RCU trailer in 32bit words */
105 short fRcuTrailerSize; //! transient
106
107 /** unsorted/sorted mode of digit readers */
108 bool fUnsorted; //!transient
109
7e1566e3 110 /** bulk read mode */
111 bool fbBulkMode; //!transient
112
113 /** the digit reader */
114 AliHLTTPCDigitReader* fpReader; //!transient
115
116 ClassDef(AliHLTTPCDigitDumpComponent, 2);
3e6ec852 117};
118
119#endif