source: trunk/MagicSoft/Mars/mjobs/MDataSet.h@ 6964

Last change on this file since 6964 was 6958, checked in by tbretz, 20 years ago
*** empty log message ***
File size: 2.1 KB
Line 
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
12class TChain;
13
14class MRead;
15class MDirIter;
16class MPointingPos;
17
18class MDataSet : public MParContainer
19{
20private:
21 UInt_t fNumAnalysis; // Analysis number (artificial)
22
23 TArrayI fNumSequencesOn; // number of on-sequences
24 TArrayI fNumSequencesOff; // number of off-sequences
25
26 TList fSequencesOn; // list of names and paths of on-sequences
27 TList fSequencesOff; // list of names and paths of off-sequences
28
29 TString fNameSource; // Name of source from catalog
30 TString fCatalog; // edb catalog (magic_favourites.edb)
31
32 Bool_t fIsWobbleMode; // Wobble Mode for this dataset?
33
34 void Split(TString &runs, TArrayI &data) const;
35 void ResolveSequences(TEnv &env, const TArrayI &num, TList &list) const;
36 static void PrintFile(const TObject &obj);
37
38public:
39 MDataSet() : fNumAnalysis((UInt_t)-1) { }
40 MDataSet(const char *fname);
41
42 // Getter
43 Bool_t IsValid() const { return fNumAnalysis!=(UInt_t)-1; }
44
45 UInt_t GetNumSequencesOn() const { return fNumSequencesOn.GetSize(); }
46 UInt_t GetNumSequencesOff() const { return fNumSequencesOff.GetSize(); }
47
48 Bool_t HasOffSequences() const { return GetNumSequencesOff()>0; }
49
50 UInt_t GetNumAnalysis() const { return fNumAnalysis; }
51 void SetNumAnalysis(UInt_t num) { fNumAnalysis=num; }
52
53 Bool_t HasSource() const { return !fNameSource.IsNull(); }
54 Bool_t GetSourcePos(MPointingPos &pos) const;
55
56 Bool_t IsWobbleMode() const { return fIsWobbleMode; }
57
58 // Setter
59 static Bool_t AddSequencesFromList(const TList &list, MDirIter &files);
60 static Int_t AddFilesToChain(MDirIter &files, TChain &chain);
61
62 Bool_t AddFiles(MRead &read) const;
63 Bool_t AddFilesOn(MRead &read) const;
64 Bool_t AddFilesOff(MRead &read) const;
65
66 Bool_t AddFiles(TChain &read) const;
67 Bool_t AddFilesOn(TChain &read) const;
68 Bool_t AddFilesOff(TChain &read) const;
69
70 // TObject
71 void Print(Option_t *o="") const;
72
73 ClassDef(MDataSet, 0)
74};
75
76#endif
Note: See TracBrowser for help on using the repository browser.