]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONCalibrationData.h
Add/remove classes according to changes in MUON.
[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
26 class AliMUONCalibrationData : public TObject
27 {
28 public:
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     */
34   AliMUONCalibrationData(Int_t runNumber=-1, Bool_t deferredInitialization=kTRUE);
35   virtual ~AliMUONCalibrationData();
36
37   /// Get the DeadChannel calibration object for channels within (detElemId,manuId).
38   AliMUONVCalibParam* DeadChannels(Int_t detElemId, Int_t manuId) 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   /// Whether this object is valid or not (might be invalid if fetching from CDB failed).
50   Bool_t IsValid() const { return fIsValid; }
51   
52   /// Get the Pedestal calibration object for channels within (detElemId,manuId).
53   AliMUONVCalibParam* Pedestals(Int_t detElemId, Int_t manuId) const;
54   
55   /// Dump to screen.
56   virtual void Print(Option_t* opt="") const;
57
58   /// Get the mask for a given regional trigger board.
59   AliMUONVCalibParam* RegionalTriggerBoardMasks(Int_t index) const;
60
61   /// The runnumber used by this object.
62   Int_t RunNumber() const { return fRunNumber; }
63   
64   /// Get the trigger Look Up Table.
65   AliMUONTriggerLut* TriggerLut() const;
66   
67   /// Get the trigger efficiency map
68   AliMUONTriggerEfficiencyCells* TriggerEfficiency() const;
69   
70 protected:
71   AliMUONCalibrationData(const AliMUONCalibrationData& other);
72   AliMUONCalibrationData& operator=(const AliMUONCalibrationData& other);
73   
74 private:
75   AliCDBEntry* GetEntry(const char* path) const;
76   AliMUONV2DStore* OnDemandGains() const;
77   AliMUONV2DStore* OnDemandPedestals() const;
78   AliMUONV2DStore* OnDemandDeadChannels() const;
79   AliMUONVCalibParam* OnDemandGlobalTriggerBoardMasks() const;
80   AliMUONV1DStore* OnDemandRegionalTriggerBoardMasks() const;
81   AliMUONV1DStore* OnDemandLocalTriggerBoardMasks() const;
82   AliMUONTriggerLut* OnDemandTriggerLut() const;
83   AliMUONTriggerEfficiencyCells* OnDemandTriggerEfficiency() const;
84   
85 private:  
86   mutable Bool_t fIsValid; // Whether we were able to correctly initialize
87   Int_t fRunNumber; // The run number for which we hold calibrations
88   mutable AliMUONV2DStore* fGains; //!
89   mutable AliMUONV2DStore* fPedestals; //!
90   mutable AliMUONV2DStore* fDeadChannels; //!
91   mutable AliMUONV1DStore* fLocalTriggerBoardMasks; //!
92   mutable AliMUONV1DStore* fRegionalTriggerBoardMasks; //!
93   mutable AliMUONVCalibParam* fGlobalTriggerBoardMasks; //!
94   mutable AliMUONTriggerLut* fTriggerLut; //!
95   mutable AliMUONTriggerEfficiencyCells* fTriggerEfficiency; //!
96   
97   ClassDef(AliMUONCalibrationData,3) // Storage for all MUON calibration data.
98 };
99
100 #endif