source: trunk/MagicSoft/Mars/mjobs/MSequence.h@ 6131

Last change on this file since 6131 was 5310, checked in by tbretz, 20 years ago
*** empty log message ***
File size: 2.1 KB
Line 
1#ifndef MARS_MSequence
2#define MARS_MSequence
3
4#ifndef ROOT_TArrayI
5#include <TArrayI.h>
6#endif
7
8#ifndef MARS_MTime
9#include "MTime.h"
10#endif
11
12class MDirIter;
13
14class MSequence : public MParContainer
15{
16private:
17 UInt_t fSequence;
18
19 MTime fStart;
20
21 UInt_t fLastRun;
22 UInt_t fNumEvents;
23
24 UInt_t fPeriod;
25 MTime fNight;
26
27 TString fProject;
28 TString fSource;
29 TString fTriggerTable;
30 TString fHvSettings;
31
32 TArrayI fRuns;
33 TArrayI fCalRuns;
34 TArrayI fPedRuns;
35 TArrayI fDatRuns;
36
37 void Split(TString &runs, TArrayI &data) const;
38 Int_t SetupRuns(MDirIter &iter, const TArrayI &arr, const char *path, char *id, Bool_t raw=kFALSE) const;
39
40public:
41 MSequence() : fSequence((UInt_t)-1), fLastRun((UInt_t)-1),
42 fNumEvents((UInt_t)-1), fPeriod((UInt_t)-1) { }
43 MSequence(const char *fname);
44 MSequence(const MSequence &s) : fSequence(s.fSequence), fStart(s.fStart),
45 fLastRun(s.fLastRun), fNumEvents(s.fNumEvents), fPeriod(s.fPeriod),
46 fNight(s.fNight), fProject(s.fProject), fSource(s.fSource),
47 fTriggerTable(s.fTriggerTable), fHvSettings(s.fHvSettings),
48 fRuns(s.fRuns), fCalRuns(s.fCalRuns), fPedRuns(s.fPedRuns),
49 fDatRuns(s.fDatRuns) { }
50
51 void Print(Option_t *o="") const;
52
53 Bool_t IsValid() const { return fSequence!=(UInt_t)-1; }
54
55 Int_t SetupPedRuns(MDirIter &iter, const char *path=0, char *id="P", Bool_t raw=kFALSE) const;
56 Int_t SetupDatRuns(MDirIter &iter, const char *path=0, char *id="D", Bool_t raw=kFALSE) const;
57 Int_t SetupAllRuns(MDirIter &iter, const char *path=0, char *id="?", Bool_t raw=kFALSE) const;
58 Int_t SetupCalRuns(MDirIter &iter, const char *path=0, char *id="C", Bool_t raw=kFALSE) const;
59
60 Int_t GetNumAllRuns() const { return fRuns.GetSize(); }
61 Int_t GetNumDatRuns() const { return fDatRuns.GetSize(); }
62 Int_t GetNumPedRuns() const { return fPedRuns.GetSize(); }
63 Int_t GetNumCalRuns() const { return fCalRuns.GetSize(); }
64
65 // Getter
66 UInt_t GetSequence() const { return fSequence; }
67 UInt_t GetLastRun() const { return fLastRun; }
68 UInt_t GetPeriod() const { return fPeriod; }
69
70 ClassDef(MSequence, 0)
71};
72
73#endif
Note: See TracBrowser for help on using the repository browser.