3 #ifndef ALIHLTTPCESDWRITERCOMPONENT_H
4 #define ALIHLTTPCESDWRITERCOMPONENT_H
5 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
6 * See cxx source for full Copyright notice */
8 /** @file AliHLTTPCEsdWriterComponent.h
9 @author Matthias Richter
11 @brief Writer component to store tracks of the HLT TPC conformal
12 mapping tracker in the AliESD format
15 #include "AliHLTRootFileWriterComponent.h"
17 // forward declarations
20 class AliHLTTPCTrackArray;
23 * @class AliHLTTPCEsdWriterComponent
24 * This class translates incoming track segments structures from the TPC
25 * conformal mapping tracker (datatype TRAKSEGS/TPC) or tracks in global
26 * coordinates from the AliHLTTPCGlobalMergerComponent (TRACKS/TPC) into
27 * the ESD fromat and writes it to a ROOT file. In case of TRAKSEGS, the
28 * component can only process data block containing data of one slice, but
29 * it can read an unlimeted number of data blocks.
31 * componentid: TPCEsdWriter <br>
32 * componentlibrary libAliHLTTPC.so <br>
34 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formating -->
35 * \li -datafile <i> filename </i> <br>
37 * \li -directory <i> directory </i> <br>
41 * Example usage (HLT configuration file):
42 * \<Proc ID="EsdWriter" type="prc">
43 * \<Cmd>AliRootWrapperSubscriber -eventmodulo 1
44 * -componentid TPCEsdWriter
45 * -componentlibrary libAliHLTTPC.so
46 * -componentargs "-datafile AliESDs.root"
49 * \<Parent>TR0-SC\</Parent>
50 * \<Node>master\</Node>
51 * \<Shm blocksize="1k" blockcount="1" type="sysv"/>
55 * @see AliHLTFileWriter and AliHLTRootFileWriterComponent for more parameters
57 class AliHLTTPCEsdWriterComponent : public AliHLTRootFileWriterComponent
60 /** standard constructor */
61 AliHLTTPCEsdWriterComponent();
63 ~AliHLTTPCEsdWriterComponent();
66 * The id of the component.
67 * @return component id (string)
69 const char* GetComponentID() {return "TPCEsdWriter";};
73 * @return new class instance
75 AliHLTComponent* Spawn() {return new AliHLTTPCEsdWriterComponent;}
79 * Data processing method for the component.
80 * The function can be overloaded by specific ROOT file writer
82 * @param evtData event data structure
83 * @param blocks input data block descriptors
84 * @param trigData trigger data structure
86 virtual int DumpEvent( const AliHLTComponentEventData& evtData,
87 const AliHLTComponentBlockData* blocks,
88 AliHLTComponentTriggerData& trigData );
91 * Scan one argument and adjacent parameters.
92 * @param argc size of the argument array
93 * @param argv agument array for component initialization
94 * @return number of processed members of the argv <br>
95 * -EINVAL unknown argument <br>
96 * -EPROTO parameter for argument missing <br>
98 int ScanArgument(int argc, const char** argv);
101 /** copy constructor prohibited */
102 AliHLTTPCEsdWriterComponent(const AliHLTTPCEsdWriterComponent&);
103 /** assignment operator prohibited */
104 AliHLTTPCEsdWriterComponent& operator=(const AliHLTTPCEsdWriterComponent&);
108 * The DoInit function is not available for this child class. InitWriter is the
109 * corresponding function for classes derived from AliHLTFileWriter.
115 * The DoDeinit function is not available for this child class. CloseWriter is the
116 * corresponding function for classes derived from AliHLTFileWriter.
121 * Covert tracks to AliTPCtracks (AliKalmanTracks) and add them to ESD.
122 * @param pTracks array of tracks
123 * @param pESD pointer to ESD
124 * @return neg. error code if failed
126 int Tracks2ESD(AliHLTTPCTrackArray* pTracks, AliESDEvent* pESD);
129 TTree* fTree; //! transient value
132 AliESDEvent* fESD; //! transient value
134 ClassDef(AliHLTTPCEsdWriterComponent, 1)