]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONCalibrationData.h
Fix coverity defect
[u/mrichter/AliRoot.git] / MUON / AliMUONCalibrationData.h
index 5093468c8dd9aff594f42a50f0ba738324d16c46..b73e3cbff87d05d61cd77c14d8ee02ed453fdb34 100644 (file)
@@ -3,7 +3,7 @@
 
 // $Id$
 
-/// \ingroup base
+/// \ingroup calib
 /// \class AliMUONCalibrationData
 /// \brief Single entry point to access MUON calibration data.
 /// 
 #endif
 
 class AliCDBEntry;
+class AliMUONGlobalCrateConfig;
+class AliMUONRegionalTriggerConfig;
+class AliMUONRejectList;
 class AliMUONTriggerEfficiencyCells;
 class AliMUONTriggerLut;
-class AliMUONV1DStore;
-class AliMUONV2DStore;
 class AliMUONVCalibParam;
+class AliMUONVStore;
+class AliMUONVStore;
 class TMap;
 
 class AliMUONCalibrationData : public TObject
@@ -35,37 +38,94 @@ public:
   AliMUONCalibrationData(Int_t runNumber=-1, Bool_t deferredInitialization=kTRUE);
   virtual ~AliMUONCalibrationData();
 
-  AliMUONV2DStore* Neighbours() const;
-  
-  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, Int_t* startOfValidity=0);
+
+  /// Create a gain store (which must be deleted) from OCDB for the given run
+  static AliMUONVStore* CreateGains(Int_t runNumber, Int_t* startOfValidity=0);
+
+  /// Create a global trigger mask (which must be deleted) from OCDB for the given run
+  static AliMUONGlobalCrateConfig* CreateGlobalTriggerCrateConfig(Int_t runNumber, Int_t* startOfValidity=0);
   
-  AliMUONV2DStore* Gains() const;
+  /// Create a hv map (which must be deleted) from OCDB for the given run
+  static TMap* CreateHV(Int_t runNumber, Int_t* startOfValidity=0, Bool_t patched=kTRUE, TList* messages=0x0);
+
+  /// Create a Trigger HV and current  map (which must be deleted) from OCDB for the given run
+  static TMap* CreateTriggerDCS(Int_t runNumber, Int_t* startOfValidity=0);
+
+  /// Create a neighbours store (which must be deleted) from OCDB for the given run
+  static AliMUONVStore* CreateNeighbours(Int_t runNumber, Int_t* startOfValidity=0);
   
-  /// 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, Int_t* startOfValidity=0);
 
-  /// Get the mask for the global trigger board.
-  AliMUONVCalibParam* GlobalTriggerBoardMasks() const;
+  /// Create an occupancy map store (which must be deleted) from OCDB for the given run
+  static AliMUONVStore* CreateOccupancyMap(Int_t runNumber, Int_t* startOfValidity=0);
 
-  /// Get the mask for a given local trigger board.
-  AliMUONVCalibParam* LocalTriggerBoardMasks(Int_t localBoardNumber) const;
+  /// Create a rejectlist store (which must be deleted) from OCDB for the given run
+  static AliMUONRejectList* CreateRejectList(Int_t runNumber, Int_t* startOfValidity=0);
+
+  /// Create a pedestal store (which must be deleted) from OCDB for the given run
+  static AliMUONVStore* CreatePedestals(Int_t runNumber, Int_t* startOfValidity=0);
+
+  /// Create a configuration store (which must be deleted) from OCDB for the given run
+  static AliMUONVStore* CreateConfig(Int_t runNumber, Int_t* startOfValidity=0);
+
+  /// Create a regional trigger mask store (which must be deleted) for a given run
+  static AliMUONRegionalTriggerConfig* CreateRegionalTriggerConfig(Int_t runNumber, Int_t* startOfValidity=0);
 
-  /// Get the HV values
-  TMap* HV() const;
+  /// Create a trigger Look Up Table (which must be deleted) for a given run
+  static AliMUONTriggerLut* CreateTriggerLut(Int_t runNumber, Int_t* startOfValidity=0);
+  /// Create a trigger efficiency map (which must be deleted) for a given run
+  static AliMUONTriggerEfficiencyCells* CreateTriggerEfficiency(Int_t runNumber, Int_t* startOfValidity=0);
   
