]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/PHOS/html/AliHLTPHOSRawAnalyzerPeakFinder_8cxx-source.html
Added source code to the hrml documentation
[u/mrichter/AliRoot.git] / HLT / PHOS / html / AliHLTPHOSRawAnalyzerPeakFinder_8cxx-source.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3 <title>AliHLTPHOS: AliHLTPHOSRawAnalyzerPeakFinder.cxx Source File</title>
4 <link href="doxygen.css" rel="stylesheet" type="text/css">
5 </head><body>
6 <!-- Generated by Doxygen 1.3.9.1 -->
7 <div class="qindex"><a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
8 <h1>AliHLTPHOSRawAnalyzerPeakFinder.cxx</h1><a href="AliHLTPHOSRawAnalyzerPeakFinder_8cxx.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment">00001 
9 00002 <span class="comment">/**************************************************************************</span>
10 00003 <span class="comment"> * Copyright(c) 2006, ALICE Experiment at CERN, All rights reserved.      *</span>
11 00004 <span class="comment"> *                                                                        *</span>
12 00005 <span class="comment"> * Author: Per Thomas Hille for the ALICE HLT Project.                    *</span>
13 00006 <span class="comment"> * Contributors are mentioned in the code where appropriate.              *</span>
14 00007 <span class="comment"> *                                                                        *</span>
15 00008 <span class="comment"> * Permission to use, copy, modify and distribute this software and its   *</span>
16 00009 <span class="comment"> * documentation strictly for non-commercial purposes is hereby granted   *</span>
17 00010 <span class="comment"> * without fee, provided that the above copyright notice appears in all   *</span>
18 00011 <span class="comment"> * copies and that both the copyright notice and this permission notice   *</span>
19 00012 <span class="comment"> * appear in the supporting documentation. The authors make no claims     *</span>
20 00013 <span class="comment"> * about the suitability of this software for any purpose. It is          *</span>
21 00014 <span class="comment"> * provided "as is" without express or implied warranty.                  *</span>
22 00015 <span class="comment"> **************************************************************************/</span>
23 00016 
24 00017 <span class="preprocessor">#include "<a class="code" href="AliHLTPHOSRawAnalyzerPeakFinder_8h.html">AliHLTPHOSRawAnalyzerPeakFinder.h</a>"</span>
25 00018 <span class="preprocessor">#include &lt;iostream&gt;</span>
26 00019 
27 00020 <span class="keyword">using</span> std::cout;
28 00021 <span class="keyword">using</span> std::endl;
29 00022 
30 <a name="l00023"></a><a class="code" href="AliHLTPHOSRawAnalyzerPeakFinder_8cxx.html#a0">00023</a> <a class="code" href="AliHLTPHOSRawAnalyzerPeakFinder_8cxx.html#a0">ClassImp</a>(<a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html">AliHLTPHOSRawAnalyzerPeakFinder</a>) 
31 00024 
32 00025 
33 00026 <a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html">AliHLTPHOSRawAnalyzerPeakFinder</a>::<a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html">AliHLTPHOSRawAnalyzerPeakFinder</a>(const <a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html">AliHLTPHOSRawAnalyzerPeakFinder</a>&amp;):<a class="code" href="classAliHLTPHOSRawAnalyzer.html">AliHLTPHOSRawAnalyzer</a>(),tVector(0), aVector(0)
34 00027 {
35 00028 
36 00029 }
37 00030 
38 00031 
39 <a name="l00038"></a><a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFindera0">00038</a> <a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFindera0">AliHLTPHOSRawAnalyzerPeakFinder::AliHLTPHOSRawAnalyzerPeakFinder</a>():<a class="code" href="classAliHLTPHOSRawAnalyzer.html">AliHLTPHOSRawAnalyzer</a>(),tVector(0), aVector(0) 
40 00039 {
41 00040   cout &lt;&lt;<span class="stringliteral">"PeakFinder:You cannot invoke the Fitter without arguments"</span>&lt;&lt;endl;;
42 00041 }
43 00042 
44 00043 
45 00044 
46 <a name="l00045"></a><a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFindera3">00045</a> <a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFindera3">AliHLTPHOSRawAnalyzerPeakFinder::~AliHLTPHOSRawAnalyzerPeakFinder</a>()
47 00046 {
48 00047 
49 00048 } <span class="comment">//end AliHLTPHOSRawAnalyzerPeakFinder</span>
50 00049 
51 00050 <span class="keywordtype">void</span> 
52 <a name="l00051"></a><a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFindera4">00051</a> <a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFindera4">AliHLTPHOSRawAnalyzerPeakFinder::SetTVector</a>(<span class="keywordtype">double</span> *tVec)
53 00052 {
54 00053   <a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFinderr0">tVector</a> = tVec;
55 00054 }
56 00055 
57 00056 <span class="keywordtype">void</span>
58 <a name="l00057"></a><a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFindera5">00057</a> <a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFindera5">AliHLTPHOSRawAnalyzerPeakFinder::SetAVector</a>(<span class="keywordtype">double</span> *aVec)
59 00058 {
60 00059   <a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFinderr1">aVector</a> = aVec;
61 00060 
62 00061 }
63 00062 
64 00076 <span class="keywordtype">void</span> 
65 <a name="l00077"></a><a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFindera6">00077</a> <a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFindera6">AliHLTPHOSRawAnalyzerPeakFinder::Evaluate</a>(<span class="keywordtype">int</span> start, <span class="keywordtype">int</span> length)
66 00078 {
67 00079   fDTof = 0;
68 00080   fDAmpl = 0;
69 00081 
70 00082   <span class="keywordflow">if</span>(<a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFinderr0">tVector</a> == 0 || <a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFinderr1">aVector</a> == 0)
71 00083     {
72 00084       printf(<span class="stringliteral">"\nError: the peakfinder vectors are not specified, aborting !!!\n"</span>);
73 00085     }
74 00086   <span class="keywordflow">else</span>
75 00087     {
76 00088 
77 00089       printf(<span class="stringliteral">"\nstart = %d, length = %d\n"</span>, start, length);   
78 00090       <span class="keywordtype">double</span> tmpTime[1008];
79 00091       
80 00092       <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i=0; i &lt; length; i++)
81 00093         {  
82 00094           fDAmpl += <a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFinderr1">aVector</a>[i]*fFloatDataPtr[i];    
83 00095         }
84 00096   
85 00097       <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i=0; i &lt; length; i++)
86 00098         {   
87 00099           tmpTime[i] = <a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFinderr0">tVector</a>[i]*fFloatDataPtr[i];
88 00100           fDTof = fDTof + tmpTime[i]; 
89 00101         }
90 00102 
91 00103       fDTof = fDTof/fDAmpl;
92 00104     }
93 00105   <span class="comment">//thats all </span>
94 00106 } <span class="comment">//end FitPeakFinder</span>
95 00107 
96 00108 
97 00109 
98 00110 
99 </pre></div><hr size="1"><address style="align: right;"><small>Generated on Wed Jan 17 21:56:43 2007 for AliHLTPHOS by&nbsp;
100 <a href="http://www.doxygen.org/index.html">
101 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.3.9.1 </small></address>
102 </body>
103 </html>