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