]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/PHOS/AliHLTPHOSProcessor.h
moving all definitions to AliHLTPHOSDefinitions
[u/mrichter/AliRoot.git] / HLT / PHOS / AliHLTPHOSProcessor.h
1 #ifndef ALIHLTPHOSPROCESSOR_H
2 #define ALIHLTPHOSPROCESSOR_H
3
4 #include "AliHLTProcessor.h"
5 #include "AliHLTPHOSConstants.h"
6 #include "AliHLTPHOSCommonDefs.h"
7 #include "TString.h"
8 #include "AliHLTPHOSDefinitions.h"
9 #include "Rtypes.h"
10 #include <iostream>
11
12 using namespace PhosHLTConst;
13
14 class AliHLTPHOSProcessor:public AliHLTProcessor
15 {
16  public:
17   AliHLTPHOSProcessor();
18   virtual ~AliHLTPHOSProcessor();
19   virtual int DoInit(int argc, const char** argv) = 0;
20   virtual int Deinit() = 0;
21   virtual const char* GetComponentID() = 0;
22   virtual void GetInputDataTypes( std::vector <AliHLTComponentDataType>& list) =0;
23   virtual AliHLTComponentDataType GetOutputDataType() =0;
24   virtual void GetOutputDataSize(unsigned long& constBase, double& inputMultiplier) =0;
25   virtual AliHLTComponent* Spawn() = 0; 
26
27   template<typename T> 
28     void  DumpData(T *array, int N, int nPerLine)
29     {
30       cout <<   "DumpData N=  " << N <<endl;
31       for(int i= 0; i< N; i++)
32         {
33           if((i%nPerLine == 0)  &&  (i != 0))
34             {
35               printf("\n");
36             }
37
38           cout << array[i]<< "\t";
39
40         }
41     }
42
43   template<typename T> 
44     void  Reset(T *array, int N)
45     {
46       for(int i= 0; i< N; i++)
47         {
48           array[i] = 0;
49         }
50     }
51
52
53  protected:
54   int fPhosEventCount;                  /**<Global event counter for this component*/
55   AliHLTUInt8_t  fModuleID;             /**<ID of the module this component read data from (0-4)*/
56   Bool_t fPrintInfo;                    /**<wether or not to print debugg info to std out*/
57   int fPrintInfoFrequncy;               /**<Defines the update frequency for information printet to std out*/
58   static const AliHLTComponentDataType fgkInputDataTypes[]; /**<List of  datatypes that can be given to this component*/
59  private:
60     AliHLTPHOSProcessor(const AliHLTPHOSProcessor & );
61     AliHLTPHOSProcessor & operator = (const AliHLTPHOSProcessor &);
62
63 };
64
65
66 #endif