added libAliHLTTRD, added libAliHLTTPC to AliRoot build system
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCEsdWriterComponent.h
CommitLineData
3cde846d 1// @(#) $Id$
2
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 */
7
8/** @file AliHLTTPCEsdWriterComponent.h
9 @author Matthias Richter
10 @date
11 @brief Writer component to store tracks of the HLT TPC conformal
12 mapping tracker in the AliESD format
13
14 */
15#include "AliHLTRootFileWriterComponent.h"
16
17// forward declarations
18class TTree;
19class AliESD;
20class AliHLTTPCTrackArray;
21
22/**
4fdaad1e 23 * @class AliHLTTPCEsdWriterComponent
24 * This class translates incoming track segments structures from the TPC
25 * conformal mapping tracker into the ESD fromat and writes it to a ROOT
26 * file.
27 * Arguments: <br>
28 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formating -->
29 * \li -datafile <i> filename </i> <br>
30 * file name base
31 * \li -directory <i> directory </i> <br>
32 * target directory
33 *
34 * @see AliHLTFileWriter and AliHLTRootFileWriterComponent for more parameters
3cde846d 35 */
36class AliHLTTPCEsdWriterComponent : public AliHLTRootFileWriterComponent
37{
38 public:
39 /** standard constructor */
40 AliHLTTPCEsdWriterComponent();
41 /** destructor */
42 ~AliHLTTPCEsdWriterComponent();
43
44 /**
45 * The id of the component.
46 * @return component id (string)
47 */
48 const char* GetComponentID() {return "TPCEsdWriter";};
49
50 /**
51 * Spawn function.
52 * @return new class instance
53 */
54 AliHLTComponent* Spawn() {return new AliHLTTPCEsdWriterComponent;}
55
56 protected:
57 /**
58 * Data processing method for the component.
59 * The function can be overloaded by specific ROOT file writer
60 * components.
61 * @param evtData event data structure
62 * @param blocks input data block descriptors
63 * @param trigData trigger data structure
64 */
65 virtual int DumpEvent( const AliHLTComponentEventData& evtData,
66 const AliHLTComponentBlockData* blocks,
67 AliHLTComponentTriggerData& trigData );
68
69 /**
70 * Scan one argument and adjacent parameters.
71 * @param argc size of the argument array
72 * @param argv agument array for component initialization
73 * @return number of processed members of the argv <br>
74 * -EINVAL unknown argument <br>
75 * -EPROTO parameter for argument missing <br>
76 */
77 int ScanArgument(int argc, const char** argv);
78
79 private:
80 /**
81 * Init the writer.
82 * The DoInit function is not available for this child class. InitWriter is the
83 * corresponding function for classes derived from AliHLTFileWriter.
84 */
85 int InitWriter();
86
87 /**
88 * Init the writer.
89 * The DoDeinit function is not available for this child class. CloseWriter is the
90 * corresponding function for classes derived from AliHLTFileWriter.
91 */
92 int CloseWriter();
93
94 /**
95 * Covert tracks to AliTPCtracks (AliKalmanTracks) and add them to ESD.
96 * @param pTracks array of tracks
97 * @param pESD pointer to ESD
98 * @return neg. error code if failed
99 */
100 int Tracks2ESD(AliHLTTPCTrackArray* pTracks, AliESD* pESD);
101
102 /** the ESD tree */
103 TTree* fTree; //! transient value
104
105 /** the ESD */
106 AliESD* fESD; //! transient value
107
108 ClassDef(AliHLTTPCEsdWriterComponent, 0)
109};
110#endif