Logo ROOT  
Reference Guide
Go to the documentation of this file.
1// @(#)root/base:$Id$
2// Author: Rene Brun 02/09/2000
5 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
12#ifndef ROOT_TTask
13#define ROOT_TTask
17// //
18// TTask //
19// //
20// Base class for recursive execution of tasks. //
21// //
24#include "TNamed.h"
27class TList;
29#include "TList.h"
32class TBrowser;
35class TTask : public TNamed {
38 TList *fTasks; //List of Tasks
39 TString fOption; //Option specified in ExecuteTask
40 Int_t fBreakin; //=1 if a break point set at task extry
41 Int_t fBreakout; //=1 if a break point set at task exit
42 Bool_t fHasExecuted; //True if task has executed
43 Bool_t fActive; //true if task is active
45 static TTask *fgBeginTask; //pointer to task initiator
46 static TTask *fgBreakPoint; //pointer to current break point
51 TTask();
52 TTask(const char* name, const char *title);
53 virtual ~TTask();
54 TTask(const TTask &task);
55 TTask& operator=(const TTask& tt);
57 virtual void Abort(); // *MENU*
58 virtual void Add(TTask *task);
59 void Browse(TBrowser *b) override;
60 virtual void CleanTasks();
61 void Clear(Option_t *option="") override;
62 virtual void Continue(); // *MENU*
63 virtual void Exec(Option_t *option);
64 virtual void ExecuteTask(Option_t *option="0"); // *MENU*
65 virtual void ExecuteTasks(Option_t *option);
66 Int_t GetBreakin() const { return fBreakin; }
67 Int_t GetBreakout() const { return fBreakout; }
68 Bool_t IsActive() const { return fActive; }
69 Bool_t IsFolder() const override { return kTRUE; }
70 void ls(Option_t *option="*") const override; // *MENU*
71 void SetActive(Bool_t active=kTRUE) { fActive = active; } // *TOGGLE*
72 void SetBreakin(Int_t breakin=1) { fBreakin = breakin; } // *TOGGLE*
73 void SetBreakout(Int_t breakout=1) { fBreakout = breakout; } // *TOGGLE*
74 TList *GetListOfTasks() const { return fTasks; }
76 ClassDefOverride(TTask,1) //Base class for tasks
const Bool_t kTRUE
Definition: RtypesCore.h:100
const char Option_t
Definition: RtypesCore.h:66
#define ClassDefOverride(name, id)
Definition: Rtypes.h:339
Option_t Option_t option
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t b
char name[80]
Definition: TGX11.cxx:110
Using a TBrowser one can browse all ROOT objects.
Definition: TBrowser.h:37
A doubly linked list.
Definition: TList.h:38
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
Basic string class.
Definition: TString.h:136
TTask is a base class that can be used to build a complex tree of Tasks.
Definition: TTask.h:35
virtual void Exec(Option_t *option)
Dummy Execute.
Definition: TTask.cxx:259
Int_t fBreakin
Definition: TTask.h:40
void SetActive(Bool_t active=kTRUE)
Definition: TTask.h:71
TTask & operator=(const TTask &tt)
Assignment operator.
Definition: TTask.cxx:121
TString fOption
Definition: TTask.h:39
void ls(Option_t *option="*") const override
List the tree of tasks.
Definition: TTask.cxx:346
static TTask * fgBeginTask
Definition: TTask.h:45
TList * GetListOfTasks() const
Definition: TTask.h:74
static TTask * fgBreakPoint
Definition: TTask.h:46
void SetBreakin(Int_t breakin=1)
Definition: TTask.h:72
virtual ~TTask()
Delete a task and its subtasks.
Definition: TTask.cxx:160
Int_t GetBreakin() const
Definition: TTask.h:66
Bool_t IsActive() const
Definition: TTask.h:68
void Browse(TBrowser *b) override
Browse the list of tasks.
Definition: TTask.cxx:204
virtual void CleanTasks()
Reset tasks state: breakpoints and execute flags also invokes the Clear function of each task to clea...
Definition: TTask.cxx:215
Int_t fBreakout
Definition: TTask.h:41
virtual void ExecuteTasks(Option_t *option)
Execute all the subtasks of a task.
Definition: TTask.cxx:307
Bool_t fActive
Definition: TTask.h:43
Default constructor invoked when reading a TTask object from a file.
Definition: TTask.cxx:96
Bool_t fHasExecuted
Definition: TTask.h:42
virtual void Abort()
Abort current tree of tasks.
Definition: TTask.cxx:185
virtual void Add(TTask *task)
Add TTask to this.
Definition: TTask.cxx:171
Bool_t IsFolder() const override
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).
Definition: TTask.h:69
void Clear(Option_t *option="") override
Recursively call the Clear function of this task and its subtasks.
Definition: TTask.cxx:232
TList * fTasks
Definition: TTask.h:38
void SetBreakout(Int_t breakout=1)
Definition: TTask.h:73
virtual void Continue()
Resume execution at the current break point.
Definition: TTask.cxx:239
virtual void ExecuteTask(Option_t *option="0")
Execute main task and its subtasks.
Definition: TTask.cxx:272
Int_t GetBreakout() const
Definition: TTask.h:67
auto * tt
Definition: textangle.C:16