]>
Commit | Line | Data |
---|---|---|
1 | /************************************************************************** | |
2 | * This file is property of and copyright by the Relativistic Heavy Ion * | |
3 | * Group (RHIG), Department of Physics Yale University, US, 2010 * | |
4 | * * | |
5 | * Author: Per Thomas Hille <perthomas.hille@yale.edu> for the ALICE EMCAL* | |
6 | * project. Contributors are mentioned in the code where appropriate. * | |
7 | * Please report bugs to perthomas.hille@yale.edu * | |
8 | * * | |
9 | * Permission to use, copy, modify and distribute this software and its * | |
10 | * documentation strictly for non-commercial purposes is hereby granted * | |
11 | * without fee, provided that the above copyright notice appears in all * | |
12 | * copies and that both the copyright notice and this permission notice * | |
13 | * appear in the supporting documentation. The authors make no claims * | |
14 | * about the suitability of this software for any purpose. It is * | |
15 | * provided "as is" without express or implied warranty. * | |
16 | **************************************************************************/ | |
17 | ||
18 | //Container class for Peak Finder vectors | |
19 | ||
20 | #include "AliCaloPeakFinderVectors.h" | |
21 | #include <iostream> | |
22 | ||
23 | ||
24 | using namespace std; | |
25 | ||
26 | ||
27 | ||
28 | ClassImp( AliCaloPeakFinderVectors) | |
29 | ||
30 | ||
31 | ||
32 | AliCaloPeakFinderVectors::AliCaloPeakFinderVectors() | |
33 | { | |
34 | ResetVectors(); | |
35 | } | |
36 | ||
37 | ||
38 | AliCaloPeakFinderVectors::~AliCaloPeakFinderVectors() | |
39 | { | |
40 | ||
41 | } | |
42 | ||
43 | ||
44 | void | |
45 | AliCaloPeakFinderVectors::ResetVectors() | |
46 | { | |
47 | // As implied by function name | |
48 | for(int i=0; i < MAXSTART; i++ ) | |
49 | { | |
50 | for(int j=0; j < SAMPLERANGE; j++) | |
51 | { | |
52 | if(i < MAXSTART && j < SAMPLERANGE ) | |
53 | { | |
54 | for(int k = 0; k < 100; k++) | |
55 | { | |
56 | fPFAmpV[i][j][k] = 0 ; | |
57 | fPFTofV[i][j][k] = 0 ; | |
58 | fPFAmpVC[i][j][k] = 0 ; | |
59 | fPFTofVC[i][j][k] = 0 ; | |
60 | } | |
61 | } | |
62 | } | |
63 | } | |
64 | } | |
65 | ||
66 | ||
67 | void | |
68 | AliCaloPeakFinderVectors::SetVector(const int i, const int j, const Double_t *const a, const Double_t *const t, | |
69 | const Double_t *const ac, const Double_t *const tc ) | |
70 | { | |
71 | // As implied by function name | |
72 | if(i < MAXSTART && j < SAMPLERANGE ) | |
73 | { | |
74 | for(int k = 0; k < 100; k++) | |
75 | { | |
76 | fPFAmpV[i][j][k] = a[k]; | |
77 | fPFTofV[i][j][k] = t[k]; | |
78 | fPFAmpVC[i][j][k] = ac[k]; | |
79 | fPFTofVC[i][j][k] = tc[k]; | |
80 | } | |
81 | } | |
82 | } | |
83 | ||
84 | ||
85 | void | |
86 | AliCaloPeakFinderVectors::GetVector(const int i, const int j, Double_t *const a, Double_t *const t, | |
87 | Double_t *const ac, Double_t *const tc ) const | |
88 | { | |
89 | // As implied by function name | |
90 | if(i < MAXSTART && j < SAMPLERANGE ) | |
91 | { | |
92 | for( int k = 0; k < 100; k++) | |
93 | { | |
94 | a[k] = fPFAmpV[i][j][k]; | |
95 | t[k] = fPFTofV[i][j][k]; | |
96 | ac[k] = fPFAmpVC[i][j][k]; | |
97 | tc[k] = fPFTofVC[i][j][k]; | |
98 | } | |
99 | } | |
100 | } | |
101 | ||
102 | ||
103 | void | |
104 | AliCaloPeakFinderVectors::PrintVectors() const | |
105 | { | |
106 | // As implied by function name | |
107 | cout << __FILE__ << __LINE__ << __FUNCTION__ << endl; | |
108 | for(int i= 0; i < MAXSTART; i++ ) | |
109 | { | |
110 | for(int j=0; j < SAMPLERANGE; j++ ) | |
111 | { | |
112 | for(int k=0; k < 10; k++ ) | |
113 | { | |
114 | cout << fPFAmpV[i][j][k] << "\t"; | |
115 | } | |
116 | cout << endl; | |
117 | } | |
118 | cout << endl; | |
119 | } | |
120 | } | |
121 |