source: tags/Mars-V0.9/mdata/MDataArray.h

Last change on this file was 5692, checked in by tbretz, 20 years ago
*** empty log message ***
File size: 1.4 KB
Line 
1#ifndef MARS_MDataArray
2#define MARS_MDataArray
3
4/////////////////////////////////////////////////////////////////////////////
5//
6// MDataArray
7//
8/////////////////////////////////////////////////////////////////////////////
9#ifndef MARS_MParContainer
10#include "MParContainer.h"
11#endif
12
13#ifndef ROOT_TObjArray
14#include <TObjArray.h>
15#endif
16
17class TVector;
18
19class MData;
20class MParList;
21
22class MDataArray : public MParContainer
23{
24 TObjArray fList;
25
26 void StreamPrimitive(ofstream &out) const;
27
28public:
29 MDataArray(const char *name=NULL, const char *title=NULL);
30
31 void AddEntry(const TString rule);
32 void AddEntry(MData *data);
33
34 Int_t FindRule(const char *rule) const;
35
36 MData &operator[](Int_t i) const;
37 Double_t operator()(Int_t i) const;
38
39 void GetData(TVector &v) const;
40
41 void operator>>(TVector &v) const
42 {
43 GetData(v);
44 }
45
46 TString GetRule(int i) const;
47
48 Bool_t PreProcess(const MParList *plist);
49
50 TString GetDataMember() const;
51
52 void Print(Option_t *opt = "") const;
53 Bool_t AsciiWrite(ostream &out) const;
54
55 Int_t GetNumEntries() const { return fList.GetEntries(); }
56
57 void Clear(Option_t *option="") { fList.Clear(option); }
58 void Delete(Option_t *option="") { fList.Delete(option); }
59
60 void SetVariables(const TArrayD &arr);
61
62 ClassDef(MDataArray, 1) // An array of MData containers
63};
64
65#endif
Note: See TracBrowser for help on using the repository browser.