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 |
|
---|
12 | class MDirIter;
|
---|
13 |
|
---|
14 | class MSequence : public MParContainer
|
---|
15 | {
|
---|
16 | private:
|
---|
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 |
|
---|
40 | public:
|
---|
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 | const UInt_t GetFirstRun() const { return fRuns[0]; }
|
---|
71 | const UInt_t GetFirstCalRun() const { return fCalRuns[0]; }
|
---|
72 | const UInt_t GetLastCalRun() const { return fCalRuns[fCalRuns.GetSize()-1]; }
|
---|
73 | const TArrayI &GetPedRuns() const { return fPedRuns; }
|
---|
74 | const TArrayI &GetCalRuns() const { return fCalRuns; }
|
---|
75 | const TArrayI &GetDatRuns() const { return fDatRuns; }
|
---|
76 |
|
---|
77 | const MTime &GetStart() const { return fStart; }
|
---|
78 | const MTime &GetNight() const { return fNight; }
|
---|
79 | const TString &GetSource() const { return fSource; }
|
---|
80 |
|
---|
81 | ClassDef(MSequence, 0)
|
---|
82 | };
|
---|
83 |
|
---|
84 | #endif
|
---|