Fix bug in building local list of valid files.
[u/mrichter/AliRoot.git] / ANALYSIS / AliAnalysisTask.h
index f0a320d..5f41560 100644 (file)
@@ -43,6 +43,7 @@ class AliAnalysisTask : public TTask {
   TObject                  *fPublishedData; //! published data
   TObjArray                *fInputs;        // Array of input slots
   TObjArray                *fOutputs;       // Array of output slots
+  TString                   fBranchNames;   // List of input branches that need to be loaded for this task
 
   // Define the input/output slots (called by user in the ctor of the derived class)
   //=== CALL IN THE CONSTRUCTOR OF DERIVED CLASS TO DEFINE INPUTS/OUTPUTS ===
@@ -104,7 +105,12 @@ public:
   void                      CheckNotify(Bool_t init=kFALSE);
   // Check if there are illegal circular dependencies
   Bool_t                    CheckCircularDeps();
+  virtual Bool_t            CheckPostData() const;
+  virtual Bool_t            CheckOwnership() const;
+  // Reset task
+  virtual void              Reset();
   // Getters
+  void                      GetBranches(const char *type, TString &result) const;
   Int_t                     GetNinputs() const  {return fNinputs;}
   Int_t                     GetNoutputs() const {return fNoutputs;}
   TObject                  *GetPublishedData() const {return fPublishedData;}
@@ -122,8 +128,11 @@ public:
   Bool_t                    IsReady() const  {return fReady;}
   Bool_t                    IsUsed() const   {return TObject::TestBit(kTaskUsed);}
   Bool_t                    IsZombie() const {return TObject::TestBit(kTaskZombie);}
-  void                      PrintTask(Option_t *option="all", Int_t indent=0) const;
+  Bool_t                    HasBranches() const {return !fBranchNames.IsNull();}
+  virtual void                      PrintTask(Option_t *option="all", Int_t indent=0) const;
   void                      PrintContainers(Option_t *option="all", Int_t indent=0) const;
+  Bool_t                    ProducersTouched() const;
+  void                      SetBranches(const char *names) {fBranchNames = names;}
   void                      SetChecked(Bool_t flag=kTRUE) {TObject::SetBit(kTaskChecked,flag);}
   void                      SetPostEventLoop(Bool_t flag=kTRUE);
   void                      SetUsed(Bool_t flag=kTRUE);
@@ -138,6 +147,6 @@ public:
   virtual void              Terminate(Option_t *option="");
   //=====================================================================
     
-  ClassDef(AliAnalysisTask,1)  // Class describing an analysis task
+  ClassDef(AliAnalysisTask,2)  // Class describing an analysis task
 };
 #endif