+  /// Get all the gains
+  AliMUONVStore* Gains() const;
+
+  /// Get the configuration for the global trigger board.
+  AliMUONGlobalCrateConfig* GlobalTriggerCrateConfig() const;
+    
+  /// Get the Gain calibration object for channels within (detElemId,manuId).
+  AliMUONVCalibParam* Gains(Int_t detElemId, Int_t manuId) const;
+    
+  /// Get the HV values. Use patched=kFALSE to get unprocessed (i.e. "raw") values as they are in the OCDB
+  TMap* HV(Bool_t patched=kTRUE) const;
+
+  /// Get the Trigger HV and current values
+  TMap* TriggerDCS() 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 config store
+  AliMUONVStore* Config() const;
   
+  /// Get the occupancy map store
+  AliMUONVStore* OccupancyMap() const;
+
+  /// Get the reject list store
+  AliMUONRejectList* RejectList() 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;
+  /// Get the config for regional trigger.
+  AliMUONRegionalTriggerConfig* RegionalTriggerConfig() const;
+
 
   /// The runnumber used by this object.
   Int_t RunNumber() const { return fRunNumber; }
@@ -77,41 +137,50 @@ public:
   AliMUONTriggerEfficiencyCells* TriggerEfficiency() const;
   
   void Reset();
+
+  static TObject* CreateObject(Int_t runNumber, const char* path, Int_t* startOfValidity=0x0);
+  
+  static void Check(Int_t runNumber);
+
+  static void BypassStores(AliMUONVStore* ped, AliMUONVStore* gain);
   
 protected:
   /// Not implemented
   AliMUONCalibrationData(const AliMUONCalibrationData& other);
   /// Not implemented
   AliMUONCalibrationData& operator=(const AliMUONCalibrationData& other);
+
+  static Bool_t PatchHVValues(TObjArray& values, TString* msg=0x0);
+  
+  static Bool_t CheckHVGroup(TObjArray& values, Int_t first, Int_t last, Double_t& value,
+                             Int_t& slope, TString* msg);
   
 private:
-  AliCDBEntry* GetEntry(const char* path) const;
-  AliMUONV2DStore* OnDemandNeighbours() 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:  
   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 AliMUONVCalibParam* fGlobalTriggerBoardMasks; //!< Global trigger board maska
+  mutable TMap* fTriggerDCS; //!< Trigger HV and Currents
+  mutable AliMUONVStore* fLocalTriggerBoardMasks; //!< Local trigger board maska  
+  mutable AliMUONRegionalTriggerConfig* fRegionalTriggerConfig; //!< Regional trigger config
+  mutable AliMUONGlobalCrateConfig* fGlobalTriggerCrateConfig; //!< Global trigger crate config
+  
   mutable AliMUONTriggerLut* fTriggerLut; //!< TRigger LUTs
   mutable AliMUONTriggerEfficiencyCells* fTriggerEfficiency; //!< Trigger efficiency cells
-  mutable AliMUONV1DStore* fCapacitances; //!< Manu capacitances
-  mutable AliMUONV2DStore* fNeighbours; //!< list of neighbours for all channels
+  mutable AliMUONVStore* fCapacitances; //!< Manu capacitances
+  mutable AliMUONVStore* fNeighbours; //!< list of neighbours for all channels
+  
+  mutable AliMUONVStore* fOccupancyMap; //!< occupancy map
+  
+  mutable AliMUONRejectList* fRejectList; //!< reject list
+
+  static AliMUONVStore* fgBypassPedestals;
+  static AliMUONVStore* fgBypassGains;
+  
+  mutable AliMUONVStore* fConfig; //!< configuration of the tracker
   
-  ClassDef(AliMUONCalibrationData,6) // Storage for all MUON calibration data.
+  ClassDef(AliMUONCalibrationData,13) // Storage for all MUON calibration data.
 };
 
 #endif