1 | #ifndef MARS_MDataSet
|
---|
2 | #define MARS_MDataSet
|
---|
3 |
|
---|
4 | #ifndef MARS_MParContainer
|
---|
5 | #include "MParContainer.h"
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | #ifndef ROOT_TArrayI
|
---|
9 | #include <TArrayI.h>
|
---|
10 | #endif
|
---|
11 |
|
---|
12 | class MRead;
|
---|
13 | class MPointingPos;
|
---|
14 |
|
---|
15 | class MDataSet : public MParContainer
|
---|
16 | {
|
---|
17 | private:
|
---|
18 | UInt_t fNumAnalysis; // Analysis number (artificial)
|
---|
19 |
|
---|
20 | TArrayI fNumSequencesOn; // number of on-sequences
|
---|
21 | TArrayI fNumSequencesOff; // number of off-sequences
|
---|
22 |
|
---|
23 | TList fSequencesOn; // list of names and paths of on-sequences
|
---|
24 | TList fSequencesOff; // list of names and paths of off-sequences
|
---|
25 |
|
---|
26 |
|
---|
27 | TString fNameSource; // Name of source from catalog
|
---|
28 | TString fCatalog; // edb catalog (magic_favourites.edb)
|
---|
29 |
|
---|
30 |
|
---|
31 | void Split(TString &runs, TArrayI &data) const;
|
---|
32 | void ResolveSequences(TEnv &env, const TArrayI &num, TList &list) const;
|
---|
33 | static void PrintFile(const TObject &obj);
|
---|
34 |
|
---|
35 | public:
|
---|
36 | MDataSet() : fNumAnalysis((UInt_t)-1) { }
|
---|
37 | MDataSet(const char *fname);
|
---|
38 |
|
---|
39 | // Getter
|
---|
40 | Bool_t IsValid() const { return fNumAnalysis!=(UInt_t)-1; }
|
---|
41 |
|
---|
42 | UInt_t GetNumSequencesOn() const { return fNumSequencesOn.GetSize(); }
|
---|
43 | UInt_t GetNumSequencesOff() const { return fNumSequencesOff.GetSize(); }
|
---|
44 |
|
---|
45 | Bool_t HasOffSequences() const { return GetNumSequencesOff()>0; }
|
---|
46 |
|
---|
47 | UInt_t GetNumAnalysis() const { return fNumAnalysis; }
|
---|
48 | void SetNumAnalysis(UInt_t num) { fNumAnalysis=num; }
|
---|
49 |
|
---|
50 | Bool_t HasSource() const { return !fNameSource.IsNull(); }
|
---|
51 | Bool_t GetSourcePos(MPointingPos &pos) const;
|
---|
52 |
|
---|
53 | // Setter
|
---|
54 | static Bool_t AddSequencesToList(const TList &list, MRead &read, char *id="I", Bool_t raw=kFALSE);
|
---|
55 |
|
---|
56 | Bool_t AddFiles(MRead &read, char *id="I", Bool_t raw=kFALSE) const;
|
---|
57 | Bool_t AddFilesOn(MRead &read, char *id="I", Bool_t raw=kFALSE) const;
|
---|
58 | Bool_t AddFilesOff(MRead &read, char *id="I", Bool_t raw=kFALSE) const;
|
---|
59 |
|
---|
60 | // TObject
|
---|
61 | void Print(Option_t *o="") const;
|
---|
62 |
|
---|
63 | ClassDef(MDataSet, 0)
|
---|
64 | };
|
---|
65 |
|
---|
66 | #endif
|
---|