]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWGLF/FORWARD/analysis2/AliBaseAODTask.h
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGLF / FORWARD / analysis2 / AliBaseAODTask.h
index 7027cfbbb5a0c93813ce4999cef7b4d9ac9b0de5..b1ac532635ef08acb16962d0c4d0cab9e2499fc6 100644 (file)
@@ -22,12 +22,22 @@ public:
    * Constructor 
    * 
    * @param name Name of task 
+   * @param title Class name used in configuration script 
    */
-  AliBaseAODTask(const char* name);
+  AliBaseAODTask(const char* name,
+                const char* title);
   /** 
    * Destructor
    */
   virtual ~AliBaseAODTask() {} 
+  /** 
+   * Configure this task via a macro 
+   * 
+   * @param macro Macro to configure va 
+   * 
+   * @return true on success, false otherwise
+   */
+  virtual Bool_t Configure(const char* macro="-default-");
   /** 
    * @{ 
    * @name Set parameters 
@@ -246,18 +256,32 @@ protected:
    * 
    * @return true if we have one or more centrality bins 
    */
-  Bool_t HasCentrality() const { return fCentAxis.GetNbins() >= 1; }
+  Bool_t HasCentrality() const 
+  { 
+    return (fCentAxis.GetNbins() >= 1 && 
+           fCentAxis.GetXbins() && 
+           fCentAxis.GetXbins()->GetArray()); 
+  }
+  /** 
+   * Get the name of the default configuration script to use.
+   * Sub-classes can override this to give another default
+   * configuration script.  Note, it should problably only return the
+   * base name (not full path) of the script.
+   * 
+   * @return Name of the configuration script to use. 
+   */
+  virtual const char* DefaultConfig() const { return "dNdetaConfig.C"; }
 
   UInt_t   fTriggerMask;   // Trigger mask 
   Double_t fMinIpZ;        // Least z--coordiante of interaction point
   Double_t fMaxIpZ;        // Largest z--coordiante of interaction point
   TAxis    fCentAxis;      // Centrality axis 
-  TH1    fTriggers;      // Histogram of triggers
-  TH1    fEventStatus;   // Histogram of event selection 
-  TH1    fVertex;        // Vertex distribution of all events 
-  TH1    fCent;          // Centrality distribution of all events
-  TH1    fAccVertex;     // Vertex distribution of accepted events 
-  TH1    fAccCent;       // Centrality distribution of accepted events
+  TH1I*    fTriggers;      // Histogram of triggers
+  TH1I*    fEventStatus;   // Histogram of event selection 
+  TH1D*    fVertex;        // Vertex distribution of all events 
+  TH1D*    fCent;          // Centrality distribution of all events
+  TH1D*    fAccVertex;     // Vertex distribution of accepted events 
+  TH1D*    fAccCent;       // Centrality distribution of accepted events
   Bool_t   fFirstEvent;    // Information stored or not 
   Bool_t   fCloneList;     // Wether to clone sum list for results
   TList*   fSums;          // Output list of sums