]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/AliHLTTPCEventStatisticsProducerComponent.h
Various contributions by Jochen
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCEventStatisticsProducerComponent.h
1 //-*- Mode: C++ -*-
2 // $Id$
3 #ifndef ALIHLTTPCEVENTSTATISTICSPRODUCERCOMPONENT_H
4 #define ALIHLTTPCEVENTSTATISTICSPRODUCERCOMPONENT_H
5
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   AliHLTTPCEventStatisticsProducerComponent.h
11     @author Jochen Thaeder
12     @date   
13     @brief  Component for the @see AliHLTTPCEventStatisticsProducer class
14 */
15
16 // see below for class documentation
17 // or
18 // refer to README to build package
19 // or
20 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt   
21
22 #include "AliHLTProcessor.h"
23
24 #include "AliHLTTPCEventStatistics.h"
25 #include "AliHLTTPCTrackArray.h"
26
27 /**
28  * @class  AliHLTTPCEventStatisticsProducerComponent
29  * @brief  Component for the @see AliHLTTPCEventStatisticsProducer class
30  *
31  *
32  * @ingroup alihlt_run_statistics alihlt_trigger
33  */
34
35 class AliHLTTPCEventStatisticsProducerComponent : public AliHLTProcessor {
36   
37 public:
38   
39   /** constructor */
40   AliHLTTPCEventStatisticsProducerComponent();
41   /** destructor */
42   virtual ~AliHLTTPCEventStatisticsProducerComponent();
43
44   // Public functions to implement AliHLTComponent's interface.
45   // These functions are required for the registration process
46   
47   const char* GetComponentID();
48   void GetInputDataTypes( AliHLTComponentDataTypeList& list );
49
50   AliHLTComponentDataType GetOutputDataType();
51   Int_t GetOutputDataTypes( AliHLTComponentDataTypeList& tgtList );
52
53   virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
54   AliHLTComponent* Spawn();
55
56  protected:
57
58   using AliHLTProcessor::DoEvent;
59
60   // Protected functions to implement AliHLTComponent's interface.
61   // These functions provide initialization as well as the actual processing
62   // capabilities of the component. 
63   
64   /** Initialize the trigger component. */
65   Int_t DoInit( int argc, const char** argv );
66
67   /** DeInitialize the trigger component. */
68   Int_t DoDeinit();
69   
70   /** Process the data in the trigger component */
71   Int_t DoEvent( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData);
72
73   // ------------------------------------------------------------------------------------------
74
75   /** Initialize for next event */
76   void InitializeEvent();                  
77
78   /** Add new cluster block 
79    * @param ptr   Pointer to data block
80    * @param size  Size of data block
81    * @param slice Slice
82    * @param patch Patch
83    */
84   void AddClusters( void* ptr, AliHLTUInt32_t size, Int_t slice, Int_t patch );
85
86   /** Add new tracks block
87    * @param ptr   Pointer to data block
88    * @param size  Size of data block
89    * @param slice Slice, default is -1 for GlobalMerger tracks
90    */
91   void AddTracks( void* ptr, AliHLTUInt32_t size, Int_t slice=-1 );     
92
93   /** Process even -> get process statistics */
94   void ProcessEvent();                          
95
96   /** Fill tracks per slice ( @see fNTracksPerSlice ), if global tracks */
97   void FillTracksPerSlice();    
98
99   /** Get ptr to @see AliHLTTPCEventStatistics, is a TObject */
100   AliHLTTPCEventStatistics* GetEventStatistics() { return fEvStat; }    
101
102 private:
103  
104   /** copy constructor prohibited */
105   AliHLTTPCEventStatisticsProducerComponent (const AliHLTTPCEventStatisticsProducerComponent&);
106
107   /** assignment operator prohibited */
108   AliHLTTPCEventStatisticsProducerComponent& operator= (const AliHLTTPCEventStatisticsProducerComponent&);
109
110   /** Threshold for long tracks */
111   Int_t fClusterThreshold;                                                                           // see above
112
113   /** Event Statistics class*/
114   AliHLTTPCEventStatistics* fEvStat;                                                                 //! transient
115
116   /** Tracks per slice */
117   Int_t fNTracksPerSlice[36];                                                                        // see above
118
119   /** Track container of class @see AliHLTTPCTrackArray */
120   AliHLTTPCTrackArray *fTracks;                                                                      //! transient
121
122   /** If tracks in global coordinates @see fTracksPerSlice has still to be filled */
123   Bool_t fGlobalTracks;                                                                              // see above
124
125   /** Number of slices with tracks */
126   Int_t fNSlice;                                                                                     // see above
127
128   ClassDef(AliHLTTPCEventStatisticsProducerComponent, 0);
129
130 };
131 #endif
132