Removal of effc++ warnings
[u/mrichter/AliRoot.git] / ANALYSIS / AliAnalysisManager.h
CommitLineData
d3106602 1#ifndef ALIANALYSISMANAGER_H
2#define ALIANALYSISMANAGER_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7// Author: Andrei Gheata, 31/05/2006
8
9//==============================================================================
10// AliAnalysysManager - Manager analysis class. Allows creation of several
11// analysis tasks and data containers storing their input/output. Allows
12// connecting/chaining tasks via shared data containers. Serializes the current
13// event for all tasks depending only on initial input data.
14//==============================================================================
15
16#ifndef ROOT_TSelector
17#include "TSelector.h"
18#endif
19
20class TClass;
21class AliAnalysisDataContainer;
22class AliAnalysisTask;
23
24class AliAnalysisManager : public TSelector {
25
26public:
27
28enum EAliAnalysisContType {
29 kNormalContainer = 0,
30 kInputContainer = 1,
31 kOutputContainer = 2
32};
33 AliAnalysisManager();
34 AliAnalysisManager(const AliAnalysisManager& other);
35 AliAnalysisManager& operator=(const AliAnalysisManager& other);
36 virtual ~AliAnalysisManager();
37
38 // Selector-specific methods
39 virtual void Init(TTree *tree);
40 virtual void Begin(TTree *tree);
41 virtual void SlaveBegin(TTree *tree);
42 virtual Bool_t Process(Long64_t entry);
43 virtual void SlaveTerminate();
44 virtual void Terminate();
45
46 // Getters
47 TObjArray *GetContainers() const {return fContainers;}
48 TObjArray *GetInputs() const {return fInputs;}
49 TObjArray *GetOutputs() const {return fOutputs;}
50 TObjArray *GetTasks() const {return fTasks;}
51 TObjArray *GetTopTasks() const {return fTopTasks;}
52 TObjArray *GetZombieTasks() const {return fZombies;}
53// AliAnalysisInfo *GetStatus() const {return fStatus;}
54
55 // Container handling
56 AliAnalysisDataContainer *CreateContainer(const char *name, TClass *datatype,
57 EAliAnalysisContType type=kNormalContainer);
58
59 // Including tasks and getting them
60 void AddTask(AliAnalysisTask *task);
61 AliAnalysisTask *GetTask(const char *name) const;
62
63 // Connecting data containers to task inputs/outputs
64 Bool_t ConnectInput(AliAnalysisTask *task, Int_t islot,
65 AliAnalysisDataContainer *cont);
66 Bool_t ConnectOutput(AliAnalysisTask *task, Int_t islot,
67 AliAnalysisDataContainer *cont);
68 // Garbage collection
69 void CleanContainers();
70
71 // Analysis initialization and execution, status
72 Bool_t InitAnalysis();
73 Bool_t IsInitialized() const {return fInitOK;}
74 void ResetAnalysis();
75 void ExecAnalysis(Option_t *option="");
76 void FinishAnalysis();
77 void PrintStatus(Option_t *option="all") const;
78
79protected:
80 Bool_t fInitOK; // Initialisation done
81 TObjArray *fContainers; //-> List of all containers
82 TObjArray *fInputs; //-> List of containers with input data
83 TObjArray *fOutputs; //-> List of containers with results
84 TObjArray *fTasks; //-> List of analysis tasks
85 TObjArray *fTopTasks; //-> List of top tasks
86 TObjArray *fZombies; //-> List of zombie tasks
87// AliAnalysisInfo *fStatus; // Analysis info object
88
89 ClassDef(AliAnalysisManager,1) // Analysis manager class
90};
91#endif