00001 #ifndef _ots_AllSupervisorInfo_h
00002 #define _ots_AllSupervisorInfo_h
00003
00004 #include <map>
00005 #include <vector>
00006
00007 #include "otsdaq-core/SupervisorInfo/SupervisorInfo.h"
00008 #include "otsdaq-core/SupervisorInfo/SupervisorDescriptorInfoBase.h"
00009
00010 namespace ots
00011 {
00012
00014 typedef std::map<unsigned int, const SupervisorInfo&> SupervisorInfoMap;
00015
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 class AllSupervisorInfo : public SupervisorDescriptorInfoBase
00030 {
00031
00032 public:
00033 AllSupervisorInfo (void);
00034 AllSupervisorInfo (xdaq::ApplicationContext* applicationContext);
00035 ~AllSupervisorInfo (void);
00036
00037 void init (xdaq::ApplicationContext* applicationContext);
00038 void destroy (void);
00039
00040
00041 bool isWizardMode (void) const { return theWizardInfo_?true:false; }
00042
00043
00044
00045 void setSupervisorStatus (xdaq::Application* app, const std::string& status);
00046 void setSupervisorStatus (const SupervisorInfo& appInfo, const std::string& status);
00047 void setSupervisorStatus (const unsigned int& id, const std::string& status);
00048
00049
00050
00051 const std::map<unsigned int, SupervisorInfo>& getAllSupervisorInfo (void) const { return allSupervisorInfo_; }
00052 const SupervisorInfoMap& getAllFETypeSupervisorInfo (void) const { return allFETypeSupervisorInfo_; }
00053 const SupervisorInfoMap& getAllDMTypeSupervisorInfo (void) const { return allDMTypeSupervisorInfo_; }
00054 const SupervisorInfoMap& getAllLogbookTypeSupervisorInfo (void) const { return allLogbookTypeSupervisorInfo_; }
00055
00056 const SupervisorInfo& getSupervisorInfo (xdaq::Application* app) const;
00057 const SupervisorInfo& getGatewayInfo (void) const;
00058 XDAQ_CONST_CALL xdaq::ApplicationDescriptor* getGatewayDescriptor (void) const;
00059 const SupervisorInfo& getWizardInfo (void) const;
00060 XDAQ_CONST_CALL xdaq::ApplicationDescriptor* getWizardDescriptor (void) const;
00061
00062 std::vector<const SupervisorInfo*> getOrderedSupervisorDescriptors (const std::string& stateMachineCommand) const;
00063
00064 private:
00065
00066 SupervisorInfo* theSupervisorInfo_;
00067 SupervisorInfo* theWizardInfo_;
00068
00069
00070 std::map<unsigned int, SupervisorInfo> allSupervisorInfo_;
00071 SupervisorInfoMap allFETypeSupervisorInfo_, allDMTypeSupervisorInfo_, allLogbookTypeSupervisorInfo_;
00072
00073
00074 };
00075
00076 }
00077
00078 #endif