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 *
10 /** @file AliHLTTPCDigitDumpComponent.h
11 @author Matthias Richter
13 @brief Special file writer converting TPC digit input to ASCII.
16 #include "AliHLTFileWriter.h"
18 class AliHLTTPCDigitReader;
21 * @class AliHLTTPCDigitDumpComponent
22 * A converter for digit data of the TPC input to ASCII output.
23 * Data blocks of type ::kAliHLTDataTypeDDLRaw and origin 'TPC ' is docoded
24 * written in readable ASCII format to a file.
26 * The component supports different types of readers in order to
27 * choose different data formats (raw/digits) and reading modes.
29 * Component ID: \b TPCDigitDump <br>
30 * Library: \b libAliHLTTPC
32 * See AliHLTFileWriter for arguments, further specific options
33 * Mandatory arguments: <br>
34 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
36 * Optional arguments: <br>
37 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
38 * \li -digitreader <i> reader </i> <br>
39 * type of the digit reader: <i>unpacked, packed, raw, decoder</i>
41 * \li -rcutrailersize <i> size </i> <br>
42 * size of the RCU trailer in 32bit words (default 2), if digitreader
43 * 'decoder' is used, the trailer size is determined automatically
45 * unsorted mode of digit readers (default mode)
47 * sorted mode of digit readers (default is unsorted)
49 * bulk read mode: NextChannel/Bunch
51 * stream read mode: Next
53 * @ingroup alihlt_tpc_components
55 class AliHLTTPCDigitDumpComponent : public AliHLTFileWriter {
57 /** default constructor */
58 AliHLTTPCDigitDumpComponent();
60 virtual ~AliHLTTPCDigitDumpComponent();
62 // interface functions: property getters
63 virtual const char* GetComponentID();
64 virtual void GetInputDataTypes(AliHLTComponentDataTypeList& list);
65 virtual AliHLTComponent* Spawn();
68 // interface functions: processing
71 int DumpEvent( const AliHLTComponentEventData& evtData,
72 const AliHLTComponentBlockData* blocks,
73 AliHLTComponentTriggerData& trigData );
74 using AliHLTDataSink::DumpEvent;
76 int ScanArgument(int argc, const char** argv);
79 /** copy constructor prohibited */
80 AliHLTTPCDigitDumpComponent(const AliHLTTPCDigitDumpComponent&);
81 /** assignment operator prohibited */
82 AliHLTTPCDigitDumpComponent& operator=(const AliHLTTPCDigitDumpComponent&);
85 * Print slice/partition/row/pad header if changed.
87 int PrintHeaders(int slice, int &iPrintedSlice,
88 int part, int &iPrintedPart,
89 AliHLTTPCDigitReader* pReader,
90 int &iPrintedRow, int &iPrintedPad,
91 ofstream &dump) const;
97 kDigitReaderRaw, // deprecated but kept for backward compatiobility of macros
101 /** the digit reader to use */
102 short fDigitReaderType; //!transient
104 /** size of the RCU trailer in 32bit words */
105 short fRcuTrailerSize; //! transient
107 /** unsorted/sorted mode of digit readers */
108 bool fUnsorted; //!transient
110 /** bulk read mode */
111 bool fbBulkMode; //!transient
113 /** the digit reader */
114 AliHLTTPCDigitReader* fpReader; //!transient
116 ClassDef(AliHLTTPCDigitDumpComponent, 2);