]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONCalibrationData.h
- Dipole rotated wr to ALICE coordinate system
[u/mrichter/AliRoot.git] / MUON / AliMUONCalibrationData.h
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
8 /// \brief Single entry point to access MUON calibration data.
9 /// 
10 //  Author Laurent Aphecetche
11
12 #ifndef ALIMUONCALIBRATIONDATA_H
13 #define ALIMUONCALIBRATIONDATA_H
14
15 #ifndef ROOT_TObject
16 #include "TObject.h"
17 #endif
18
19 class AliCDBEntry;
20 class AliMUONTriggerEfficiencyCells;
21 class AliMUONTriggerLut;
22 class AliMUONV1DStore;
23 class AliMUONV2DStore;
24 class AliMUONVCalibParam;
25 class TMap;
26
27 class AliMUONCalibrationData : public TObject
28 {
29 public:
30   /** Constructor.
31     * @param runNumber is used as a key to the CDB
32     * @param deferredInitialization if kFALSE, all the calibrations are fetched
33     * regardless of whether you'll use them or not.
34     */
35   AliMUONCalibrationData(Int_t runNumber=-1, Bool_t deferredInitialization=kTRUE);
36   virtual ~AliMUONCalibrationData();
37
38   AliMUONV2DStore* Gains() const;
39   
40   /// Get the Gain calibration object for channels within (detElemId,manuId).
41   AliMUONVCalibParam* Gains(Int_t detElemId, Int_t manuId) const;
42
43   /// Get the mask for the global trigger board.
44   AliMUONVCalibParam* GlobalTriggerBoardMasks() const;
45
46   /// Get the mask for a given local trigger board.
47   AliMUONVCalibParam* LocalTriggerBoardMasks(Int_t localBoardNumber) const;
48
49   /// Get the HV values
50   TMap* HV() const;
51   
52   /// Whether this object is valid or not (might be invalid if fetching from CDB failed).
53   Bool_t IsValid() const { return fIsValid; }
54   
55   AliMUONV2DStore* Pedestals() const;
56   
57   /// Get the Pedestal calibration object for channels within (detElemId,manuId).
58   AliMUONVCalibParam* Pedestals(Int_t detElemId, Int_t manuId) const;
59   
60   /// Dump to screen.
61   virtual void Print(Option_t* opt="") const;
62
63   /// Get the mask for a given regional trigger board.
64   AliMUONVCalibParam* RegionalTriggerBoardMasks(Int_t index) const;
65
66   /// The runnumber used by this object.
67   Int_t RunNumber() const { return fRunNumber; }
68   
69   /// Get the trigger Look Up Table.
70   AliMUONTriggerLut* TriggerLut() const;
71   
72   /// Get the trigger efficiency map
73   AliMUONTriggerEfficiencyCells* TriggerEfficiency() const;
74   
75 protected:
76   AliMUONCalibrationData(const AliMUONCalibrationData& other);
77   AliMUONCalibrationData& operator=(const AliMUONCalibrationData& other);
78   
79 private:
80   AliCDBEntry* GetEntry(const char* path) const;
81   AliMUONV2DStore* OnDemandGains() const;
82   AliMUONV2DStore* OnDemandPedestals() const;
83   TMap* OnDemandHV() const;
84   AliMUONVCalibParam* OnDemandGlobalTriggerBoardMasks() const;
85   AliMUONV1DStore* OnDemandRegionalTriggerBoardMasks() const;
86   AliMUONV1DStore* OnDemandLocalTriggerBoardMasks() const;
87   AliMUONTriggerLut* OnDemandTriggerLut() const;
88   AliMUONTriggerEfficiencyCells* OnDemandTriggerEfficiency() const;
89   
90 private:  
91   mutable Bool_t fIsValid; // Whether we were able to correctly initialize
92   Int_t fRunNumber; // The run number for which we hold calibrations
93   mutable AliMUONV2DStore* fGains; //!
94   mutable AliMUONV2DStore* fPedestals; //!
95   mutable TMap* fHV; //!
96   mutable AliMUONV1DStore* fLocalTriggerBoardMasks; //!
97   mutable AliMUONV1DStore* fRegionalTriggerBoardMasks; //!
98   mutable AliMUONVCalibParam* fGlobalTriggerBoardMasks; //!
99   mutable AliMUONTriggerLut* fTriggerLut; //!
100   mutable AliMUONTriggerEfficiencyCells* fTriggerEfficiency; //!
101   
102   ClassDef(AliMUONCalibrationData,4) // Storage for all MUON calibration data.
103 };
104
105 #endif