]>
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 | ||
e41c38cf | 6 | /// \ingroup calib |
c5bdf179 | 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; | |
a0eca509 | 22 | class AliMUONVStore; |
23 | class AliMUONVStore; | |
e7d7fa47 | 24 | class AliMUONVCalibParam; |
92c23b09 | 25 | class AliMUONGlobalCrateConfig; |
26 | class AliMUONRegionalTriggerConfig; | |
48ed403b | 27 | class TMap; |
c5bdf179 | 28 | |
29 | class AliMUONCalibrationData : public TObject | |
30 | { | |
31 | public: | |
c3ce65fd | 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 | */ | |
c5bdf179 | 37 | AliMUONCalibrationData(Int_t runNumber=-1, Bool_t deferredInitialization=kTRUE); |
38 | virtual ~AliMUONCalibrationData(); | |
c3ce65fd | 39 | |
a0eca509 | 40 | AliMUONVStore* Capacitances() const; |
5562688f | 41 | |
42 | /// Create a capa store (which must be deleted) from OCDB for the given run | |
143cd71a | 43 | static AliMUONVStore* CreateCapacitances(Int_t runNumber, Int_t* startOfValidity=0); |
5562688f | 44 | |
45 | /// Create a gain store (which must be deleted) from OCDB for the given run | |
143cd71a | 46 | static AliMUONVStore* CreateGains(Int_t runNumber, Int_t* startOfValidity=0); |
5562688f | 47 | |
48 | /// Create a global trigger mask (which must be deleted) from OCDB for the given run | |
143cd71a | 49 | static AliMUONGlobalCrateConfig* CreateGlobalTriggerCrateConfig(Int_t runNumber, Int_t* startOfValidity=0); |
c1bbaf66 | 50 | |
5562688f | 51 | /// Create a hv map (which must be deleted) from OCDB for the given run |
143cd71a | 52 | static TMap* CreateHV(Int_t runNumber, Int_t* startOfValidity=0); |
5562688f | 53 | |
54 | /// Create a neighbours store (which must be deleted) from OCDB for the given run | |
143cd71a | 55 | static AliMUONVStore* CreateNeighbours(Int_t runNumber, Int_t* startOfValidity=0); |
c5bdf179 | 56 | |
5562688f | 57 | /// Create a local trigger mask store (which must be deleted) for a given run |
143cd71a | 58 | static AliMUONVStore* CreateLocalTriggerBoardMasks(Int_t runNumber, Int_t* startOfValidity=0); |
e7d7fa47 | 59 | |
5562688f | 60 | /// Create a pedestal store (which must be deleted) from OCDB for the given run |
143cd71a | 61 | static AliMUONVStore* CreatePedestals(Int_t runNumber, Int_t* startOfValidity=0); |
c3ce65fd | 62 | |
5562688f | 63 | /// Create a regional trigger mask store (which must be deleted) for a given run |
143cd71a | 64 | static AliMUONRegionalTriggerConfig* CreateRegionalTriggerConfig(Int_t runNumber, Int_t* startOfValidity=0); |
48ed403b | 65 | |
5562688f | 66 | /// Create a trigger Look Up Table (which must be deleted) for a given run |
143cd71a | 67 | static AliMUONTriggerLut* CreateTriggerLut(Int_t runNumber, Int_t* startOfValidity=0); |
5562688f | 68 | /// Create a trigger efficiency map (which must be deleted) for a given run |
143cd71a | 69 | static AliMUONTriggerEfficiencyCells* CreateTriggerEfficiency(Int_t runNumber, Int_t* startOfValidity=0); |
5562688f | 70 | |
71 | /// Get all the gains | |
72 | AliMUONVStore* Gains() const; | |
73 | ||
92c23b09 | 74 | /// Get the configuration for the global trigger board. |
75 | AliMUONGlobalCrateConfig* GlobalTriggerCrateConfig() const; | |
5562688f | 76 | |
77 | /// Get the Gain calibration object for channels within (detElemId,manuId). | |
78 | AliMUONVCalibParam* Gains(Int_t detElemId, Int_t manuId) const; | |
79 | ||
48ed403b | 80 | /// Get the HV values |
81 | TMap* HV() const; | |
5562688f | 82 | |
c3ce65fd | 83 | /// Whether this object is valid or not (might be invalid if fetching from CDB failed). |
84 | Bool_t IsValid() const { return fIsValid; } | |
5562688f | 85 | |
86 | /// Get the mask for a given local trigger board. | |
87 | AliMUONVCalibParam* LocalTriggerBoardMasks(Int_t localBoardNumber) const; | |
88 | ||
89 | /// Get the neighbours store | |
90 | AliMUONVStore* Neighbours() const; | |
c5bdf179 | 91 | |
5562688f | 92 | /// Get the pedestal store |
a0eca509 | 93 | AliMUONVStore* Pedestals() const; |
48ed403b | 94 | |
c3ce65fd | 95 | /// Get the Pedestal calibration object for channels within (detElemId,manuId). |
e7d7fa47 | 96 | AliMUONVCalibParam* Pedestals(Int_t detElemId, Int_t manuId) const; |
c5bdf179 | 97 | |
c3ce65fd | 98 | /// Dump to screen. |
c5bdf179 | 99 | virtual void Print(Option_t* opt="") const; |
e7d7fa47 | 100 | |
92c23b09 | 101 | /// Get the config for regional trigger. |
102 | AliMUONRegionalTriggerConfig* RegionalTriggerConfig() const; | |
103 | ||
e7d7fa47 | 104 | |
c3ce65fd | 105 | /// The runnumber used by this object. |
106 | Int_t RunNumber() const { return fRunNumber; } | |
c5bdf179 | 107 | |
e7d7fa47 | 108 | /// Get the trigger Look Up Table. |
109 | AliMUONTriggerLut* TriggerLut() const; | |
110 | ||
111 | /// Get the trigger efficiency map | |
112 | AliMUONTriggerEfficiencyCells* TriggerEfficiency() const; | |
113 | ||
c1bbaf66 | 114 | void Reset(); |
0145e89a | 115 | |
143cd71a | 116 | static TObject* CreateObject(Int_t runNumber, const char* path, Int_t* startOfValidity=0x0); |
c1bbaf66 | 117 | |
630711ed | 118 | static void Check(Int_t runNumber); |
119 | ||
884a73f1 | 120 | protected: |
71a2d3aa | 121 | /// Not implemented |
e7d7fa47 | 122 | AliMUONCalibrationData(const AliMUONCalibrationData& other); |
71a2d3aa | 123 | /// Not implemented |
e7d7fa47 | 124 | AliMUONCalibrationData& operator=(const AliMUONCalibrationData& other); |
125 | ||
5562688f | 126 | private: |
71a2d3aa | 127 | mutable Bool_t fIsValid; ///< Whether we were able to correctly initialize |
128 | Int_t fRunNumber; ///< The run number for which we hold calibrations | |
a0eca509 | 129 | mutable AliMUONVStore* fGains; //!< Gains |
130 | mutable AliMUONVStore* fPedestals; //!< Pedestals | |
71a2d3aa | 131 | mutable TMap* fHV; //!< HV |
92c23b09 | 132 | mutable AliMUONVStore* fLocalTriggerBoardMasks; //!< Local trigger board maska |
133 | mutable AliMUONRegionalTriggerConfig* fRegionalTriggerConfig; //!< Regional trigger config | |
134 | mutable AliMUONGlobalCrateConfig* fGlobalTriggerCrateConfig; //!< Global trigger crate config | |
135 | ||
71a2d3aa | 136 | mutable AliMUONTriggerLut* fTriggerLut; //!< TRigger LUTs |
137 | mutable AliMUONTriggerEfficiencyCells* fTriggerEfficiency; //!< Trigger efficiency cells | |
a0eca509 | 138 | mutable AliMUONVStore* fCapacitances; //!< Manu capacitances |
139 | mutable AliMUONVStore* fNeighbours; //!< list of neighbours for all channels | |
c5bdf179 | 140 | |
a0eca509 | 141 | ClassDef(AliMUONCalibrationData,7) // Storage for all MUON calibration data. |
c5bdf179 | 142 | }; |
143 | ||
144 | #endif |