//-*- Mode: C++ -*-
// @(#) $Id$
#ifndef ALIHLTTPCDIGITDUMPCOMPONENT_H
#define ALIHLTTPCDIGITDUMPCOMPONENT_H
/* This file is property of and copyright by the ALICE HLT Project *
* ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
/** @file AliHLTTPCDigitDumpComponent.h
@author Matthias Richter
@date
@brief Special file writer converting TPC digit input to ASCII.
*/
// see below for class documentation
// or
// refer to README to build package
// or
// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
#include "AliHLTFileWriter.h"
/**
* @class AliHLTTPCDigitDumpComponent
* A converter for digit data of the TPC input to ASCII output.
* Data blocks of type ::kAliHLTDataTypeDDLRaw and origin 'TPC ' is docoded
* written in readable ASCII format to a file.
*
* Component ID: \b TPCDigitDump
* Library: \b libAliHLTTPC
*
* See AliHLTFileWriter for arguments, further specific options
* Mandatory arguments:
*
*
* Optional arguments:
*
* \li -digitreader reader
* type of the digit reader: unpacked, packed, raw, decoder
* default 'decoder'
* \li -rcutrailersize size
* size of the RCU trailer in 32bit words (default 2), if digitreader
* 'decoder' is used, the trailer size is determined automatically
* \li -rawreadermode mode
* data mode of the AliHLTTPCDigitReaderRaw
* \li -unsorted
* unsorted mode of digit readers (default sorted)
* \li -sorted
* sorted mode of digit readers (default)
*
* @ingroup alihlt_tpc_components
*/
class AliHLTTPCDigitDumpComponent : public AliHLTFileWriter {
public:
/** default constructor */
AliHLTTPCDigitDumpComponent();
/** destructor */
virtual ~AliHLTTPCDigitDumpComponent();
// interface functions: property getters
virtual const char* GetComponentID();
virtual void GetInputDataTypes(AliHLTComponentDataTypeList& list);
virtual AliHLTComponent* Spawn();
protected:
// interface functions: processing
int InitWriter();
int CloseWriter();
int DumpEvent( const AliHLTComponentEventData& evtData,
const AliHLTComponentBlockData* blocks,
AliHLTComponentTriggerData& trigData );
using AliHLTDataSink::DumpEvent;
int ScanArgument(int argc, const char** argv);
private:
/** copy constructor prohibited */
AliHLTTPCDigitDumpComponent(const AliHLTTPCDigitDumpComponent&);
/** assignment operator prohibited */
AliHLTTPCDigitDumpComponent& operator=(const AliHLTTPCDigitDumpComponent&);
enum {
kDigitReaderInvalid,
kDigitReaderUnpacked,
kDigitReaderPacked,
kDigitReaderRaw,
kDigitReaderDecoder
};
/** the mode for the DigitReaderRaw */
unsigned fRawreaderMode; //!transient
/** the digit reader to use */
short fDigitReaderType; //!transient
/** size of the RCU trailer in 32bit words */
short fRcuTrailerSize; //! transient
/** unsorted/sorted mode of digit readers */
bool fUnsorted; //!transient
ClassDef(AliHLTTPCDigitDumpComponent, 0);
};
#endif