1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
7 /// \class AliMUONCalibrationData
8 /// \brief Single entry point to access MUON calibration data.
10 // Author Laurent Aphecetche
12 #ifndef ALIMUONCALIBRATIONDATA_H
13 #define ALIMUONCALIBRATIONDATA_H
20 class AliMUONTriggerEfficiencyCells;
21 class AliMUONTriggerLut;
24 class AliMUONVCalibParam;
25 class AliMUONGlobalCrateConfig;
26 class AliMUONRegionalTriggerConfig;
29 class AliMUONCalibrationData : public TObject
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.
37 AliMUONCalibrationData(Int_t runNumber=-1, Bool_t deferredInitialization=kTRUE);
38 virtual ~AliMUONCalibrationData();
40 AliMUONVStore* Capacitances() const;
42 /// Create a capa store (which must be deleted) from OCDB for the given run
43 static AliMUONVStore* CreateCapacitances(Int_t runNumber, Int_t* startOfValidity=0);
45 /// Create a gain store (which must be deleted) from OCDB for the given run
46 static AliMUONVStore* CreateGains(Int_t runNumber, Int_t* startOfValidity=0);
48 /// Create a global trigger mask (which must be deleted) from OCDB for the given run
49 static AliMUONGlobalCrateConfig* CreateGlobalTriggerCrateConfig(Int_t runNumber, Int_t* startOfValidity=0);
51 /// Create a hv map (which must be deleted) from OCDB for the given run
52 static TMap* CreateHV(Int_t runNumber, Int_t* startOfValidity=0);
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);
57 /// Create a neighbours store (which must be deleted) from OCDB for the given run
58 static AliMUONVStore* CreateNeighbours(Int_t runNumber, Int_t* startOfValidity=0);
60 /// Create a local trigger mask store (which must be deleted) for a given run
61 static AliMUONVStore* CreateLocalTriggerBoardMasks(Int_t runNumber, Int_t* startOfValidity=0);
63 /// Create a pedestal store (which must be deleted) from OCDB for the given run
64 static AliMUONVStore* CreatePedestals(Int_t runNumber, Int_t* startOfValidity=0);
66 /// Create a regional trigger mask store (which must be deleted) for a given run
67 static AliMUONRegionalTriggerConfig* CreateRegionalTriggerConfig(Int_t runNumber, Int_t* startOfValidity=0);
69 /// Create a trigger Look Up Table (which must be deleted) for a given run
70 static AliMUONTriggerLut* CreateTriggerLut(Int_t runNumber, Int_t* startOfValidity=0);
71 /// Create a trigger efficiency map (which must be deleted) for a given run
72 static AliMUONTriggerEfficiencyCells* CreateTriggerEfficiency(Int_t runNumber, Int_t* startOfValidity=0);
75 AliMUONVStore* Gains() const;
77 /// Get the configuration for the global trigger board.
78 AliMUONGlobalCrateConfig* GlobalTriggerCrateConfig() const;
80 /// Get the Gain calibration object for channels within (detElemId,manuId).
81 AliMUONVCalibParam* Gains(Int_t detElemId, Int_t manuId) const;
86 /// Get the Trigger HV and current values
87 TMap* TriggerDCS() const;
89 /// Whether this object is valid or not (might be invalid if fetching from CDB failed).
90 Bool_t IsValid() const { return fIsValid; }
92 /// Get the mask for a given local trigger board.
93 AliMUONVCalibParam* LocalTriggerBoardMasks(Int_t localBoardNumber) const;
95 /// Get the neighbours store
96 AliMUONVStore* Neighbours() const;
98 /// Get the pedestal store
99 AliMUONVStore* Pedestals() const;
101 /// Get the Pedestal calibration object for channels within (detElemId,manuId).
102 AliMUONVCalibParam* Pedestals(Int_t detElemId, Int_t manuId) const;
105 virtual void Print(Option_t* opt="") const;
107 /// Get the config for regional trigger.
108 AliMUONRegionalTriggerConfig* RegionalTriggerConfig() const;
111 /// The runnumber used by this object.
112 Int_t RunNumber() const { return fRunNumber; }
114 /// Get the trigger Look Up Table.
115 AliMUONTriggerLut* TriggerLut() const;
117 /// Get the trigger efficiency map
118 AliMUONTriggerEfficiencyCells* TriggerEfficiency() const;
122 static TObject* CreateObject(Int_t runNumber, const char* path, Int_t* startOfValidity=0x0);
124 static void Check(Int_t runNumber);
128 AliMUONCalibrationData(const AliMUONCalibrationData& other);
130 AliMUONCalibrationData& operator=(const AliMUONCalibrationData& other);
133 mutable Bool_t fIsValid; ///< Whether we were able to correctly initialize
134 Int_t fRunNumber; ///< The run number for which we hold calibrations
135 mutable AliMUONVStore* fGains; //!< Gains
136 mutable AliMUONVStore* fPedestals; //!< Pedestals
137 mutable TMap* fHV; //!< HV
138 mutable TMap* fTriggerDCS; //!< Trigger HV and Currents
139 mutable AliMUONVStore* fLocalTriggerBoardMasks; //!< Local trigger board maska
140 mutable AliMUONRegionalTriggerConfig* fRegionalTriggerConfig; //!< Regional trigger config
141 mutable AliMUONGlobalCrateConfig* fGlobalTriggerCrateConfig; //!< Global trigger crate config
143 mutable AliMUONTriggerLut* fTriggerLut; //!< TRigger LUTs
144 mutable AliMUONTriggerEfficiencyCells* fTriggerEfficiency; //!< Trigger efficiency cells
145 mutable AliMUONVStore* fCapacitances; //!< Manu capacitances
146 mutable AliMUONVStore* fNeighbours; //!< list of neighbours for all channels
148 ClassDef(AliMUONCalibrationData,8) // Storage for all MUON calibration data.