Various small fixes. Make sure Emacs knows it's C++ mode, and the like.
[u/mrichter/AliRoot.git] / FMD / AliFMDCalibSampleRate.cxx
CommitLineData
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 **************************************************************************/
15
16/* $Id$ */
17
18//____________________________________________________________________
19//
20//
21//
22#include "AliFMDCalibSampleRate.h" // ALIFMDCALIBGAIN_H
23#include "AliFMDParameters.h" // ALIFMDPARAMETERS_H
24
25//____________________________________________________________________
26ClassImp(AliFMDCalibSampleRate)
27#if 0
28 ; // This is here to keep Emacs for indenting the next line
29#endif
30
31//____________________________________________________________________
32AliFMDCalibSampleRate::AliFMDCalibSampleRate()
33 : fRates(3)
34{
35 fRates.Reset(0);
36}
37
38//____________________________________________________________________
39AliFMDCalibSampleRate::AliFMDCalibSampleRate(const AliFMDCalibSampleRate& o)
40 : TObject(o), fRates(o.fRates)
41{}
42
43//____________________________________________________________________
44AliFMDCalibSampleRate&
45AliFMDCalibSampleRate::operator=(const AliFMDCalibSampleRate& o)
46{
47 fRates = o.fRates;
48 return (*this);
49}
50
51//____________________________________________________________________
52void
53AliFMDCalibSampleRate::Set(UShort_t ddl, UShort_t rate)
54{
55 if (ddl - AliFMDParameters::kBaseDDL < 0) return;
56 fRates[ddl - AliFMDParameters::kBaseDDL] = rate;
57}
58
59//____________________________________________________________________
60UShort_t
61AliFMDCalibSampleRate::Rate(UShort_t ddl) const
62{
63 if (ddl - AliFMDParameters::kBaseDDL < 0) return 0;
64 return fRates[ddl - AliFMDParameters::kBaseDDL];
65}
66
67//____________________________________________________________________
68//
69// EOF
70//