/// \ingroup base
/// \class AliMUONCalibrationData
-/// \brief Single entry point to access pedestals and gains from the
-/// (de)calibrator or any class needing the calibration data
+/// \brief Single entry point to access MUON calibration data.
///
-/// \author Laurent Aphecetche
+// Author Laurent Aphecetche
#ifndef ALIMUONCALIBRATIONDATA_H
#define ALIMUONCALIBRATIONDATA_H
#endif
class AliCDBEntry;
-class AliMUONCalibParam;
-class AliMUONV3DStore;
+class AliMUONTriggerEfficiencyCells;
+class AliMUONTriggerLut;
+class AliMUONVStore;
+class AliMUONVStore;
+class AliMUONVCalibParam;
+class TMap;
class AliMUONCalibrationData : public TObject
{
public:
+ /** Constructor.
+ * @param runNumber is used as a key to the CDB
+ * @param deferredInitialization if kFALSE, all the calibrations are fetched
+ * regardless of whether you'll use them or not.
+ */
AliMUONCalibrationData(Int_t runNumber=-1, Bool_t deferredInitialization=kTRUE);
virtual ~AliMUONCalibrationData();
+
+ AliMUONVStore* Capacitances() const;
+
+ /// Create a capa store (which must be deleted) from OCDB for the given run
+ static AliMUONVStore* CreateCapacitances(Int_t runNumber);
+
+ /// Create a gain store (which must be deleted) from OCDB for the given run
+ static AliMUONVStore* CreateGains(Int_t runNumber);
+
+ /// Create a global trigger mask (which must be deleted) from OCDB for the given run
+ static AliMUONVCalibParam* CreateGlobalTriggerBoardMasks(Int_t runNumber);
+
+ /// Create a hv map (which must be deleted) from OCDB for the given run
+ static TMap* CreateHV(Int_t runNumber);
+
+ /// Create a neighbours store (which must be deleted) from OCDB for the given run
+ static AliMUONVStore* CreateNeighbours(Int_t runNumber);
- AliMUONCalibParam* Gain(Int_t detElemId, Int_t manuId, Int_t manuChannel) const;
+ /// Create a local trigger mask store (which must be deleted) for a given run
+ static AliMUONVStore* CreateLocalTriggerBoardMasks(Int_t runNumber);
+
+ /// Create a pedestal store (which must be deleted) from OCDB for the given run
+ static AliMUONVStore* CreatePedestals(Int_t runNumber);
+
+ /// Create a regional trigger mask store (which must be deleted) for a given run
+ static AliMUONVStore* CreateRegionalTriggerBoardMasks(Int_t runNumber);
+
+ /// Create a trigger Look Up Table (which must be deleted) for a given run
+ static AliMUONTriggerLut* CreateTriggerLut(Int_t runNumber);
- Bool_t IsValid() const;
+ /// Create a trigger efficiency map (which must be deleted) for a given run
+ static AliMUONTriggerEfficiencyCells* CreateTriggerEfficiency(Int_t runNumber);
- AliMUONCalibParam* Pedestal(Int_t detElemId, Int_t manuId, Int_t manuChannel) const;
+ /// Get all the gains
+ AliMUONVStore* Gains() const;
+
+ /// Get the mask for the global trigger board.
+ AliMUONVCalibParam* GlobalTriggerBoardMasks() const;
+
+ /// Get the Gain calibration object for channels within (detElemId,manuId).
+ AliMUONVCalibParam* Gains(Int_t detElemId, Int_t manuId) const;
+
+ /// Get the HV values
+ TMap* HV() const;
+
+ /// Whether this object is valid or not (might be invalid if fetching from CDB failed).
+ Bool_t IsValid() const { return fIsValid; }
+
+ /// Get the mask for a given local trigger board.
+ AliMUONVCalibParam* LocalTriggerBoardMasks(Int_t localBoardNumber) const;
+
+ /// Get the neighbours store
+ AliMUONVStore* Neighbours() const;
+ /// Get the pedestal store
+ AliMUONVStore* Pedestals() const;
+
+ /// Get the Pedestal calibration object for channels within (detElemId,manuId).
+ AliMUONVCalibParam* Pedestals(Int_t detElemId, Int_t manuId) const;
+
+ /// Dump to screen.
virtual void Print(Option_t* opt="") const;
+
+ /// Get the mask for a given regional trigger board.
+ AliMUONVCalibParam* RegionalTriggerBoardMasks(Int_t index) const;
+
+ /// The runnumber used by this object.
+ Int_t RunNumber() const { return fRunNumber; }
- Int_t RunNumber() const;
+ /// Get the trigger Look Up Table.
+ AliMUONTriggerLut* TriggerLut() const;
-private:
- AliCDBEntry* GetEntry(const char* path) const;
- AliMUONV3DStore* Gains() const;
- AliMUONV3DStore* Pedestals() const;
+ /// Get the trigger efficiency map
+ AliMUONTriggerEfficiencyCells* TriggerEfficiency() const;
+
+ void Reset();
-private:
- mutable Bool_t fIsValid;
- Int_t fRunNumber;
- mutable AliMUONV3DStore* fGains; //!
- mutable AliMUONV3DStore* fPedestals; //!
+ static TObject* CreateObject(Int_t runNumber, const char* path);
+
+protected:
+ /// Not implemented
+ AliMUONCalibrationData(const AliMUONCalibrationData& other);
+ /// Not implemented
+ AliMUONCalibrationData& operator=(const AliMUONCalibrationData& other);
+
+private:
+ mutable Bool_t fIsValid; ///< Whether we were able to correctly initialize
+ Int_t fRunNumber; ///< The run number for which we hold calibrations
+ mutable AliMUONVStore* fGains; //!< Gains
+ mutable AliMUONVStore* fPedestals; //!< Pedestals
+ mutable TMap* fHV; //!< HV
+ mutable AliMUONVStore* fLocalTriggerBoardMasks; //!< Local trigger board maska
+ mutable AliMUONVStore* fRegionalTriggerBoardMasks; //!< Regional trigger board maska
+ mutable AliMUONVCalibParam* fGlobalTriggerBoardMasks; //!< Global trigger board maska
+ mutable AliMUONTriggerLut* fTriggerLut; //!< TRigger LUTs
+ mutable AliMUONTriggerEfficiencyCells* fTriggerEfficiency; //!< Trigger efficiency cells
+ mutable AliMUONVStore* fCapacitances; //!< Manu capacitances
+ mutable AliMUONVStore* fNeighbours; //!< list of neighbours for all channels
- ClassDef(AliMUONCalibrationData,1) // Storage for all MUON calibration data.
+ ClassDef(AliMUONCalibrationData,7) // Storage for all MUON calibration data.
};
#endif