// @(#) $Id$
#ifndef ALIHLTTPCESDWRITERCOMPONENT_H
#define ALIHLTTPCESDWRITERCOMPONENT_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 AliHLTTPCEsdWriterComponent.h
@author Matthias Richter
@date
@brief Writer component to store tracks of the HLT TPC conformal
mapping tracker in the AliESD format
*/
#include "AliHLTRootFileWriterComponent.h"
#include "AliHLTProcessor.h"
// forward declarations
class TTree;
class AliESDEvent;
class AliHLTTPCTrackArray;
/**
* @class AliHLTTPCEsdWriterComponent
* Translation of internal TPC track data to the ESD format.
* This class translates incoming track segments structures from the TPC
* conformal mapping tracker (datatype TRAKSEGS/TPC) or tracks in global
* coordinates from the AliHLTTPCGlobalMergerComponent (TRACKS/TPC) into
* the ESD format.
*
* The \em TPCEsdWriter writes it to a ROOT file, the \em TPCEsdConverter
* to a TTree and sends the whole object to the output stream with data
* type ::kAliHLTDataTypeESDTree and origin TPC.
*
* In case of TRAKSEGS, the component can only process data block containing
* data of one slice, but it can read an unlimeted number of data blocks.
*
* componentid: \b TPCEsdWriter
* componentid: \b TPCEsdConverter
* componentlibrary: \b libAliHLTTPC.so
* Arguments TPCEsdWriter:
*
* \li -datafile filename
* file name base
* \li -directory directory
* target directory
*
* Arguments TPCEsdConverter:
*
* \li -notree
* write ESD directly to output (::kAliHLTDataTypeESDObject)
* this has been made the default behavior in Sep 2008.
* \li -tree
* write ESD directly to TTree and to output (::kAliHLTDataTypeESDTree)
* \li -solenoidBz
* magnetic field like -solenoidBz 5.0
*
*
* Example usage (HLT configuration file): * \* * @see AliHLTFileWriter and AliHLTRootFileWriterComponent for more parameters * * @ingroup alihlt_tpc_components */ class AliHLTTPCEsdWriterComponent : public AliHLTLogging { public: /** standard constructor */ AliHLTTPCEsdWriterComponent(); /** destructor */ ~AliHLTTPCEsdWriterComponent(); /** * class AliHLTTPCEsdWriterComponent::AliWriter * The writer component of the AliHLTTPCEsdWriterComponent. */ class AliWriter : public AliHLTRootFileWriterComponent { public: /** standard constructor */ AliWriter(); /** destructor */ virtual ~AliWriter(); /** * The id of the component. * @return component id (string) */ const char* GetComponentID() {return "TPCEsdWriter";}; void GetInputDataTypes(AliHLTComponentDataTypeList& list); /** * Spawn function. * @return new class instance */ AliHLTComponent* Spawn() {return new AliHLTTPCEsdWriterComponent::AliWriter;} protected: /** * Data processing method for the component. * The function can be overloaded by specific ROOT file writer * components. * @param evtData event data structure * @param blocks input data block descriptors * @param trigData trigger data structure */ int DumpEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks, AliHLTComponentTriggerData& trigData ); using AliHLTRootFileWriterComponent::DumpEvent; /** * Scan one argument and adjacent parameters. * @param argc size of the argument array * @param argv agument array for component initialization * @return number of processed members of the argv* \ *AliRootWrapperSubscriber -eventmodulo 1 * -componentid TPCEsdWriter * -componentlibrary libAliHLTTPC.so * -componentargs "-datafile AliESDs.root" * \ * * \TR0-SC\ * \master\ * \* \