]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWGLF/FORWARD/analysis2/AliCorrectionManagerBase.h
New script to generate overview index. Javascript code to
[u/mrichter/AliRoot.git] / PWGLF / FORWARD / analysis2 / AliCorrectionManagerBase.h
index bdedbae3b5a500f48d16dcb2bc6cce2a379c722d..c9543f48ac3b070f7c617826142bd934730bad0a 100644 (file)
@@ -15,6 +15,7 @@
 #include <TObjArray.h>
 class AliOADBForward;
 class TBrowser;
+class TAxis;
 
 /**
  * Base class for correction managers. 
@@ -81,7 +82,7 @@ class AliCorrectionManagerBase : public TObject
 public:
   enum EConstants { 
     kIgnoreValue = 0,
-    kIgnoreField = 999
+    kIgnoreField = 999 // Must be synced with AliOADBForward::kInvalidField
   };
   enum EFields {
     kRun       = 0x01, 
@@ -118,6 +119,12 @@ public:
    * @param prefix Prefix to use for all corrections 
    */
   virtual void SetPrefix(const TString& prefix);
+  /** 
+   * Set whether to enable fall-back queries 
+   * 
+   * @param use If true, enable fall-back queries 
+   */
+  virtual void SetEnableFallBack(Bool_t use=true) { fFallBack = use; }
   /** 
    * Store a correction 
    * 
@@ -171,6 +178,60 @@ public:
    * @param debug if true, do verbose queries 
    */
   virtual void SetDebug(Bool_t debug) { fDebug = debug; }
+  /** 
+   * Convinience function to enable corrections on-mass.  User class
+   * should overload this to properly enable corrections based on the
+   * bit identifiers.
+   *
+   * @param what Bit mask of correction identifiers. 
+   */
+  virtual void EnableCorrections(UInt_t what);
+  /** 
+   * Check if the specified corrrections have been initialized
+   * 
+   * @param what     Corrections to check 
+   * @param verbose  If true, be verbose 
+   * 
+   * @return true if all specified the corrections have been 
+   */
+  virtual Bool_t CheckCorrections(UInt_t what, Bool_t verbose=true) const;
+  /** 
+   * Read in all corrections 
+   * 
+   * @param run    Run number 
+   * @param sys    System 
+   * @param sNN    Center of mass energy 
+   * @param fld    L3 magnetic field
+   * @param mc     For simulations 
+   * @param sat    For satellite interactions 
+   * @param force  Force-reread 
+   * 
+   * @return true on success 
+   */
+  Bool_t InitCorrections(ULong_t    run, 
+                        UShort_t   sys, 
+                        UShort_t   sNN, 
+                        Short_t    fld, 
+                        Bool_t     mc, 
+                        Bool_t     sat,
+                        Bool_t     force=false);
+  /** 
+   * @{ 
+   * @name Get axis objects. 
+   */
+  /** 
+   * Get the vertex axis 
+   * 
+   * @return The vertex axis or null
+   */
+  virtual const TAxis* GetVertexAxis() const { return 0; }
+  /** 
+   * Get the @f$\eta@f$ axis
+   * 
+   * @return The @f$\eta@f$ axis or null
+   */
+  virtual const TAxis* GetEtaAxis() const { return 0; }
+  /* @} */
 protected:
   /** 
    * Correction registration
@@ -184,10 +245,11 @@ protected:
     /** 
      * Constructor 
      * 
-     * @param tableName  Table name
-     * @param fileName   File name 
-     * @param cls        Class
-     * @param fields     Enabled fields
+     * @param tableName   Table name
+     * @param fileName    File name 
+     * @param cls         Class
+     * @param queryFields Enabled fields
+     * @param enabled     Enabled or not 
      */
     Correction(const TString& tableName, 
               const TString& fileName, 
@@ -223,6 +285,7 @@ protected:
      * @param mc   If true, for simulated data, else real
      * @param sat  If true, for satellite interactions
      * @param vrb  If true, do verbose query
+     * @param fbk  Force read
      *
      * @return true on success
      */
@@ -233,7 +296,8 @@ protected:
                  Short_t    fld, 
                  Bool_t     mc, 
                  Bool_t     sat,
-                 Bool_t     vrb=false);
+                 Bool_t     vrb=false,
+                 Bool_t     fbk=false);
     /** 
      * Store a correction
      * 
@@ -424,25 +488,6 @@ protected:
    * @return Object of correction, or null if correction not found or in-active
    */
   const TObject* Get(Int_t id) const;
-  /** 
-   * Read in all corrections 
-   * 
-   * @param run    Run number 
-   * @param sys    System 
-   * @param sNN    Center of mass energy 
-   * @param fld    L3 magnetic field
-   * @param mc     For simulations 
-   * @param sat    For satellite interactions 
-   * 
-   * @return true on success 
-   */
-  Bool_t InitCorrections(ULong_t    run, 
-                        UShort_t   sys, 
-                        UShort_t   sNN, 
-                        Short_t    fld, 
-                        Bool_t     mc, 
-                        Bool_t     sat,
-                        Bool_t     force=false);
   /** 
    * Read in all corrections 
    * 
@@ -517,8 +562,8 @@ protected:
   Bool_t          fSatellite;   // Cached satellite interaction flat
   AliOADBForward* fDB;          //! do not store 
   Bool_t          fDebug;       // If true, do verbose queries 
-
-  ClassDef(AliCorrectionManagerBase,1);
+  Bool_t          fFallBack;    // If true, enable fall-back queries 
+  ClassDef(AliCorrectionManagerBase,2);
 };
 
 #endif