]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TRD/AliHLTTRDEsdWriterComponent.h
bugfixes by Theodor and Raphaelle
[u/mrichter/AliRoot.git] / HLT / TRD / AliHLTTRDEsdWriterComponent.h
1 //-*- Mode: C++ -*-
2 // $Id$
3
4 #ifndef ALIHLTTRDESDWRITERCOMPONENT_H
5 #define ALIHLTTRDESDWRITERCOMPONENT_H
6 //* This file is property of and copyright by the ALICE HLT Project        * 
7 //* ALICE Experiment at CERN, All rights reserved.                         *
8 //* See cxx source for full Copyright notice                               *
9
10 /** @file   AliHLTTRDEsdWriterComponent.h
11     @author Mateusz Ploskon
12     @date   
13     @brief  Writer component to store tracks of the HLT TRD 
14
15                                                                           */
16 #include "AliHLTRootFileWriterComponent.h"
17
18 // forward declarations
19 class TTree;
20 class AliESDEvent;
21
22 /**
23  * @class AliHLTTRDEsdWriterComponent
24  * @see AliHLTFileWriter and AliHLTRootFileWriterComponent for more parameters
25  */
26 class AliHLTTRDEsdWriterComponent : public AliHLTRootFileWriterComponent
27 {
28  public:
29   /** standard constructor */
30   AliHLTTRDEsdWriterComponent();
31   /** destructor */
32   ~AliHLTTRDEsdWriterComponent();
33
34   /**
35    * The id of the component.
36    * @return component id (string)
37    */
38   const char* GetComponentID() {return "TRDEsdWriter";};
39
40   void GetInputDataTypes( vector<AliHLTComponent_DataType>& list);
41
42   /**
43    * Spawn function.
44    * @return new class instance
45    */
46   virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
47   AliHLTComponent* Spawn() {return new AliHLTTRDEsdWriterComponent;}
48
49  protected:
50   /**
51    * Data processing method for the component.
52    * The function can be overloaded by specific ROOT file writer
53    * components.
54    * @param evtData       event data structure
55    * @param blocks        input data block descriptors
56    * @param trigData      trigger data structure
57    */
58   virtual int DumpEvent( const AliHLTComponentEventData& evtData,
59                          const AliHLTComponentBlockData* blocks, 
60                          AliHLTComponentTriggerData& trigData );
61                          
62   using AliHLTRootFileWriterComponent::DumpEvent;
63
64   /**
65    * Scan one argument and adjacent parameters.
66    * @param argc           size of the argument array
67    * @param argv           agument array for component initialization
68    * @return number of processed members of the argv <br>
69    *         -EINVAL unknown argument <br>
70    *         -EPROTO parameter for argument missing <br>
71    */
72   int ScanArgument(int argc, const char** argv);
73   
74   
75
76  private:
77   /** not a valid copy constructor, defined according to effective C++ style */
78   AliHLTTRDEsdWriterComponent(const AliHLTTRDEsdWriterComponent&);
79   /** not a valid assignment op, but defined according to effective C++ style */
80   AliHLTTRDEsdWriterComponent& operator=(const AliHLTTRDEsdWriterComponent&);
81
82   /**
83    * Init the writer.
84    * The DoInit function is not available for this child class. InitWriter is the
85    * corresponding function for classes derived from AliHLTFileWriter.
86    */
87   int InitWriter();
88
89   /**
90    * Init the writer.
91    * The DoDeinit function is not available for this child class. CloseWriter is the
92    * corresponding function for classes derived from AliHLTFileWriter.
93    */
94   int CloseWriter();
95
96   /** the ESD tree */
97   TTree* fTree; //! transient value
98   
99   /** output percentage descared*/
100   Int_t fOutputPercentage; 
101
102   /** the ESD */
103   AliESDEvent* fESD; //! transient value
104
105   int DoEvent(  const AliHLTComponent_EventData& evtData,
106                                                 const AliHLTComponent_BlockData* blocks,
107                                                 AliHLTComponent_TriggerData& /*trigData*/,
108                                                 AliHLTUInt8_t* /*outputPtr*/,
109                                                 AliHLTUInt32_t& /*size*/,
110                                                 vector<AliHLTComponent_BlockData>& /*outputBlocks*/);
111                                                 
112   ClassDef(AliHLTTRDEsdWriterComponent, 1)
113
114 };
115 #endif