source: trunk/MagicSoft/Mars/mjobs/MJob.h@ 4753

Last change on this file since 4753 was 4732, checked in by tbretz, 20 years ago
*** empty log message ***
File size: 1.7 KB
Line 
1#ifndef MARS_MJob
2#define MARS_MJob
3
4#ifndef MARS_MSequence
5#include "MSequence.h"
6#endif
7
8class TEnv;
9class MEvtLoop;
10
11class MJob : public MParContainer
12{
13private:
14 void FixPath(TString &path) const;
15
16 TEnv *fEnv; // Resource file
17 TString fEnvPrefix; // Prefix for resources
18 Bool_t fEnvDebug; // Debug setup of resources
19
20protected:
21
22 TString fPathOut; // Directory to write output file to (eg. calib*.root)
23 TString fPathIn; // Directory to read output from (eg. calib*.root)
24 TString fPathData; // Directory to read data files from (2004*.root)
25
26 Bool_t fOverwrite; // Allow overwriting output files
27 Int_t fMaxEvents; // Maximum number of events
28
29 MSequence fSequence; // Sequence
30
31 Int_t GetEnv(const char *name, Int_t dflt) const;
32 Double_t GetEnv(const char *name, Double_t dflt) const;
33 const char *GetEnv(const char *name, const char *dflt) const;
34 Bool_t HasEnv(const char *name) const;
35
36 Bool_t SetupEnv(MEvtLoop &loop) const;
37 virtual Bool_t CheckEnv();
38
39public:
40 MJob(const char *name=NULL, const char *title=NULL);
41 ~MJob();
42
43 void SetPathOut(const char *path=".");
44 void SetPathIn(const char *path=".");
45 void SetPathData(const char *path=".");
46
47 void SetOverwrite(Bool_t b=kTRUE) { fOverwrite=b; }
48 Bool_t SetEnv(const char *env, const char *prefix=0);
49 void SetEnvDebug(Bool_t b=kTRUE) { fEnvDebug=b; }
50
51 void SetMaxEvents(Int_t max) { fMaxEvents = max; }
52 void SetSequence(const MSequence &seq) { fSequence = seq; }
53
54 MStatusDisplay *GetDisplay() { return fDisplay; }
55
56 ClassDef(MJob, 0) // Bas class for Jobs
57};
58
59#endif
Note: See TracBrowser for help on using the repository browser.