]> git.uio.no Git - u/mrichter/AliRoot.git/blob - FMD/AliFMDCalibSampleRate.h
Fancy on-line monitor
[u/mrichter/AliRoot.git] / FMD / AliFMDCalibSampleRate.h
1 #ifndef ALIFMDCALIBSAMPLERATE_H
2 #define ALIFMDCALIBSAMPLERATE_H
3 /* Copyright(c) 1998-2000, ALICE Experiment at CERN, All rights
4  * reserved. 
5  *
6  * See cxx source for full Copyright notice                               
7  */
8 //____________________________________________________________________
9 //                                                                          
10 // This class stores the sample rate (that is, how many times the
11 // ATLRO's sample each VA1 channel).  In principle these can be
12 // controlled per half ring, but in real life it's most likely that
13 // this value will be the same for all detectors.  This value must be
14 // retrived from DCS or the like. 
15 //
16 /** @file    AliFMDCalibSampleRate.h
17     @author  Christian Holm Christensen <cholm@nbi.dk>
18     @date    Sun Mar 26 18:32:14 2006
19     @brief   Per digitizer card pulser calibration
20     @ingroup FMD_base    
21 */
22
23 #ifndef FSTREAM
24 # include <fstream>
25 #endif
26 #ifndef ROOT_TObject
27 # include <TObject.h>
28 #endif
29 #ifndef ALIFMDUSHORTMAP_H
30 # include "AliFMDUShortMap.h"
31 #endif
32 #ifndef ROOT_TArrayI
33 # include <TArrayI.h>
34 #endif
35 //____________________________________________________________________
36 /** @brief Per digitizer card pulser calibration
37     @ingroup FMD_base
38 */
39 class AliFMDCalibSampleRate : public TObject
40 {
41 public:
42   /** CTOR */
43   AliFMDCalibSampleRate();
44   /** Copy CTOR
45       @param o Object to copy from  */
46   AliFMDCalibSampleRate(const AliFMDCalibSampleRate& o);
47   /** Assignment operator 
48       @param o Object to assign from 
49       @return Reference to assign from  */
50   AliFMDCalibSampleRate& operator=(const AliFMDCalibSampleRate& o);
51   /** Set sample for a DDL
52       @param det   Detector #
53       @param ring  Ring ID 
54       @param sec   Sector # 
55       @param str   Strip number (not used)
56       @param rate  Sample rate */
57   void Set(UShort_t det, Char_t ring, UShort_t sec, UShort_t str, 
58            UShort_t rate);
59   /** Get sample rate for a detector 
60       @param det  Detector #
61       @param ring Ring ID 
62       @param sec  Sector # 
63       @param str  Strip number (not used)
64       @return Sample rate */
65   UShort_t Rate(UShort_t det, Char_t ring, UShort_t sec, UShort_t str=0) const;
66   /** Write stored samplerates to file
67       @param outFile Output file stream
68    */
69   void WriteToFile(ofstream &);
70   /** Read information from file and set sample rates
71       @param inFile input file stream
72    */
73   void ReadFromFile(ifstream &);
74 protected:
75   // TArrayI fRates; // Sample rates 
76   AliFMDUShortMap fRates; // Sample rates
77   ClassDef(AliFMDCalibSampleRate,2); // Sample rates 
78 };
79
80 #endif
81 //____________________________________________________________________
82 //
83 // Local Variables:
84 //   mode: C++
85 // End:
86 //
87
88