otsdaq_utilities  v2_05_02_indev
VisualSupervisor.h
1 #ifndef _ots_VisualSupervisor_h
2 #define _ots_VisualSupervisor_h
3 
4 #include "otsdaq-utilities/Visualization/VisualDataManager.h"
5 #include "otsdaq/CoreSupervisors/CoreSupervisorBase.h"
6 //================ new Dario
7 #include <dirent.h>
8 #include <stdio.h>
9 #include <string.h>
10 #include <sys/types.h>
11 #include <unistd.h>
12 #include <iostream>
13 #include <map>
14 #include <sstream>
15 #include <xercesc/dom/DOM.hpp>
16 #include <xercesc/framework/LocalFileFormatTarget.hpp>
17 #include <xercesc/framework/StdOutFormatTarget.hpp>
18 #include <xercesc/util/OutOfMemoryException.hpp>
19 #include <xercesc/util/PlatformUtils.hpp>
20 #include <xercesc/util/XMLString.hpp>
21 
22 #if defined(XERCES_NEW_IOSTREAMS)
23 #include <iostream>
24 #else
25 #include <iostream.h>
26 #endif
27 
28 #define X(str) XStr(str).unicodeForm()
29 //================ new Dario
30 
31 namespace ots
32 {
33 // VisualSupervisor
34 // This class handles the web user interface to a VisualDataManager with reqgard to the
35 // web desktop Visualizer. The Visualizer can display ROOT object in real-time, as well
36 // as 2D and 3D displays of streaming data.
37 class VisualSupervisor : public CoreSupervisorBase
38 {
39  public:
40  XDAQ_INSTANTIATOR();
41 
42  VisualSupervisor(xdaq::ApplicationStub* s);
43  virtual ~VisualSupervisor(void);
44 
45  void destroy(void);
46 
47  // virtual void defaultPage (xgi::Input* in,
48  // xgi::Output* out) override; void safariDefaultPage (xgi::Input*
49  // in, xgi::Output* out) ;
50 
51  virtual void request(const std::string& requestType,
52  cgicc::Cgicc& cgiIn,
53  HttpXmlDocument& xmlOut,
54  const WebUsers::RequestUserInfo& userInfo) override;
55 
56  virtual void setSupervisorPropertyDefaults(void) override;
57  virtual void forceSupervisorPropertyValues(void) override; // override to force
58  // supervisor property
59  // values (and ignore user
60  // settings)
61 
62  // RAR commented out below.. better/safer handling (of errors) done by
63  // CoreSupervisorBase
64 
65  // void stateRunning (toolbox::fsm::FiniteStateMachine&
66  // fsm)
67  // ;
68 
69  virtual void transitionConfiguring (toolbox::Event::Reference e) override;
70  virtual void transitionHalting (toolbox::Event::Reference e) override;
71  // virtual void transitionInitializing (toolbox::Event::Reference e) ;
72  // virtual void transitionPausing (toolbox::Event::Reference
73  // e) ; virtual void transitionResuming (toolbox::Event::Reference e) ;
74  // virtual void transitionStarting (toolbox::Event::Reference e) ; virtual
75  // void transitionStopping (toolbox::Event::Reference e) ;
76  // virtual void enteringError (toolbox::Event::Reference
77  // e)
78  // ;
79 
80  private:
81  // void binaryBufferToHexString (char *buff, unsigned int len,
82  // std::string& dest);
83 
84  VisualDataManager* theDataManager_;
85  unsigned int loadedRunNumber_;
86 };
87 }
88 
89 #endif
virtual void request(const std::string &requestType, cgicc::Cgicc &cgiIn, HttpXmlDocument &xmlOut, const WebUsers::RequestUserInfo &userInfo) override