]>
Commit | Line | Data |
---|---|---|
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 | ||
c52c2132 | 16 | #ifndef ROOT_TNamed |
17 | #include "TNamed.h" | |
d3106602 | 18 | #endif |
19 | ||
20 | class TClass; | |
21 | class AliAnalysisDataContainer; | |
22 | class AliAnalysisTask; | |
23 | ||
c52c2132 | 24 | class AliAnalysisDataSlot : public TNamed { |
d3106602 | 25 | |
26 | public: | |
c52c2132 | 27 | AliAnalysisDataSlot() : TNamed(), fType(NULL), fParent(NULL), fContainer(NULL) {} |
28 | AliAnalysisDataSlot(TClass *type, AliAnalysisTask *task); | |
29 | AliAnalysisDataSlot(const AliAnalysisDataSlot &slot); | |
37a26056 | 30 | virtual ~AliAnalysisDataSlot() {} |
31 | ||
32 | // Assignment | |
33 | AliAnalysisDataSlot &operator=(const AliAnalysisDataSlot &slot); | |
d3106602 | 34 | // Connect some container to the slot |
35 | Bool_t ConnectContainer(AliAnalysisDataContainer *cont); | |
36 | // Getters | |
327eaf46 | 37 | void *GetBranchAddress(const char *branch) const; |
38 | Bool_t SetBranchAddress(const char *branch, void *address); | |
c52c2132 | 39 | TClass *GetType() const; |
d3106602 | 40 | AliAnalysisTask *GetParent() const {return fParent;} |
41 | AliAnalysisDataContainer *GetContainer() const {return fContainer;} | |
42 | TObject *GetData() const; | |
43 | // Slot status checking | |
44 | Bool_t IsConnected() const {return ((fContainer)?kTRUE:kFALSE);} | |
45 | Bool_t IsDataReady() const; | |
c52c2132 | 46 | |
47 | private: | |
48 | void SetType(TClass *type) {fType = type;} | |
d3106602 | 49 | |
50 | protected: | |
c52c2132 | 51 | TClass *fType; //! Type of the slot |
d3106602 | 52 | AliAnalysisTask *fParent; // Analysis task to which the slot belongs |
53 | AliAnalysisDataContainer *fContainer; // Container connected to the slot | |
54 | ||
55 | ClassDef(AliAnalysisDataSlot,1) // Class describing an analysis data slot | |
56 | }; | |
57 | #endif |