]>
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 | |
49e110ec | 54 | /// Create a Trigger HV and current map (which must be deleted) from OCDB for the given run |
55 | static TMap* CreateTriggerDCS(Int_t runNumber, Int_t* startOfValidity=0); | |
56 | ||
5562688f | 57 | /// Create a neighbours store (which must be deleted) from OCDB for the given run |
143cd71a | 58 | static AliMUONVStore* CreateNeighbours(Int_t runNumber, Int_t* startOfValidity=0); |
c5bdf179 | 59 | |
5562688f | 60 | /// Create a local trigger mask store (which must be deleted) for a given run |
143cd71a | 61 | static AliMUONVStore* CreateLocalTriggerBoardMasks(Int_t runNumber, Int_t* startOfValidity=0); |
e7d7fa47 | 62 | |
2b8a1212 | 63 | /// Create a kill map store (which must be deleted) from OCDB for the given run |
64 | static AliMUONVStore* CreateKillMap(Int_t runNumber, Int_t* startOfValidity=0); | |
65 | ||
5562688f | 66 | /// Create a pedestal store (which must be deleted) from OCDB for the given run |
143cd71a | 67 | static AliMUONVStore* CreatePedestals(Int_t runNumber, Int_t* startOfValidity=0); |
c3ce65fd | 68 | |
5562688f | 69 | /// Create a regional trigger mask store (which must be deleted) for a given run |
143cd71a | 70 | static AliMUONRegionalTriggerConfig* CreateRegionalTriggerConfig(Int_t runNumber, Int_t* startOfValidity=0); |
48ed403b | 71 | |
5562688f | 72 | /// Create a trigger Look Up Table (which must be deleted) for a given run |
143cd71a | 73 | static AliMUONTriggerLut* CreateTriggerLut(Int_t runNumber, Int_t* startOfValidity=0); |
5562688f | 74 | /// Create a trigger efficiency map (which must be deleted) for a given run |
143cd71a | 75 | static AliMUONTriggerEfficiencyCells* CreateTriggerEfficiency(Int_t runNumber, Int_t* startOfValidity=0); |
5562688f | 76 | |
77 | /// Get all the gains | |
78 | AliMUONVStore* Gains() const; | |
79 | ||
92c23b09 | 80 | /// Get the configuration for the global trigger board. |
81 | AliMUONGlobalCrateConfig* GlobalTriggerCrateConfig() const; | |
5562688f | 82 | |
83 | /// Get the Gain calibration object for channels within (detElemId,manuId). | |
84 | AliMUONVCalibParam* Gains(Int_t detElemId, Int_t manuId) const; | |
85 | ||
48ed403b | 86 | /// Get the HV values |
87 | TMap* HV() const; | |
49e110ec | 88 | |
89 | /// Get the Trigger HV and current values | |
90 | TMap* TriggerDCS() const; | |
5562688f | 91 | |
c3ce65fd | 92 | /// Whether this object is valid or not (might be invalid if fetching from CDB failed). |
93 | Bool_t IsValid() const { return fIsValid; } | |
5562688f | 94 | |
95 | /// Get the mask for a given local trigger board. | |
96 | AliMUONVCalibParam* LocalTriggerBoardMasks(Int_t localBoardNumber) const; | |
97 | ||
98 | /// Get the neighbours store | |
99 | AliMUONVStore* Neighbours() const; | |
c5bdf179 | 100 | |
5562688f | 101 | /// Get the pedestal store |
a0eca509 | 102 | AliMUONVStore* Pedestals() const; |
2b8a1212 | 103 | |
104 | /// Get the kill map store | |
105 | AliMUONVStore* KillMap() const; | |
106 | ||
107 | /// Get the kill map calibration object for channels within (detElemId,manuId). | |
108 | AliMUONVCalibParam* KillMap(Int_t detElemId, Int_t manuId) const; | |
109 | ||
c3ce65fd | 110 | /// Get the Pedestal calibration object for channels within (detElemId,manuId). |
e7d7fa47 | 111 | AliMUONVCalibParam* Pedestals(Int_t detElemId, Int_t manuId) const; |
c5bdf179 | 112 | |
c3ce65fd | 113 | /// Dump to screen. |
c5bdf179 | 114 | virtual void Print(Option_t* opt="") const; |
e7d7fa47 | 115 | |
92c23b09 | 116 | /// Get the config for regional trigger. |
117 | AliMUONRegionalTriggerConfig* RegionalTriggerConfig() const; | |
118 | ||
e7d7fa47 | 119 | |
c3ce65fd | 120 | /// The runnumber used by this object. |
121 | Int_t RunNumber() const { return fRunNumber; } | |
c5bdf179 | 122 | |
e7d7fa47 | 123 | /// Get the trigger Look Up Table. |
124 | AliMUONTriggerLut* TriggerLut() const; | |
125 | ||
126 | /// Get the trigger efficiency map | |
127 | AliMUONTriggerEfficiencyCells* TriggerEfficiency() const; | |
128 | ||
c1bbaf66 | 129 | void Reset(); |
0145e89a | 130 | |
143cd71a | 131 | static TObject* CreateObject(Int_t runNumber, const char* path, Int_t* startOfValidity=0x0); |
c1bbaf66 | 132 | |
630711ed | 133 | static void Check(Int_t runNumber); |
134 | ||
884a73f1 | 135 | protected: |
71a2d3aa | 136 | /// Not implemented |
e7d7fa47 | 137 | AliMUONCalibrationData(const AliMUONCalibrationData& other); |
71a2d3aa | 138 | /// Not implemented |
e7d7fa47 | 139 | AliMUONCalibrationData& operator=(const AliMUONCalibrationData& other); |
140 | ||
5562688f | 141 | private: |
71a2d3aa | 142 | mutable Bool_t fIsValid; ///< Whether we were able to correctly initialize |
143 | Int_t fRunNumber; ///< The run number for which we hold calibrations | |
a0eca509 | 144 | mutable AliMUONVStore* fGains; //!< Gains |
145 | mutable AliMUONVStore* fPedestals; //!< Pedestals | |
71a2d3aa | 146 | mutable TMap* fHV; //!< HV |
49e110ec | 147 | mutable TMap* fTriggerDCS; //!< Trigger HV and Currents |
92c23b09 | 148 | mutable AliMUONVStore* fLocalTriggerBoardMasks; //!< Local trigger board maska |
149 | mutable AliMUONRegionalTriggerConfig* fRegionalTriggerConfig; //!< Regional trigger config | |
150 | mutable AliMUONGlobalCrateConfig* fGlobalTriggerCrateConfig; //!< Global trigger crate config | |
151 | ||
71a2d3aa | 152 | mutable AliMUONTriggerLut* fTriggerLut; //!< TRigger LUTs |
153 | mutable AliMUONTriggerEfficiencyCells* fTriggerEfficiency; //!< Trigger efficiency cells | |
a0eca509 | 154 | mutable AliMUONVStore* fCapacitances; //!< Manu capacitances |
155 | mutable AliMUONVStore* fNeighbours; //!< list of neighbours for all channels | |
c5bdf179 | 156 | |
2b8a1212 | 157 | mutable AliMUONVStore* fKillMap; //!< kill map |
158 | ||
159 | ClassDef(AliMUONCalibrationData,9) // Storage for all MUON calibration data. | |
c5bdf179 | 160 | }; |
161 | ||
162 | #endif |