]> git.uio.no Git - u/mrichter/AliRoot.git/blob - FMD/AliFMDCalibPedestal.cxx
Fixed compilation warnings with gcc-4.
[u/mrichter/AliRoot.git] / FMD / AliFMDCalibPedestal.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
7  * Permission to use, copy, modify and distribute this software and its   *
8  * documentation strictly for non-commercial purposes is hereby granted   *
9  * without fee, provided that the above copyright notice appears in all   *
10  * copies and that both the copyright notice and this permission notice   *
11  * appear in the supporting documentation. The authors make no claims     *
12  * about the suitability of this software for any purpose. It is          *
13  * provided "as is" without express or implied warranty.                  *
14  **************************************************************************/
15 /* $Id$ */
16 /** @file    AliFMDCalibPedestal.cxx
17     @author  Christian Holm Christensen <cholm@nbi.dk>
18     @date    Sun Mar 26 18:30:36 2006
19     @brief   Per strip pedestal calibration 
20     @ingroup FMD_base
21 */
22 //____________________________________________________________________
23 //                                                                          
24 // This class stores a pedestal and pedestal width for each strip in
25 // the FMD detectors. 
26 // The values are stored as floats, since they may be results from a
27 // fit. 
28 // Need to make algorithm that makes this data
29 //
30 #include "AliFMDCalibPedestal.h"        // ALIFMDCALIBPEDESTAL_H
31 //____________________________________________________________________
32 ClassImp(AliFMDCalibPedestal)
33 #if 0
34   ; // This is here to keep Emacs for indenting the next line
35 #endif
36
37 //____________________________________________________________________
38 AliFMDCalibPedestal::AliFMDCalibPedestal()
39 {
40   // CTOR 
41   fValue.Reset(-1.);
42   fWidth.Reset(-1.);
43 }
44
45 //____________________________________________________________________
46 AliFMDCalibPedestal::AliFMDCalibPedestal(const AliFMDCalibPedestal& o)
47   : TObject(o), fValue(o.fValue), fWidth(o.fWidth)
48 {
49   // Copy Ctor 
50 }
51
52 //____________________________________________________________________
53 AliFMDCalibPedestal&
54 AliFMDCalibPedestal::operator=(const AliFMDCalibPedestal& o)
55 {
56   // Assignment operator 
57   fValue = o.fValue;
58   fWidth = o.fWidth;
59   return (*this);
60 }
61
62 //____________________________________________________________________
63 void
64 AliFMDCalibPedestal::Set(UShort_t det, Char_t ring, UShort_t sec, 
65                          UShort_t str, Float_t ped, Float_t pedW)
66 {
67   // set value and width for a strip 
68   if (fValue.CheckIndex(det, ring, sec, str) < 0) return;
69   fValue(det, ring, sec, str) = ped;
70   fWidth(det, ring, sec, str) = pedW;
71 }
72
73 //____________________________________________________________________
74 Float_t
75 AliFMDCalibPedestal::Value(UShort_t det, Char_t ring, UShort_t sec, 
76                            UShort_t str)
77 {
78   // Get pedestal value for a strip 
79   return fValue(det, ring, sec, str);
80 }
81
82 //____________________________________________________________________
83 Float_t
84 AliFMDCalibPedestal::Width(UShort_t det, Char_t ring, UShort_t sec, 
85                            UShort_t str)
86 {
87   // Get pedestal width for a strip 
88   return fWidth(det, ring, sec, str);
89 }
90
91 //____________________________________________________________________
92 //
93 // EOF
94 //