code cleanup: unused define
[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;
af885e0f 19class AliESDEvent;
3cde846d 20class AliHLTTPCTrackArray;
21
22/**
4fdaad1e 23 * @class AliHLTTPCEsdWriterComponent
24 * This class translates incoming track segments structures from the TPC
de554e07 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.
30 *
31 * componentid: TPCEsdWriter <br>
32 * componentlibrary libAliHLTTPC.so <br>
4fdaad1e 33 * Arguments: <br>
34 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formating -->
35 * \li -datafile <i> filename </i> <br>
36 * file name base
37 * \li -directory <i> directory </i> <br>
38 * target directory
39 *
6014e33a 40 * <pre>
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"
47 * \</Cmd>
48 *
49 * \<Parent>TR0-SC\</Parent>
50 * \<Node>master\</Node>
51 * \<Shm blocksize="1k" blockcount="1" type="sysv"/>
52 * \</Proc>
53 * </pre>
54 *
4fdaad1e 55 * @see AliHLTFileWriter and AliHLTRootFileWriterComponent for more parameters
3cde846d 56 */
57class AliHLTTPCEsdWriterComponent : public AliHLTRootFileWriterComponent
58{
59 public:
60 /** standard constructor */
61 AliHLTTPCEsdWriterComponent();
62 /** destructor */
63 ~AliHLTTPCEsdWriterComponent();
64
65 /**
66 * The id of the component.
67 * @return component id (string)
68 */
69 const char* GetComponentID() {return "TPCEsdWriter";};
70
71 /**
72 * Spawn function.
73 * @return new class instance
74 */
75 AliHLTComponent* Spawn() {return new AliHLTTPCEsdWriterComponent;}
76
77 protected:
78 /**
79 * Data processing method for the component.
80 * The function can be overloaded by specific ROOT file writer
81 * components.
82 * @param evtData event data structure
83 * @param blocks input data block descriptors
84 * @param trigData trigger data structure
85 */
86 virtual int DumpEvent( const AliHLTComponentEventData& evtData,
87 const AliHLTComponentBlockData* blocks,
88 AliHLTComponentTriggerData& trigData );
89
5d2abf3b 90 using AliHLTRootFileWriterComponent::DumpEvent;
91
3cde846d 92 /**
93 * Scan one argument and adjacent parameters.
94 * @param argc size of the argument array
95 * @param argv agument array for component initialization
96 * @return number of processed members of the argv <br>
97 * -EINVAL unknown argument <br>
98 * -EPROTO parameter for argument missing <br>
99 */
100 int ScanArgument(int argc, const char** argv);
101
102 private:
8f8bf0af 103 /** copy constructor prohibited */
7e99beb3 104 AliHLTTPCEsdWriterComponent(const AliHLTTPCEsdWriterComponent&);
8f8bf0af 105 /** assignment operator prohibited */
7e99beb3 106 AliHLTTPCEsdWriterComponent& operator=(const AliHLTTPCEsdWriterComponent&);
107
3cde846d 108 /**
109 * Init the writer.
110 * The DoInit function is not available for this child class. InitWriter is the
111 * corresponding function for classes derived from AliHLTFileWriter.
112 */
113 int InitWriter();
114
115 /**
116 * Init the writer.
117 * The DoDeinit function is not available for this child class. CloseWriter is the
118 * corresponding function for classes derived from AliHLTFileWriter.
119 */
120 int CloseWriter();
121
122 /**
123 * Covert tracks to AliTPCtracks (AliKalmanTracks) and add them to ESD.
124 * @param pTracks array of tracks
125 * @param pESD pointer to ESD
126 * @return neg. error code if failed
127 */
af885e0f 128 int Tracks2ESD(AliHLTTPCTrackArray* pTracks, AliESDEvent* pESD);
3cde846d 129
130 /** the ESD tree */
131 TTree* fTree; //! transient value
132
133 /** the ESD */
af885e0f 134 AliESDEvent* fESD; //! transient value
3cde846d 135
af885e0f 136 ClassDef(AliHLTTPCEsdWriterComponent, 1)
3cde846d 137};
138#endif