#ifndef VEGA_VConditionSet #define VEGA_VConditionSet //*-- Author : Damir Buskulic 14/12/01 #include #include "TArrayC.h" #include "TArrayD.h" #include "TObjArray.h" #include "VVirtualFrameInfoDB.h" #include "VVirtualFrameChannel.h" #include "VConditionFormula.h" using namespace std; ////////////////////////////////////////////////////////////////////////// // // // VConditionSet // // // // ABC for managing sets of conditions, i.e. conditions // // that may have overlap(s) in time // // // ////////////////////////////////////////////////////////////////////////// class VVirtualFrameInfoDB; class VVirtualFrameChannel; class VConditionFormula; class VConditionSet { protected : VVirtualFrameInfoDB* mInfoDB; // Database associated to this condition set string mCondFormulaString; // Formula applied on the conditions string mSelFormulaString; // Selection formula TObjArray* mCurConditions; // Current set of conditions TArrayC* mActiveConditions; // Active/Inactive flag for this set TArrayC* mSelectionConditions; // Conditions activated for selection TArrayD* mCurConditionStart; // Start time of the current conditions TArrayD* mCurConditionEnd; // End time of the current conditions TArrayD* mFolConditionStart; // Start time of the conditions following the current ones VConditionFormula* mCondFormula; // Formula applied on the conditions VConditionFormula* mSelFormula; // Selection formula public : VConditionSet(); VConditionSet(VVirtualFrameInfoDB* infodb, const char* condfs, const char* selfs = 0); VConditionSet(VVirtualFrameChannel* fc, const char* condfs, const char* selfs = 0); virtual ~VConditionSet(); void Build(VVirtualFrameInfoDB* infodb, const char* condfs, const char* selfs); virtual Double_t Eval(const char* formula); virtual VVirtualFrameInfoDB* GetInfoDB() {return mInfoDB;} virtual void SetActive(Int_t conditionnumber); virtual void SetSelection(Int_t conditionnumber); virtual Int_t NearestGESet(Double_t time); virtual Int_t NearestGEFormSet(Double_t time); virtual Int_t NextSet(); virtual Int_t NextFormSet(); TObjArray* GetCurConditions() {return mCurConditions;} virtual Double_t GetIntersectionStart(); virtual Double_t GetIntersectionEnd(); virtual Double_t GetIntersectSelectStart(); virtual Double_t GetIntersectSelectEnd(); virtual Double_t GetLastConditionResult(); virtual Double_t GetLastSelectionResult(); virtual const char* GetCondFormula() {return mCondFormulaString.c_str();} virtual const char* GetSelFormula() {return mSelFormulaString.c_str();} ClassDef(VConditionSet,0) // Helper for managing sets of conditions (selections) }; #endif