NCFS-Pack
A generic (astro)particle physics analysis framework
 
Loading...
Searching...
No Matches
NcJob.h
Go to the documentation of this file.
1#ifndef NcJob_h
2#define NcJob_h
3// Copyright(c) 2005 NCFS/IIHE, All Rights Reserved.
4// See cxx source for full Copyright notice.
5
6#include <cstdlib>
7
8#include "TROOT.h"
9#include "TTask.h"
10#include "TFolder.h"
11#include "TObjArray.h"
12
14
15#include "NcVersion.h"
16
17class NcJob : public TTask
18{
19 public :
20 NcJob(const char* name="NcJob",const char* title=""); // Constructor
21 virtual ~NcJob(); // Destructor
22 void ListEnvironment(); // Provide listing of the job environment
23 void ExecuteJob(Int_t mode=0); // Invokation of the top level processing
24 void MakeFolder(); // Select creation of the folder structure
25 TFolder* GetFolder() const; // Provide pointer to the whiteboard folder
26 TObject* GetMainObject() const; // Provide pointer to the main object structure
27 void AddObject(TObject* obj); // Add an object into the environment
28 void AddObjects(TObjArray* arr); // Add all array objects into the environment
29 void RemoveObject(TObject* obj); // Remove an object from the environment
30 void RemoveObjects(const char* classname); // Remove all objects inheriting from "classname"
31 TObject* GetObject(const char* classname) const; // Provide first stored object inheriting from "classname"
32 TObject* GetObject(Int_t j) const; // Provide j-th stored object
33 TObjArray* GetObjects() const; // Provide all stored object pointers
34 TObjArray* GetObjects(const char* classname); // Provide all objects inheriting from "classname"
35 void ProcessObject(TObject* obj); // Process all sub-tasks for the specified object
36
37 protected :
38 Int_t fMakefolder; // Flag to indicate creation of the folder structure
39 TFolder* fFolder; // Pointer to the folder which serves as the job's whiteboard
40 TObject* fMainObject; // Pointer to the main processing object structure within the job
41 TObjArray* fObjects; // Pointers to the various user-added objects
42 TObjArray* fSelect;
43
44 void SetMainObject(TObject* obj); // Store pointer to the main object structure
45
46 ClassDef(NcJob,2) // Base class for top level job in a task based procedure
47};
48#endif
TObject * GetMainObject() const
Definition NcJob.cxx:294
void ExecuteJob(Int_t mode=0)
Definition NcJob.cxx:226
void ProcessObject(TObject *obj)
Definition NcJob.cxx:517
void SetMainObject(TObject *obj)
Definition NcJob.cxx:305
TObject * GetObject(const char *classname) const
Definition NcJob.cxx:456
Int_t fMakefolder
Definition NcJob.h:38
TFolder * fFolder
Definition NcJob.h:39
void AddObject(TObject *obj)
Definition NcJob.cxx:320
TObjArray * fObjects
Definition NcJob.h:41
void RemoveObject(TObject *obj)
Definition NcJob.cxx:384
TFolder * GetFolder() const
Definition NcJob.cxx:283
NcJob(const char *name="NcJob", const char *title="")
Definition NcJob.cxx:139
void MakeFolder()
Definition NcJob.cxx:268
TObjArray * fSelect
! Temp. array of pointers to user-selected stored objects
Definition NcJob.h:42
void AddObjects(TObjArray *arr)
Definition NcJob.cxx:366
TObject * fMainObject
Definition NcJob.h:40
void RemoveObjects(const char *classname)
Definition NcJob.cxx:409
virtual ~NcJob()
Definition NcJob.cxx:163
TObjArray * GetObjects() const
Definition NcJob.cxx:479
void ListEnvironment()
Definition NcJob.cxx:205