]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/PHOS/AliHLTPHOSRawAnalyzerComponent.h
f14997cb161b644fe785bf51aa78171da8e83dbc
[u/mrichter/AliRoot.git] / HLT / PHOS / AliHLTPHOSRawAnalyzerComponent.h
1 #ifndef ALIHLTPHOSRAWANALYZERCOMPONENT_H
2 #define ALIHLTPHOSRAWANALYZERCOMPONENT_H
3
4 /* Copyright(c) 2006, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                          */
6
7 //
8 //Base class for PHOS HLT raw data analysis components
9 // see cxx file for more details
10
11 #include "AliHLTPHOSDefinitions.h"
12 #include "AliHLTPHOSCommonDefs.h"
13 #include "AliHLTPHOSProcessor.h"
14
15
16 class AliRawReaderMemory;
17 class AliCaloRawStream;
18 class AliHLTPHOSRawAnalyzer;
19 class AliHLTPHOSRcuCellEnergyDataStruct;
20 class AliHLTPHOSRcuChannelDataStruct;
21 class AliHLTPHOSMapper;
22 class AliHLTDDLDecoder;
23 class AliHLTAltroData;
24
25 class AliHLTPHOSRawAnalyzerComponent: public AliHLTPHOSProcessor
26 {
27  public:
28   AliHLTPHOSRawAnalyzerComponent();
29   virtual ~AliHLTPHOSRawAnalyzerComponent();
30   AliHLTPHOSRawAnalyzerComponent(const AliHLTPHOSRawAnalyzerComponent & );
31   AliHLTPHOSRawAnalyzerComponent & operator = (const AliHLTPHOSRawAnalyzerComponent &)
32    {
33       return *this;
34    };
35
36   virtual int DoInit(int argc =0, const char** argv  = 0);
37   virtual int Deinit();
38
39   //  void DumpData(int gain =0) const;
40   //  void DumpChannelData(Double_t *data =0) const; 
41
42   virtual const char* GetComponentID() = 0;
43   virtual void GetInputDataTypes( vector <AliHLTComponentDataType>& list);
44   virtual AliHLTComponentDataType GetOutputDataType();
45   virtual void GetOutputDataSize(unsigned long& constBase, double& inputMultiplier);
46   virtual AliHLTComponent* Spawn() = 0; 
47  protected:
48   AliHLTPHOSRawAnalyzer *fAnalyzerPtr;  /**<Pointer to an analyzer object used for raw data anlysis*/ 
49
50  private:
51   virtual int DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks, 
52                      AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr, 
53                      AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks ); 
54   void Reset();
55   void ResetDataPtr(int startindex = 0, int sampleCnt = 0);
56   Bool_t fSendChannelData;       /**<wether or not to send raw data from the component into shared memory*/
57   Double_t fTmpChannelData[ALTRO_MAX_SAMPLES];                        /**<temporary variable to store raw samples from a single altro channel*/
58   Double_t fMaxValues[N_MODULES][N_ROWS_MOD][N_COLUMNS_MOD][N_GAINS]; /**<array to store cell energies*/
59   AliCaloRawStream *fPHOSRawStream;                   /**<Streamer for PHOS raw data, used by fPHOSRawMemory reader*/ 
60   AliRawReaderMemory *fRawMemoryReader;               /**<Decoder to read PHOS raw data on the altro format*/  
61   AliHLTPHOSRcuCellEnergyDataStruct* fOutPtr;         /**<Pointer to outputbuffer to write results from the component into shared memory*/
62  
63   AliHLTPHOSMapper *fMapperPtr;
64
65   AliHLTDDLDecoder *fDecoderPtr;
66   AliHLTAltroData  *fAltroDataPtr;
67 };
68 #endif
69