]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONCalibrationData.h
Coding conventions (Annalisa)
[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 /// For the moment, this class stores pedestals, gains and deadchannels
11 /// that are fetched from the CDB.
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;
23 class AliMUONTriggerEfficiencyCells;
24 class AliMUONTriggerLut;
25 class AliMUONV1DStore;
26 class AliMUONV2DStore;
27 class AliMUONVCalibParam;
28
29 class AliMUONCalibrationData : public TObject
30 {
31 public:
32   /** Constructor.
33     * @param runNumber is used as a key to the CDB
34     * @param deferredInitialization if kFALSE, all the calibrations are fetched
35     * regardless of whether you'll use them or not.
36     */
37   AliMUONCalibrationData(Int_t runNumber=-1, Bool_t deferredInitialization=kTRUE);
38   virtual ~AliMUONCalibrationData();
39
40   /// Get the DeadChannel calibration object for channels within (detElemId,manuId).
41   AliMUONVCalibParam* DeadChannels(Int_t detElemId, Int_t manuId) const;
42   
43   /// Get the Gain calibration object for channels within (detElemId,manuId).
44   AliMUONVCalibParam* Gains(Int_t detElemId, Int_t manuId) const;
45
46   /// Get the mask for the global trigger board.
47   AliMUONVCalibParam* GlobalTriggerBoardMasks() const;
48
49   /// Get the mask for a given local trigger board.
50   AliMUONVCalibParam* LocalTriggerBoardMasks(Int_t localBoardNumber) 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   /// Get the Pedestal calibration object for channels within (detElemId,manuId).
56   AliMUONVCalibParam* Pedestals(Int_t detElemId, Int_t manuId) const;
57   
58   /// Dump to screen.
59   virtual void Print(Option_t* opt="") const;
60
61   /// Get the mask for a given regional trigger board.
62   AliMUONVCalibParam* RegionalTriggerBoardMasks(Int_t index) const;
63
64   /// The runnumber used by this object.
65   Int_t RunNumber() const { return fRunNumber; }
66   
67   /// Get the trigger Look Up Table.
68   AliMUONTriggerLut* TriggerLut() const;
69   
70   /// Get the trigger efficiency map
71   AliMUONTriggerEfficiencyCells* TriggerEfficiency() const;
72   
73 protected:
74   AliMUONCalibrationData(const AliMUONCalibrationData& other);
75   AliMUONCalibrationData& operator=(const AliMUONCalibrationData& other);
76   
77 private:
78   AliCDBEntry* GetEntry(const char* path) const;
79   AliMUONV2DStore* OnDemandGains() const;
80   AliMUONV2DStore* OnDemandPedestals() const;
81   AliMUONV2DStore* OnDemandDeadChannels() const;
82   AliMUONVCalibParam* OnDemandGlobalTriggerBoardMasks() const;
83   AliMUONV1DStore* OnDemandRegionalTriggerBoardMasks() const;
84   AliMUONV1DStore* OnDemandLocalTriggerBoardMasks() const;
85   AliMUONTriggerLut* OnDemandTriggerLut() const;
86   AliMUONTriggerEfficiencyCells* OnDemandTriggerEfficiency() const;
87   
88 private:  
89   mutable Bool_t fIsValid; // Whether we were able to correctly initialize
90   Int_t fRunNumber; // The run number for which we hold calibrations
91   mutable AliMUONV2DStore* fGains; //!
92   mutable AliMUONV2DStore* fPedestals; //!
93   mutable AliMUONV2DStore* fDeadChannels; //!
94   mutable AliMUONV1DStore* fLocalTriggerBoardMasks; //!
95   mutable AliMUONV1DStore* fRegionalTriggerBoardMasks; //!
96   mutable AliMUONVCalibParam* fGlobalTriggerBoardMasks; //!
97   mutable AliMUONTriggerLut* fTriggerLut; //!
98   mutable AliMUONTriggerEfficiencyCells* fTriggerEfficiency; //!
99   
100   ClassDef(AliMUONCalibrationData,3) // Storage for all MUON calibration data.
101 };
102
103 #endif