source: trunk/MagicSoft/Mars/mdata/MDataChain.h@ 4308

Last change on this file since 4308 was 3788, checked in by tbretz, 21 years ago
*** empty log message ***
File size: 2.2 KB
Line 
1#ifndef MARS_MDataChain
2#define MARS_MDataChain
3
4/////////////////////////////////////////////////////////////////////////////
5// //
6// MDataList //
7// //
8// List of several filters //
9// //
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef MARS_MData
13#include "MData.h"
14#endif
15
16class MDataChain : public MData
17{
18private:
19 MData *fMember; // Filter
20
21 // PLEASE, always add new enums to the end of the enumeration,
22 // otherwise you would break loading old data chains...
23 typedef enum {
24 kENoop,
25 kELog, kELog2, kELog10,
26 kEAbs,
27 kESin, kECos, kETan, kESinH, kECosH, kETanH,
28 kEASin, kEACos, kEATan, kEASinH, kEACosH, kEATanH,
29 kESqrt, kESqr, kEPow10, kEExp,
30 kESgn,
31 kEPositive,
32 kENegative,
33 kEFloor, kECeil, kERound,
34 kERad2Deg, kEDeg2Rad, kERandom,
35 kERandomP, kERandomE, kERandomI, kERandomG, kERandomL,
36 kEIsNaN, kEFinite
37 } OperatorType_t;
38
39 OperatorType_t fOperatorType;
40
41 OperatorType_t ParseOperator(TString txt) const;
42
43 Int_t IsAlNum(TString txt);
44 Int_t GetBracket(TString txt, char open, char close);
45
46 void SimplifyString(TString &txt) const;
47 MData *ParseString(TString txt, Int_t level);
48 MData *ParseDataMember(TString txt);
49
50 MDataChain(const char *rule, OperatorType_t op);
51
52public:
53 MDataChain(const char *rule=NULL, const char *name=NULL, const char *title=NULL);
54 ~MDataChain();
55
56 Double_t GetValue() const;
57 Bool_t PreProcess(const MParList *plist);
58
59 Bool_t IsValid() const { return fMember ? kTRUE : kFALSE; }
60 Bool_t IsReadyToSave() const;
61
62// void Print(Option_t *opt = "") const;
63
64 TString GetRule() const;
65 TString GetDataMember() const;
66
67 void SetVariables(const TArrayD &arr);
68
69 ClassDef(MDataChain, 1) // A chain/concatenation of MData objects
70};
71
72#endif
Note: See TracBrowser for help on using the repository browser.