]>
Commit | Line | Data |
---|---|---|
a3537838 | 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 | **************************************************************************/ | |
a3537838 | 15 | /* $Id$ */ |
c2fc1258 | 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 | |
02a27b50 | 20 | @ingroup FMD_base |
c2fc1258 | 21 | */ |
a3537838 | 22 | //____________________________________________________________________ |
23 | // | |
02a27b50 | 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 | |
a3537838 | 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() | |
b5ee4425 | 39 | : fValue(), |
40 | fWidth() | |
a3537838 | 41 | { |
02a27b50 | 42 | // CTOR |
a3537838 | 43 | fValue.Reset(-1.); |
44 | fWidth.Reset(-1.); | |
45 | } | |
46 | ||
47 | //____________________________________________________________________ | |
48 | AliFMDCalibPedestal::AliFMDCalibPedestal(const AliFMDCalibPedestal& o) | |
b5ee4425 | 49 | : TObject(o), |
50 | fValue(o.fValue), | |
51 | fWidth(o.fWidth) | |
02a27b50 | 52 | { |
53 | // Copy Ctor | |
54 | } | |
a3537838 | 55 | |
56 | //____________________________________________________________________ | |
57 | AliFMDCalibPedestal& | |
58 | AliFMDCalibPedestal::operator=(const AliFMDCalibPedestal& o) | |
59 | { | |
02a27b50 | 60 | // Assignment operator |
a3537838 | 61 | fValue = o.fValue; |
62 | fWidth = o.fWidth; | |
63 | return (*this); | |
64 | } | |
65 | ||
66 | //____________________________________________________________________ | |
67 | void | |
68 | AliFMDCalibPedestal::Set(UShort_t det, Char_t ring, UShort_t sec, | |
69 | UShort_t str, Float_t ped, Float_t pedW) | |
70 | { | |
02a27b50 | 71 | // set value and width for a strip |
a3537838 | 72 | if (fValue.CheckIndex(det, ring, sec, str) < 0) return; |
73 | fValue(det, ring, sec, str) = ped; | |
74 | fWidth(det, ring, sec, str) = pedW; | |
75 | } | |
76 | ||
77 | //____________________________________________________________________ | |
78 | Float_t | |
79 | AliFMDCalibPedestal::Value(UShort_t det, Char_t ring, UShort_t sec, | |
80 | UShort_t str) | |
81 | { | |
02a27b50 | 82 | // Get pedestal value for a strip |
a3537838 | 83 | return fValue(det, ring, sec, str); |
84 | } | |
85 | ||
86 | //____________________________________________________________________ | |
87 | Float_t | |
88 | AliFMDCalibPedestal::Width(UShort_t det, Char_t ring, UShort_t sec, | |
89 | UShort_t str) | |
90 | { | |
02a27b50 | 91 | // Get pedestal width for a strip |
c2fc1258 | 92 | return fWidth(det, ring, sec, str); |
a3537838 | 93 | } |
94 | ||
95 | //____________________________________________________________________ | |
96 | // | |
97 | // EOF | |
98 | // |