AliRoot Core  3dc7879 (3dc7879)
AliCaloPeakFinderVectors.cxx
Go to the documentation of this file.
1 // -*- mode: c++ -*-
2 /**************************************************************************
3  * This file is property of and copyright by the Relativistic Heavy Ion *
4  * Group (RHIG), Department of Physics Yale University, US, 2010 *
5  * *
6  * Author: Per Thomas Hille <perthomas.hille@yale.edu> for the ALICE EMCAL*
7  * project. Contributors are mentioned in the code where appropriate. *
8  * Please report bugs to perthomas.hille@yale.edu *
9  * *
10  * Permission to use, copy, modify and distribute this software and its *
11  * documentation strictly for non-commercial purposes is hereby granted *
12  * without fee, provided that the above copyright notice appears in all *
13  * copies and that both the copyright notice and this permission notice *
14  * appear in the supporting documentation. The authors make no claims *
15  * about the suitability of this software for any purpose. It is *
16  * provided "as is" without express or implied warranty. *
17  **************************************************************************/
18 
20 #include <iostream>
21 
22 using namespace std;
23 
25 ClassImp( AliCaloPeakFinderVectors ) ;
27 
30 //_______________________________________________________________________
32 {
33  ResetVectors();
34 }
35 
38 //_______________________________________________________________________
40 { }
41 
44 //_______________________________________________________________________
45 void
47 {
48  for(int i=0; i < PF::MAXSTART; i++ )
49  {
50  for(int j=0; j < PF::SAMPLERANGE; j++)
51  {
52  if(i < PF::MAXSTART && j < PF::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 
68 //_______________________________________________________________________
69 void
70 AliCaloPeakFinderVectors::SetVector(const int i, const int j,
71  const Double_t *const a, const Double_t *const t,
72  const Double_t *const ac, const Double_t *const tc )
73 {
74  if(i < PF::MAXSTART && j < PF::SAMPLERANGE )
75  {
76  for(int k = 0; k < 100; k++)
77  {
78  fPFAmpV[i][j][k] = a[k];
79  fPFTofV[i][j][k] = t[k];
80  fPFAmpVC[i][j][k] = ac[k];
81  fPFTofVC[i][j][k] = tc[k];
82  }
83  }
84 }
85 
88 //_______________________________________________________________________
89 void
90 AliCaloPeakFinderVectors::GetVector(const int i, const int j,
91  Double_t *const a, Double_t *const t,
92  Double_t *const ac, Double_t *const tc ) const
93 {
94  if(i < PF::MAXSTART && j < PF::SAMPLERANGE )
95  {
96  for( int k = 0; k < 100; k++)
97  {
98  a[k] = fPFAmpV[i][j][k];
99  t[k] = fPFTofV[i][j][k];
100  ac[k] = fPFAmpVC[i][j][k];
101  tc[k] = fPFTofVC[i][j][k];
102  }
103  }
104 }
105 
108 //_______________________________________________________________________
109 void
111 {
112  cout << __FILE__ << __LINE__ << __FUNCTION__ << endl;
113  for(int i= 0; i < PF::MAXSTART; i++ )
114  {
115  for(int j=0; j < PF::SAMPLERANGE; j++ )
116  {
117  for(int k=0; k < 10; k++ )
118  {
119  cout << fPFAmpV[i][j][k] << "\t";
120  }
121  cout << endl;
122  }
123  cout << endl;
124  }
125 }
126 
#define SAMPLERANGE
Definition: pfocdbmaker.C:23
#define MAXSTART
Definition: pfocdbmaker.C:22
virtual ~AliCaloPeakFinderVectors()
Destructor.
void ResetVectors()
Reset vectors.
void PrintVectors() const
Dump vectors information.
void SetVector(const int i, const int j, const Double_t *const a, const Double_t *const t, const Double_t *const ac, const Double_t *const tc)
Set vectors.
Container class for Peak Finder vectors.
void GetVector(const int i, const int j, Double_t *const a, Double_t *const t, Double_t *const ac, Double_t *const tc) const
Get vectors.