]>
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. |
c5bdf179 | 9 | /// |
5398f946 | 10 | // Author Laurent Aphecetche |
c5bdf179 | 11 | |
12 | #ifndef ALIMUONCALIBRATIONDATA_H | |
13 | #define ALIMUONCALIBRATIONDATA_H | |
14 | ||
15 | #ifndef ROOT_TObject | |
16 | #include "TObject.h" | |
17 | #endif | |
18 | ||
19 | class AliCDBEntry; | |
e7d7fa47 | 20 | class AliMUONTriggerEfficiencyCells; |
21 | class AliMUONTriggerLut; | |
22 | class AliMUONV1DStore; | |
c3ce65fd | 23 | class AliMUONV2DStore; |
e7d7fa47 | 24 | class AliMUONVCalibParam; |
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). | |
e7d7fa47 | 38 | AliMUONVCalibParam* DeadChannels(Int_t detElemId, Int_t manuId) const; |
c5bdf179 | 39 | |
c3ce65fd | 40 | /// Get the Gain calibration object for channels within (detElemId,manuId). |
e7d7fa47 | 41 | AliMUONVCalibParam* Gains(Int_t detElemId, Int_t manuId) const; |
42 | ||
43 | /// Get the mask for the global trigger board. | |
44 | AliMUONVCalibParam* GlobalTriggerBoardMasks() const; | |
c3ce65fd | 45 | |
e7d7fa47 | 46 | /// Get the mask for a given local trigger board. |
47 | AliMUONVCalibParam* LocalTriggerBoardMasks(Int_t localBoardNumber) const; | |
48 | ||
c3ce65fd | 49 | /// Whether this object is valid or not (might be invalid if fetching from CDB failed). |
50 | Bool_t IsValid() const { return fIsValid; } | |
c5bdf179 | 51 | |
c3ce65fd | 52 | /// Get the Pedestal calibration object for channels within (detElemId,manuId). |
e7d7fa47 | 53 | AliMUONVCalibParam* Pedestals(Int_t detElemId, Int_t manuId) const; |
c5bdf179 | 54 | |
c3ce65fd | 55 | /// Dump to screen. |
c5bdf179 | 56 | virtual void Print(Option_t* opt="") const; |
e7d7fa47 | 57 | |
58 | /// Get the mask for a given regional trigger board. | |
59 | AliMUONVCalibParam* RegionalTriggerBoardMasks(Int_t index) const; | |
60 | ||
c3ce65fd | 61 | /// The runnumber used by this object. |
62 | Int_t RunNumber() const { return fRunNumber; } | |
c5bdf179 | 63 | |
e7d7fa47 | 64 | /// Get the trigger Look Up Table. |
65 | AliMUONTriggerLut* TriggerLut() const; | |
66 | ||
67 | /// Get the trigger efficiency map | |
68 | AliMUONTriggerEfficiencyCells* TriggerEfficiency() const; | |
69 | ||
884a73f1 | 70 | protected: |
e7d7fa47 | 71 | AliMUONCalibrationData(const AliMUONCalibrationData& other); |
72 | AliMUONCalibrationData& operator=(const AliMUONCalibrationData& other); | |
73 | ||
c5bdf179 | 74 | private: |
75 | AliCDBEntry* GetEntry(const char* path) const; | |
e7d7fa47 | 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; | |
c3ce65fd | 84 | |
c5bdf179 | 85 | private: |
e7d7fa47 | 86 | mutable Bool_t fIsValid; // Whether we were able to correctly initialize |
87 | Int_t fRunNumber; // The run number for which we hold calibrations | |
c3ce65fd | 88 | mutable AliMUONV2DStore* fGains; //! |
89 | mutable AliMUONV2DStore* fPedestals; //! | |
90 | mutable AliMUONV2DStore* fDeadChannels; //! | |
e7d7fa47 | 91 | mutable AliMUONV1DStore* fLocalTriggerBoardMasks; //! |
92 | mutable AliMUONV1DStore* fRegionalTriggerBoardMasks; //! | |
93 | mutable AliMUONVCalibParam* fGlobalTriggerBoardMasks; //! | |
94 | mutable AliMUONTriggerLut* fTriggerLut; //! | |
95 | mutable AliMUONTriggerEfficiencyCells* fTriggerEfficiency; //! | |
c5bdf179 | 96 | |
e7d7fa47 | 97 | ClassDef(AliMUONCalibrationData,3) // Storage for all MUON calibration data. |
c5bdf179 | 98 | }; |
99 | ||
100 | #endif |