]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONCalibrationData.h
Modifications to reflect latest changes in MUONTRGda
[u/mrichter/AliRoot.git] / MUON / AliMUONCalibrationData.h
index 3edd7c190d274918c1f24a30f953ed29c6ae72e6..03a2c85e6a66f6fddce496029711e7a730de6cf7 100644 (file)
@@ -19,8 +19,8 @@
 class AliCDBEntry;
 class AliMUONTriggerEfficiencyCells;
 class AliMUONTriggerLut;
-class AliMUONV1DStore;
-class AliMUONV2DStore;
+class AliMUONVStore;
+class AliMUONVStore;
 class AliMUONVCalibParam;
 class TMap;
 
@@ -35,26 +35,61 @@ public:
   AliMUONCalibrationData(Int_t runNumber=-1, Bool_t deferredInitialization=kTRUE);
   virtual ~AliMUONCalibrationData();
 
-  AliMUONV1DStore* Capacitances() const;
+  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);
   
-  AliMUONV2DStore* Gains() const;
+  /// 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);
   
-  /// Get the Gain calibration object for channels within (detElemId,manuId).
-  AliMUONVCalibParam* Gains(Int_t detElemId, Int_t manuId) const;
+  /// Create a local trigger mask store (which must be deleted) for a given run
+  static AliMUONVStore* CreateLocalTriggerBoardMasks(Int_t runNumber);
 
-  /// Get the mask for the global trigger board.
-  AliMUONVCalibParam* GlobalTriggerBoardMasks() const;
+  /// Create a pedestal store (which must be deleted) from OCDB for the given run
+  static AliMUONVStore* CreatePedestals(Int_t runNumber);
 
-  /// Get the mask for a given local trigger board.
-  AliMUONVCalibParam* LocalTriggerBoardMasks(Int_t localBoardNumber) const;
+  /// 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);
+  
+  /// Create a trigger efficiency map (which must be deleted) for a given run
+  static AliMUONTriggerEfficiencyCells* CreateTriggerEfficiency(Int_t runNumber);
+  
+  /// 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;
   
-  AliMUONV2DStore* Pedestals() 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;
@@ -82,32 +117,25 @@ protected:
   /// Not implemented
   AliMUONCalibrationData& operator=(const AliMUONCalibrationData& other);
   
-private:
-  AliCDBEntry* GetEntry(const char* path) const;
-  AliMUONV1DStore* OnDemandCapacitances() const;
-  AliMUONV2DStore* OnDemandGains() const;
-  AliMUONV2DStore* OnDemandPedestals() const;
-  TMap* OnDemandHV() const;
-  AliMUONVCalibParam* OnDemandGlobalTriggerBoardMasks() const;
-  AliMUONV1DStore* OnDemandRegionalTriggerBoardMasks() const;
-  AliMUONV1DStore* OnDemandLocalTriggerBoardMasks() const;
-  AliMUONTriggerLut* OnDemandTriggerLut() const;
-  AliMUONTriggerEfficiencyCells* OnDemandTriggerEfficiency() const;
-  
 private:  
+    
+  static TObject* CreateObject(Int_t runNumber, const char* path);
+  
+private:
   mutable Bool_t fIsValid; ///<  Whether we were able to correctly initialize
   Int_t fRunNumber; ///<  The run number for which we hold calibrations
-  mutable AliMUONV2DStore* fGains; //!< Gains
-  mutable AliMUONV2DStore* fPedestals; //!< Pedestals
+  mutable AliMUONVStore* fGains; //!< Gains
+  mutable AliMUONVStore* fPedestals; //!< Pedestals
   mutable TMap* fHV; //!< HV
-  mutable AliMUONV1DStore* fLocalTriggerBoardMasks; //!< Local trigger board maska
-  mutable AliMUONV1DStore* fRegionalTriggerBoardMasks; //!< Regional trigger board maska
+  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 AliMUONV1DStore* fCapacitances; //!< Manu capacitances
+  mutable AliMUONVStore* fCapacitances; //!< Manu capacitances
+  mutable AliMUONVStore* fNeighbours; //!< list of neighbours for all channels
   
-  ClassDef(AliMUONCalibrationData,5) // Storage for all MUON calibration data.
+  ClassDef(AliMUONCalibrationData,7) // Storage for all MUON calibration data.
 };
 
 #endif