#ifndef VEGA_VConditionFormula #define VEGA_VConditionFormula //*-- Modified : v0.50 17/07/00 by D. Buskulic //*-- Author : Damir Buskulic 11/01/00 ////////////////////////////////////////////////////////////////////////// // // // VConditionFormula // // // // The Frame conditions formula class // // // ////////////////////////////////////////////////////////////////////////// #include "TFormula.h" #include "TString.h" #include "TObjArray.h" #include "VVirtualFrameInfoDB.h" #include "VFrCondition.h" class VVirtualFrameInfoDB; class VConditionSet; const Int_t kMAXCODES = 100; class VConditionFormula : public TFormula { private: VVirtualFrameInfoDB* mDataBase; // Pointer to parent database Short_t mCodes[kMAXCODES]; // List of condition numbers referenced in formula Int_t mNCodes; // Number of conditions referenced in formula Int_t mVarCodes[kMAXCODES];// List of variable numbers corresponding to conditions Double_t mLastResult; // Result of the last evaluation Int_t CheckStandardVar(const Text_t* name); // Checks that the name of the var. is standard public: VConditionFormula(); VConditionFormula(const char *name,const char *expression, VVirtualFrameInfoDB *db); VConditionFormula(const VConditionFormula &cformula); virtual ~VConditionFormula(); virtual void Copy(TObject &obj); virtual Int_t GetConditionNumber(Int_t code) {return mCodes[code];} virtual Int_t GetNConditions() {return mNCodes;} virtual Int_t DefinedVariable(TString &variable); // virtual Double_t EvalInstance(); virtual Double_t EvalInstance(VFrCondition** condarray, Int_t ncond); virtual Double_t EvalInstance(VConditionSet* condset); virtual Double_t EvalInstance(TObjArray* lcond); virtual Double_t GetLastResult() {return mLastResult;} virtual Int_t GetNcodes() {return mNCodes;} ClassDef(VConditionFormula,0) //The conditions formula }; #endif