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 AliMUONGlobalCrateConfig;
21 class AliMUONRegionalTriggerConfig;
22 class AliMUONRejectList;
23 class AliMUONTriggerEfficiencyCells;
24 class AliMUONTriggerLut;
25 class AliMUONVCalibParam;
30 class AliMUONCalibrationData : public TObject
34 * @param runNumber is used as a key to the CDB
35 * @param deferredInitialization if kFALSE, all the calibrations are fetched
36 * regardless of whether you'll use them or not.
38 AliMUONCalibrationData(Int_t runNumber=-1, Bool_t deferredInitialization=kTRUE);
39 virtual ~AliMUONCalibrationData();
41 AliMUONVStore* Capacitances() const;
43 /// Create a capa store (which must be deleted) from OCDB for the given run
44 static AliMUONVStore* CreateCapacitances(Int_t runNumber, Int_t* startOfValidity=0);
46 /// Create a gain store (which must be deleted) from OCDB for the given run
47 static AliMUONVStore* CreateGains(Int_t runNumber, Int_t* startOfValidity=0);
49 /// Create a global trigger mask (which must be deleted) from OCDB for the given run
50 static AliMUONGlobalCrateConfig* CreateGlobalTriggerCrateConfig(Int_t runNumber, Int_t* startOfValidity=0);
52 /// Create a hv map (which must be deleted) from OCDB for the given run
53 static TMap* CreateHV(Int_t runNumber, Int_t* startOfValidity=0);
55 /// Create a Trigger HV and current map (which must be deleted) from OCDB for the given run
56 static TMap* CreateTriggerDCS(Int_t runNumber, Int_t* startOfValidity=0);
58 /// Create a neighbours store (which must be deleted) from OCDB for the given run
59 static AliMUONVStore* CreateNeighbours(Int_t runNumber, Int_t* startOfValidity=0);
61 /// Create a local trigger mask store (which must be deleted) for a given run
62 static AliMUONVStore* CreateLocalTriggerBoardMasks(Int_t runNumber, Int_t* startOfValidity=0);
64 /// Create an occupancy map store (which must be deleted) from OCDB for the given run
65 static AliMUONVStore* CreateOccupancyMap(Int_t runNumber, Int_t* startOfValidity=0);
67 /// Create a rejectlist store (which must be deleted) from OCDB for the given run
68 static AliMUONRejectList* CreateRejectList(Int_t runNumber, Int_t* startOfValidity=0);
70 /// Create a pedestal store (which must be deleted) from OCDB for the given run
71 static AliMUONVStore* CreatePedestals(Int_t runNumber, Int_t* startOfValidity=0);
73 /// Create a regional trigger mask store (which must be deleted) for a given run
74 static AliMUONRegionalTriggerConfig* CreateRegionalTriggerConfig(Int_t runNumber, Int_t* startOfValidity=0);
76 /// Create a trigger Look Up Table (which must be deleted) for a given run
77 static AliMUONTriggerLut* CreateTriggerLut(Int_t runNumber, Int_t* startOfValidity=0);
78 /// Create a trigger efficiency map (which must be deleted) for a given run
79 static AliMUONTriggerEfficiencyCells* CreateTriggerEfficiency(Int_t runNumber, Int_t* startOfValidity=0);
82 AliMUONVStore* Gains() const;
84 /// Get the configuration for the global trigger board.
85 AliMUONGlobalCrateConfig* GlobalTriggerCrateConfig() const;
87 /// Get the Gain calibration object for channels within (detElemId,manuId).
88 AliMUONVCalibParam* Gains(Int_t detElemId, Int_t manuId) const;
93 /// Get the Trigger HV and current values
94 TMap* TriggerDCS() const;
96 /// Whether this object is valid or not (might be invalid if fetching from CDB failed).
97 Bool_t IsValid() const { return fIsValid; }
99 /// Get the mask for a given local trigger board.
100 AliMUONVCalibParam* LocalTriggerBoardMasks(Int_t localBoardNumber) const;
102 /// Get the neighbours store
103 AliMUONVStore* Neighbours() const;
105 /// Get the pedestal store
106 AliMUONVStore* Pedestals() const;
108 /// Get the occupancy map store
109 AliMUONVStore* OccupancyMap() const;
111 /// Get the reject list store
112 AliMUONRejectList* RejectList() const;
114 /// Get the Pedestal calibration object for channels within (detElemId,manuId).
115 AliMUONVCalibParam* Pedestals(Int_t detElemId, Int_t manuId) const;
118 virtual void Print(Option_t* opt="") const;
120 /// Get the config for regional trigger.
121 AliMUONRegionalTriggerConfig* RegionalTriggerConfig() const;
124 /// The runnumber used by this object.
125 Int_t RunNumber() const { return fRunNumber; }
127 /// Get the trigger Look Up Table.
128 AliMUONTriggerLut* TriggerLut() const;
130 /// Get the trigger efficiency map
131 AliMUONTriggerEfficiencyCells* TriggerEfficiency() const;
135 static TObject* CreateObject(Int_t runNumber, const char* path, Int_t* startOfValidity=0x0);
137 static void Check(Int_t runNumber);
141 AliMUONCalibrationData(const AliMUONCalibrationData& other);
143 AliMUONCalibrationData& operator=(const AliMUONCalibrationData& other);
146 mutable Bool_t fIsValid; ///< Whether we were able to correctly initialize
147 Int_t fRunNumber; ///< The run number for which we hold calibrations
148 mutable AliMUONVStore* fGains; //!< Gains
149 mutable AliMUONVStore* fPedestals; //!< Pedestals
150 mutable TMap* fHV; //!< HV
151 mutable TMap* fTriggerDCS; //!< Trigger HV and Currents
152 mutable AliMUONVStore* fLocalTriggerBoardMasks; //!< Local trigger board maska
153 mutable AliMUONRegionalTriggerConfig* fRegionalTriggerConfig; //!< Regional trigger config
154 mutable AliMUONGlobalCrateConfig* fGlobalTriggerCrateConfig; //!< Global trigger crate config
156 mutable AliMUONTriggerLut* fTriggerLut; //!< TRigger LUTs
157 mutable AliMUONTriggerEfficiencyCells* fTriggerEfficiency; //!< Trigger efficiency cells
158 mutable AliMUONVStore* fCapacitances; //!< Manu capacitances
159 mutable AliMUONVStore* fNeighbours; //!< list of neighbours for all channels
161 mutable AliMUONVStore* fOccupancyMap; //!< occupancy map
163 mutable AliMUONRejectList* fRejectList; //!< reject list
165 ClassDef(AliMUONCalibrationData,11) // Storage for all MUON calibration data.