First prototype of the new analysis framework (A.Gheata)
[u/mrichter/AliRoot.git] / ANALYSIS / AliAnalysisDataSlot.h
CommitLineData
d3106602 1#ifndef ALIANALYSISDATASLOT_H
2#define ALIANALYSISDATASLOT_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// AliAnalysysDataSlot - Class representing a data slot of an analysis task.
11// An analysis slot enforces a certain data type required by the Exec()
12// method of the analysis task. The slot must be connected to a data
13// container with data of the same type.
14//==============================================================================
15
16#ifndef ROOT_TObject
17#include "TObject.h"
18#endif
19
20class TClass;
21class AliAnalysisDataContainer;
22class AliAnalysisTask;
23
24class AliAnalysisDataSlot : public TObject {
25
26public:
27 AliAnalysisDataSlot() : fType(NULL), fParent(NULL), fContainer(NULL) { }
28 AliAnalysisDataSlot(TClass *type, AliAnalysisTask *task) : fType(type), fParent(task), fContainer(NULL) { }
29 virtual ~AliAnalysisDataSlot() { }
30
31 // Connect some container to the slot
32 Bool_t ConnectContainer(AliAnalysisDataContainer *cont);
33 // Getters
34 TClass *GetType() const {return fType;}
35 AliAnalysisTask *GetParent() const {return fParent;}
36 AliAnalysisDataContainer *GetContainer() const {return fContainer;}
37 TObject *GetData() const;
38 // Slot status checking
39 Bool_t IsConnected() const {return ((fContainer)?kTRUE:kFALSE);}
40 Bool_t IsDataReady() const;
41
42protected:
43 TClass *fType; // Data type required by the slot
44 AliAnalysisTask *fParent; // Analysis task to which the slot belongs
45 AliAnalysisDataContainer *fContainer; // Container connected to the slot
46
47 ClassDef(AliAnalysisDataSlot,1) // Class describing an analysis data slot
48};
49#endif