]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/PHOS/AliHLTPHOSBase.h
New base for all classes in HLT/PHOS
[u/mrichter/AliRoot.git] / HLT / PHOS / AliHLTPHOSBase.h
1 #ifndef ALIHLTPHOSBASE_H
2 #define ALIHLTPHOSBASE_H
3
4 /**************************************************************************
5  * This file is property of and copyright by the Experimental Nuclear     *
6  * Physics Group, Dep. of Physics                                         *
7  * University of Oslo, Norway, 2007                                       *
8  *                                                                        *
9  * Author: Per Thomas Hille <perthi@fys.uio.no> for the ALICE HLT Project.*
10  * Contributors are mentioned in the code where appropriate.              *
11  * Please report bugs to perthi@fys.uio.no                                *
12  *                                                                        *
13  * Permission to use, copy, modify and distribute this software and its   *
14  * documentation strictly for non-commercial purposes is hereby granted   *
15  * without fee, provided that the above copyright notice appears in all   *
16  * copies and that both the copyright notice and this permission notice   *
17  * appear in the supporting documentation. The authors make no claims     *
18  * about the suitability of this software for any purpose. It is          *
19  * provided "as is" without express or implied warranty.                  *
20  **************************************************************************/
21
22 #include <iostream>
23 #include <Rtypes.h>
24 #include "TString.h"
25 #include "AliHLTDataTypes.h"
26 #include "AliHLTPHOSDefinitions.h"
27 #include "AliHLTPHOSConstants.h"
28 #include "AliHLTPHOSCommonDefs.h"
29
30 using namespace PhosHLTConst;
31 using namespace std;
32
33 class  AliHLTPHOSBase
34 {
35  public:
36   AliHLTPHOSBase();
37   virtual ~AliHLTPHOSBase();
38
39   template<typename T> 
40     void  DumpData(T *array, int N, int nPerLine)
41     {
42       cout <<   "DumpData N=  " << N <<endl;
43       for(int i= 0; i< N; i++)
44         {
45           if((i%nPerLine == 0)  &&  (i != 0))
46             {
47               printf("\n");
48             }
49
50           cout << array[i]<< "\t";
51
52         }
53     }
54
55   template<typename T> 
56     void  Reset(T *array, int N)
57     {
58       for(int i= 0; i< N; i++)
59         {
60           array[i] = 0;
61         }
62     }
63  
64  private:
65   AliHLTPHOSBase(const AliHLTPHOSBase & );
66   AliHLTPHOSBase & operator = (const AliHLTPHOSBase &);
67
68 };
69
70 #endif