Line data Source code
1 : //-*- Mode: C++ -*-
2 : // $Id: AliHLTCALOUtilities.h 34264 2009-08-14 18:29:23Z odjuvsla $
3 :
4 : #ifndef ALIHLTCALOUTILITIES_H
5 : #define ALIHLTCALOUTILITIES_H
6 :
7 : /**************************************************************************
8 : * This file is property of and copyright by the Experimental Nuclear *
9 : * Physics Group, Dep. of Physics *
10 : * University of Oslo, Norway, 2007 *
11 : * *
12 : * Author: Per Thomas Hille <perthi@fys.uio.no> for the ALICE HLT Project.*
13 : * Contributors are mentioned in the code where appropriate. *
14 : * Please report bugs to perthi@fys.uio.no *
15 : * *
16 : * Permission to use, copy, modify and distribute this software and its *
17 : * documentation strictly for non-commercial purposes is hereby granted *
18 : * without fee, provided that the above copyright notice appears in all *
19 : * copies and that both the copyright notice and this permission notice *
20 : * appear in the supporting documentation. The authors make no claims *
21 : * about the suitability of this software for any purpose. It is *
22 : * provided "as is" without express or implied warranty. *
23 : **************************************************************************/
24 :
25 : #include <iostream>
26 :
27 : using namespace std;
28 :
29 0 : class AliHLTCaloUtilities
30 : {
31 : public:
32 : AliHLTCaloUtilities();
33 : virtual ~AliHLTCaloUtilities();
34 :
35 : template<typename T>
36 : static T MaxValue(T *array, int N)
37 : {
38 : T tmpMax = 0;
39 :
40 0 : for(int i = 0; i < N; i++)
41 : {
42 0 : if(array[i] > tmpMax)
43 : {
44 : tmpMax = array[i];
45 0 : }
46 : }
47 0 : return tmpMax;
48 : }
49 :
50 : };
51 :
52 : #endif
|