]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ANALYSIS/AliAnalysisManager.h
added RawReader offline source component
[u/mrichter/AliRoot.git] / ANALYSIS / AliAnalysisManager.h
index a6021dcd7229ace2022baf2b039ca30e1e36576f..772aa3ed6a27ddd9542e743f4dd57c69ab133000 100644 (file)
@@ -21,6 +21,8 @@ class TClass;
 class TTree;
 class AliAnalysisDataContainer;
 class AliAnalysisTask;
+class AliVEventHandler;
+
 
 class AliAnalysisManager : public TNamed {
 
@@ -38,6 +40,11 @@ enum EAliAnalysisExecMode {
    kGridAnalysis     = 2
 };
 
+enum EAliAnalysisFlags {
+   kEventLoop        = BIT(14),
+   kDisableBranches  = BIT(15)
+};   
+
    AliAnalysisManager();
    AliAnalysisManager(const char *name, const char *title="");
    virtual            ~AliAnalysisManager();
@@ -75,6 +82,11 @@ enum EAliAnalysisExecMode {
    void                SetAnalysisType(EAliAnalysisExecMode mode) {fMode = mode;}
    void                SetCurrentEntry(Long64_t entry) {fCurrentEntry = entry;}
    void                SetDebugLevel(UInt_t level) {fDebug = level;}
+   void                SetDisableBranches(Bool_t disable=kTRUE) {TObject::SetBit(kDisableBranches,disable);}
+   void                SetOutputEventHandler(AliVEventHandler*  handler) {fOutputEventHandler  = handler;}
+   void                SetMCtruthEventHandler(AliVEventHandler* handler) {fMCtruthEventHandler = handler;}
+   AliVEventHandler*   GetOutputEventHandler()  {return fOutputEventHandler;}
+   AliVEventHandler*   GetMCtruthEventHandler() {return fMCtruthEventHandler;}
 
    // Container handling
    AliAnalysisDataContainer *CreateContainer(const char *name, TClass *datatype, 
@@ -96,6 +108,7 @@ enum EAliAnalysisExecMode {
    // Analysis initialization and execution, status
    Bool_t               InitAnalysis();
    Bool_t               IsInitialized() const {return fInitOK;}
+   Bool_t               IsEventLoop() const {return TObject::TestBit(kEventLoop);}
    void                 ResetAnalysis();
    void                 ExecAnalysis(Option_t *option="");
    void                 FinishAnalysis();
@@ -103,19 +116,22 @@ enum EAliAnalysisExecMode {
 
 protected:
    void                 ImportWrappers(TList *source);
+   void                 SetEventLoop(Bool_t flag=kTRUE) {TObject::SetBit(kEventLoop,flag);}
 
 private:
-   TTree               *fTree;         //! Input tree in case of TSelector model
-   Long64_t             fCurrentEntry; //! Current processed entry in the tree
-   EAliAnalysisExecMode fMode;         // Execution mode
-   Bool_t               fInitOK;       // Initialisation done
-   UInt_t               fDebug;        // Debug level
-   TObjArray           *fTasks;        // List of analysis tasks
-   TObjArray           *fTopTasks;     // List of top tasks
-   TObjArray           *fZombies;      // List of zombie tasks
-   TObjArray           *fContainers;   // List of all containers
-   TObjArray           *fInputs;       // List of containers with input data
-   TObjArray           *fOutputs;      // List of containers with results
+   TTree                  *fTree;                //! Input tree in case of TSelector model
+   AliVEventHandler       *fOutputEventHandler;  //  Optional common output event handler
+   AliVEventHandler       *fMCtruthEventHandler; //  Optional common MC Truth event handler
+   Long64_t                fCurrentEntry;        //! Current processed entry in the tree
+   EAliAnalysisExecMode    fMode;                // Execution mode
+   Bool_t                  fInitOK;              // Initialisation done
+   UInt_t                  fDebug;               // Debug level
+   TObjArray              *fTasks;               // List of analysis tasks
+   TObjArray              *fTopTasks;            // List of top tasks
+   TObjArray              *fZombies;             // List of zombie tasks
+   TObjArray              *fContainers;          // List of all containers
+   TObjArray              *fInputs;              // List of containers with input data
+   TObjArray              *fOutputs;             // List of containers with results
 
    static AliAnalysisManager *fgAnalysisManager; //! static pointer to object instance
    ClassDef(AliAnalysisManager,1)  // Analysis manager class