1 #ifndef ALIHLTPHOSBASE_H
2 #define ALIHLTPHOSBASE_H
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 *
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 *
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 **************************************************************************/
25 #include "AliHLTDataTypes.h"
26 #include "AliHLTPHOSConstants.h"
27 #include "AliHLTPHOSConfig.h"
28 #include "AliHLTPHOSAltroConfig.h"
29 #include "AliHLTLogging.h"
31 using namespace PhosHLTConst;
35 // Base class for all PHOS HLT classes.
36 // The class contains some utility functions
37 // and also loads data about the HLT configuration
38 // and the altro/FEE configuration
42 class AliHLTPHOSBase : public AliHLTPHOSConfig, public AliHLTPHOSAltroConfig
46 virtual ~AliHLTPHOSBase();
47 bool CheckFile(const char *fileName, const char *opt) const;
51 void DumpData(T *array, int N, int nPerLine)
53 cout << "DumpData N= " << N <<endl;
54 for(int i= 0; i< N; i++)
56 if((i%nPerLine == 0) && (i != 0))
61 cout << array[i]<< "\t";
66 void ResetArray(T *array, int N) const
68 for(int i= 0; i< N; i++)
75 T MaxValue(T *array, int N) const
79 for(int i = 0; i < N; i++)
92 AliHLTPHOSConfig *fConfigPtr; // object holding HLT configuration data
93 AliHLTPHOSConfig *fAltroConfigPtr; // object holding Altro configuration data
96 AliHLTLogging *fLogPtr;
98 AliHLTPHOSBase(const AliHLTPHOSBase & );
99 AliHLTPHOSBase & operator = (const AliHLTPHOSBase &);