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

Last change on this file since 2640 was 2521, checked in by tbretz, 21 years ago
*** empty log message ***
File size: 2.1 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 MData *ParseString(TString txt, Int_t level);
47 MData *ParseDataMember(TString txt);
48
49 MDataChain(const char *rule, OperatorType_t op);
50
51public:
52 MDataChain(const char *rule=NULL, const char *name=NULL, const char *title=NULL);
53 ~MDataChain();
54
55 Double_t GetValue() const;
56 Bool_t PreProcess(const MParList *plist);
57
58 Bool_t IsValid() const { return fMember ? kTRUE : kFALSE; }
59 Bool_t IsReadyToSave() const;
60
61// void Print(Option_t *opt = "") const;
62
63 TString GetRule() const;
64 TString GetDataMember() const;
65
66 ClassDef(MDataChain, 1) // A chain/concatenation of MData objects
67};
68
69#endif
Note: See TracBrowser for help on using the repository browser.