00001 #ifndef selectionManager_H 00002 #define selectionManager_H 00003 00004 #include "Event/cutVI.h" 00005 #include "Event/cutSelectionTask.h" 00006 00007 #include "Event/serviceI.h" 00008 #include "Event/serverVI.h" 00009 00010 //--------------------- 00012 00054 //---------------------------------------- 00055 // JA hernando Santa Cruz, CA, 052600 00056 //---------------------------------------- 00057 00058 //######################################## 00059 class selectionManager : public serviceI 00060 //######################################## 00061 { 00062 public: 00063 00064 00066 selectionManager(); 00068 virtual ~selectionManager(); 00069 00071 static selectionManager* instance() {return m_instance;} 00072 00074 bool apply(std::string name) {return getCut(name)->apply();} 00075 00077 cutVI* getCut(std::string name) const; 00079 void addCut(std::string name, cutVI* cut); 00080 00082 cutComposite* getCutComposite(std::string name) {return getCutSelectionTask(name);} 00083 00085 cutSelectionTask* getCutSelectionTask(std::string name) const; 00087 void addCutSelectionTask(std::string name, cutSelectionTask* sel); 00088 00090 virtual void writeOut() const; 00091 00092 protected: 00093 00095 virtual void defineOption(); 00096 00098 virtual void setOption(std::string selectionName, std::string cutName); //overwriten 00099 00100 private: 00101 00103 static selectionManager* m_instance; 00104 00106 serverVI<cutVI>* m_serverCut; 00107 00109 serverVI<cutSelectionTask>* m_serverSelection; 00110 00111 private: 00112 00114 std::string m_selName; 00115 }; 00116 #endif