]>
Commit | Line | Data |
---|---|---|
c5bdf179 | 1 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
2 | * See cxx source for full Copyright notice */ | |
3 | ||
4 | // $Id$ | |
5 | ||
6 | /// \ingroup base | |
7 | /// \class AliMUONCalibrationData | |
c3ce65fd | 8 | /// \brief Single entry point to access MUON calibration data. |
9 | /// | |
10 | /// For the moment, this class stores pedestals, gains and deadchannels | |
11 | /// that are fetched from the CDB. | |
c5bdf179 | 12 | /// |
13 | /// \author Laurent Aphecetche | |
14 | ||
15 | #ifndef ALIMUONCALIBRATIONDATA_H | |
16 | #define ALIMUONCALIBRATIONDATA_H | |
17 | ||
18 | #ifndef ROOT_TObject | |
19 | #include "TObject.h" | |
20 | #endif | |
21 | ||
22 | class AliCDBEntry; | |
c3ce65fd | 23 | class AliMUONVCalibParam; |
24 | class AliMUONV2DStore; | |
c5bdf179 | 25 | |
26 | class AliMUONCalibrationData : public TObject | |
27 | { | |
28 | public: | |
c3ce65fd | 29 | /** Constructor. |
30 | * @param runNumber is used as a key to the CDB | |
31 | * @param deferredInitialization if kFALSE, all the calibrations are fetched | |
32 | * regardless of whether you'll use them or not. | |
33 | */ | |
c5bdf179 | 34 | AliMUONCalibrationData(Int_t runNumber=-1, Bool_t deferredInitialization=kTRUE); |
35 | virtual ~AliMUONCalibrationData(); | |
c3ce65fd | 36 | |
37 | /// Get the DeadChannel calibration object for channels within (detElemId,manuId). | |
38 | AliMUONVCalibParam* DeadChannel(Int_t detElemId, Int_t manuId) const; | |
c5bdf179 | 39 | |
c3ce65fd | 40 | /// Get the Gain calibration object for channels within (detElemId,manuId). |
41 | AliMUONVCalibParam* Gain(Int_t detElemId, Int_t manuId) const; | |
42 | ||
43 | /// Whether this object is valid or not (might be invalid if fetching from CDB failed). | |
44 | Bool_t IsValid() const { return fIsValid; } | |
c5bdf179 | 45 | |
c3ce65fd | 46 | /// Get the Pedestal calibration object for channels within (detElemId,manuId). |
47 | AliMUONVCalibParam* Pedestal(Int_t detElemId, Int_t manuId) const; | |
c5bdf179 | 48 | |
c3ce65fd | 49 | /// Dump to screen. |
c5bdf179 | 50 | virtual void Print(Option_t* opt="") const; |
51 | ||
c3ce65fd | 52 | /// The runnumber used by this object. |
53 | Int_t RunNumber() const { return fRunNumber; } | |
c5bdf179 | 54 | |
55 | private: | |
56 | AliCDBEntry* GetEntry(const char* path) const; | |
c3ce65fd | 57 | AliMUONV2DStore* Gains() const; |
58 | AliMUONV2DStore* Pedestals() const; | |
59 | AliMUONV2DStore* DeadChannels() const; | |
60 | ||
c5bdf179 | 61 | private: |
62 | mutable Bool_t fIsValid; | |
63 | Int_t fRunNumber; | |
c3ce65fd | 64 | mutable AliMUONV2DStore* fGains; //! |
65 | mutable AliMUONV2DStore* fPedestals; //! | |
66 | mutable AliMUONV2DStore* fDeadChannels; //! | |
c5bdf179 | 67 | |
c3ce65fd | 68 | ClassDef(AliMUONCalibrationData,2) // Storage for all MUON calibration data. |
c5bdf179 | 69 | }; |
70 | ||
71 | #endif |