]>
Commit | Line | Data |
---|---|---|
8f6ee336 | 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 | **************************************************************************/ | |
8f6ee336 | 15 | /* $Id$ */ |
c2fc1258 | 16 | /** @file AliFMDCalibSampleRate.cxx |
17 | @author Christian Holm Christensen <cholm@nbi.dk> | |
18 | @date Sun Mar 26 18:31:09 2006 | |
19 | @brief Per digitizer card pulser calibration | |
20 | */ | |
8f6ee336 | 21 | //____________________________________________________________________ |
22 | // | |
23 | // | |
24 | // | |
25 | #include "AliFMDCalibSampleRate.h" // ALIFMDCALIBGAIN_H | |
26 | #include "AliFMDParameters.h" // ALIFMDPARAMETERS_H | |
c2fc1258 | 27 | #include <AliLog.h> |
8f6ee336 | 28 | |
29 | //____________________________________________________________________ | |
30 | ClassImp(AliFMDCalibSampleRate) | |
31 | #if 0 | |
32 | ; // This is here to keep Emacs for indenting the next line | |
33 | #endif | |
34 | ||
35 | //____________________________________________________________________ | |
36 | AliFMDCalibSampleRate::AliFMDCalibSampleRate() | |
c2fc1258 | 37 | : fRates(AliFMDMap::kMaxDetectors, AliFMDMap::kMaxRings, 2, 1) |
38 | // fRates(3) | |
8f6ee336 | 39 | { |
c2fc1258 | 40 | fRates.Reset(1); |
8f6ee336 | 41 | } |
42 | ||
43 | //____________________________________________________________________ | |
44 | AliFMDCalibSampleRate::AliFMDCalibSampleRate(const AliFMDCalibSampleRate& o) | |
45 | : TObject(o), fRates(o.fRates) | |
46 | {} | |
47 | ||
48 | //____________________________________________________________________ | |
49 | AliFMDCalibSampleRate& | |
50 | AliFMDCalibSampleRate::operator=(const AliFMDCalibSampleRate& o) | |
51 | { | |
52 | fRates = o.fRates; | |
53 | return (*this); | |
54 | } | |
55 | ||
56 | //____________________________________________________________________ | |
57 | void | |
c2fc1258 | 58 | AliFMDCalibSampleRate::Set(UShort_t det, Char_t ring, |
59 | UShort_t sector, UShort_t, UShort_t rate) | |
8f6ee336 | 60 | { |
c2fc1258 | 61 | UInt_t nSec = (ring == 'I' ? 20 : 40); |
62 | UInt_t board = sector / nSec; | |
63 | fRates(det, ring, board, 0) = rate; | |
8f6ee336 | 64 | } |
65 | ||
66 | //____________________________________________________________________ | |
67 | UShort_t | |
c2fc1258 | 68 | AliFMDCalibSampleRate::Rate(UShort_t det, Char_t ring, |
69 | UShort_t sec, UShort_t) const | |
8f6ee336 | 70 | { |
c2fc1258 | 71 | UInt_t nSec = (ring == 'I' ? 20 : 40); |
72 | UInt_t board = sec / nSec; | |
73 | AliDebug(10, Form("Getting sample rate for FMD%d%c[%2d,0] (board %d)", | |
74 | det, ring, sec, board)); | |
75 | return fRates(det, ring, board, 0); | |
8f6ee336 | 76 | } |
77 | ||
78 | //____________________________________________________________________ | |
79 | // | |
80 | // EOF | |
81 | // |