source: tags/Mars-V0.4/mbase/MTask.cc

Last change on this file was 858, checked in by tbretz, 23 years ago
*** empty log message ***
File size: 4.4 KB
Line 
1/* ======================================================================== *\
2!
3! *
4! * This file is part of MARS, the MAGIC Analysis and Reconstruction
5! * Software. It is distributed to you in the hope that it can be a useful
6! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
7! * It is distributed WITHOUT ANY WARRANTY.
8! *
9! * Permission to use, copy, modify and distribute this software and its
10! * documentation for any purpose is hereby granted without fee,
11! * provided that the above copyright notice appear in all copies and
12! * that both that copyright notice and this permission notice appear
13! * in supporting documentation. It is provided "as is" without express
14! * or implied warranty.
15! *
16!
17!
18! Author(s): Thomas Bretz 12/2000 (tbretz@uni-sw.gwdg.de)
19!
20! Copyright: MAGIC Software Development, 2000-2001
21!
22!
23\* ======================================================================== */
24
25/////////////////////////////////////////////////////////////////////////////
26// //
27// MTask //
28// //
29// Base class for all tasks which can perfomed in a tasklist //
30// For each event processed in the eventloop all the different //
31// tasks in the tasklist will be processed. //
32// //
33// So all tasks must inherit from this baseclass. //
34// //
35// The inheritance from MInputStreamID is used to indicate the //
36// type of event that this task is for. If it is "All" it is executed //
37// independantly of the actual ID of the task list. //
38// //
39// Inside this abstract class, there are three fundamental function: //
40// //
41// - PreProcess(): executed before the eventloop starts. Here you //
42// can initiate different things, open files, etc. //
43// As an argument this function gets a pointer to the //
44// parameter list. You can stop the execution by //
45// kFALSE instread of kTRUE. //
46// //
47// - Process(): executed for each event in the eventloop. Do in //
48// one task after the other (as the occur in the //
49// tasklist) the action of one task. Only the tasks //
50// with a Stream ID which matches the actual ID of the //
51// task list are executed. A task can return kFALSE //
52// to stop the execuition of the pending taks in a //
53// list or kCONTINUE to skip the pending tasks. //
54// //
55// - PostProcess(): executed after the eventloop. Here you can close //
56// output files, start display of the run parameter, //
57// etc. //
58// //
59/////////////////////////////////////////////////////////////////////////////
60
61#include "MTask.h"
62
63ClassImp(MTask);
64
65// --------------------------------------------------------------------------
66//
67// This is processed before the eventloop starts
68//
69// It is the job of the PreProcess to connect the tasks
70// with the right container in the parameter list.
71//
72// the virtual implementation returns kTRUE
73//
74Bool_t MTask::PreProcess( MParList *pList )
75{
76 return kTRUE;
77}
78
79// --------------------------------------------------------------------------
80//
81// This is processed for every event in the eventloop
82//
83// the virtual implementation returns kTRUE
84//
85Bool_t MTask::Process()
86{
87 return kTRUE;
88}
89
90// --------------------------------------------------------------------------
91//
92// This is processed after the eventloop starts
93//
94// the virtual implementation returns kTRUE
95//
96Bool_t MTask::PostProcess()
97{
98 return kTRUE;
99}
100
101
Note: See TracBrowser for help on using the repository browser.