]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/PHOS/AliHLTPHOSRawAnalyzerComponent.h
Coding conventions & doccumentation
[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 "AliHLTProcessor.h"
12 #include "AliHLTPHOSDefinitions.h"
13 #include "AliHLTPHOSCommonDefs.h"
14
15
16 class AliRawReaderMemory;
17 class AliCaloRawStream;
18 class AliHLTPHOSRawAnalyzer;
19 class AliHLTPHOSRcuCellEnergyDataStruct;
20 class AliHLTPHOSRcuChannelDataStruct;
21
22 class AliHLTPHOSRawAnalyzerComponent: public AliHLTProcessor
23 {
24  public:
25   AliHLTPHOSRawAnalyzerComponent();
26   virtual ~AliHLTPHOSRawAnalyzerComponent();
27   AliHLTPHOSRawAnalyzerComponent(const AliHLTPHOSRawAnalyzerComponent & );
28   AliHLTPHOSRawAnalyzerComponent & operator = (const AliHLTPHOSRawAnalyzerComponent &)
29    {
30       return *this;
31    };
32   virtual int DoInit(int argc =0, const char** argv  = 0);
33   virtual int Deinit();
34   virtual int DoDeinit();
35   void DumpData(int gain =0) const;
36   void DumpChannelData(Double_t *data =0) const; 
37   void SetEquippmentID(AliHLTUInt16_t id =0);
38   const AliHLTUInt16_t  GetEquippmentID() const;
39   void SetCoordinates(AliHLTUInt16_t equippmentID =0);
40   virtual const char* GetComponentID() = 0;
41   //  virtual void GetInputDataTypes(std::vector<AliHLTComponentDataType, std::allocator<AliHLTComponentDataType> >&);
42   virtual void GetInputDataTypes( std::vector <AliHLTComponentDataType>& list);
43
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  private:
50   virtual int DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks, 
51                      AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr, 
52                      AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks ); 
53   void Reset();
54   void ResetDataPtr(int startindex = 0, int sampleCnt = 0);
55   static int fgEventCount;       /**<Global event counter for this component*/
56   const AliHLTUInt16_t fkEquippmentID;  /**<Equippment ID as defined by ALICE*/
57   AliHLTUInt8_t  fModuleID;      /**<ID of the module this component read data from (0-4)*/
58   AliHLTUInt8_t  fRcuX;          /**<X position of RCU the data from this Equippment comes from (0 or 1)*/
59   AliHLTUInt8_t  fRcuZ;          /**<Z position of RCU the data from this Equippment comes from (0 or 1)*/
60   AliHLTUInt8_t  fRcuZOffset;    /**<offset in therms of towers in the Z direction relative to the module*/ 
61   AliHLTUInt8_t  fRcuXOffset;    /**<offset in therms of towers in the X direction relative to the module*/ 
62   Bool_t fPrintInfo;             /**<wether or not to print debugg info to std out*/
63   Bool_t fSendChannelData;       /**<wether or not to send raw data from the component into shared memory*/
64   Double_t fTmpChannelData[ALTRO_MAX_SAMPLES];                        /**<temporary variable to store raw samples from a single altro channel*/
65   Double_t fMaxValues[N_MODULES][N_ROWS_MOD][N_COLUMNS_MOD][N_GAINS]; /**<array to store cell energies*/
66   int fPrintInfoFrequncy;                             /**<Defines the update frequency for information printet to std out*/
67   AliCaloRawStream *fPHOSRawStream;                   /**<Streamer for PHOS raw data, used by fPHOSRawMemory reader*/ 
68   AliRawReaderMemory *fRawMemoryReader;               /**<Decoder to read PHOS raw data on the altro format*/  
69   AliHLTPHOSRcuCellEnergyDataStruct* fOutPtr;         /**<Pointer to outputbuffer to write results from the component into shared memory*/
70   static const AliHLTComponentDataType fgkInputDataTypes[]; /**<List of  datatypes that can be given to this component*/
71 };
72 #endif
73