![]() |
![]() |
#include <VisFramework/VisWebFrameworkBase/interface/VisWebFrameworkService.h>
Public Member Functions | |
virtual void | doNextEvent (IgState *state) |
virtual void | doReconfigure (IgState *state, const std::string ¶meterSet) |
virtual void | nextEvent (Arguments *args) |
virtual void | reconfigure (Arguments *args) |
VisWebFrameworkService (IgState *state) | |
Static Public Member Functions | |
static const char * | catalogLabel (void) |
Protected Member Functions | |
virtual void | doInitSession (IgState *state) |
void | onUnhandledException (void) |
Definition at line 18 of file VisWebFrameworkService.h.
VisWebFrameworkService::VisWebFrameworkService | ( | IgState * | state | ) |
Definition at line 33 of file VisWebFrameworkService.cc.
References lat::CreateCallback(), nextEvent(), and IgWebService::registerCallback().
00034 : IgWebService (state) 00035 { 00036 registerCallback ("nextEvent", lat::CreateCallback (this, &VisWebFrameworkService::nextEvent)); 00037 registerCallback ("reconfigure", lat::CreateCallback (this, &VisWebFrameworkService::nextEvent)); 00038 }
const char * VisWebFrameworkService::catalogLabel | ( | void | ) | [static] |
Definition at line 41 of file VisWebFrameworkService.cc.
References ASSERT, TestMuL1L2Filter_cff::cerr, lat::CreateCallback(), dd, lat::endl(), DBSPlugin::get(), IgEnvsElement::getEnv(), VisEventProcessorService::initEventProcessor(), onUnhandledException(), VisEventProcessorService::onUnhandledException(), IgDocumentData::root(), and VisAppearanceService::setConfiguration().
00042 { 00043 VisEventProcessorService *eventProcessorService 00044 = VisEventProcessorService::get (state); 00045 00046 VisAppearanceService *appearService = VisAppearanceService::get (state); 00047 if (! appearService) 00048 { 00049 appearService = new VisAppearanceService (state); 00050 ASSERT (appearService); 00051 00052 IgEnvsElement *envs = IgEnvsElement::get (state); 00053 std::string configString; 00054 if (envs->getEnv ("IGUANA_CONFIG", configString)) 00055 { 00056 appearService->setConfiguration (configString); 00057 } 00058 } 00059 00060 if (!eventProcessorService) 00061 { 00062 std::cerr << "Event processor initialised" << std::endl; 00063 std::cerr << "on state "<< state << std::endl; 00064 00065 eventProcessorService = new VisEventProcessorService (state); 00066 eventProcessorService 00067 ->onUnhandledException (lat::CreateCallback (this, 00068 &VisWebFrameworkService::onUnhandledException)); 00069 00070 eventProcessorService->initEventProcessor (); 00071 00072 IgDocumentData *dd = IgDocumentData::get (state); 00073 if (! dd) 00074 { 00075 dd = new IgDocumentData (state, 0); 00076 } 00077 dd->root("", true); 00078 00079 // FIXME: this should move to IgWebStudio initialisation... 00080 IgBrowserManager *manager = IgBrowserManager::get (state); 00081 if (! manager) 00082 { 00083 manager = new IgBrowserManager (state); 00084 } 00085 00086 // FIXME: also this should go to WebStudio, probably... 00087 IgPluginLoader *loader = IgPluginLoader::get (state); 00088 if (! loader) 00089 { 00090 loader = new IgPluginLoader (state); 00091 } 00092 } 00093 }
Definition at line 131 of file VisWebFrameworkService.cc.
References TestMuL1L2Filter_cff::cerr, lat::endl(), DBSPlugin::get(), IgRepSet::invalidate(), proc, pydbsAccessor::root, and IgTwig::SELF_MASK.
Referenced by nextEvent().
00132 { 00133 IgTwig *root = IgDocumentData::get (state)->root (); 00134 IgRepSet::invalidate (root, IgTwig::SELF_MASK); 00135 00136 try 00137 { 00138 if (VisEventProcessorService *eventProcessorService 00139 = VisEventProcessorService::get (state)) 00140 { 00141 (*eventProcessorService)->run (1); 00142 } 00143 } 00144 catch (...) 00145 { 00146 std::cerr << "Some exception occurred... But I dont care." << std::endl; 00147 } 00148 00149 if (VisQueueProcessor *proc = VisQueueProcessor::get (state)) 00150 proc->scheduleNextEvent (); 00151 }
void VisWebFrameworkService::doReconfigure | ( | IgState * | state, | |
const std::string & | parameterSet | |||
) | [virtual] |
Definition at line 112 of file VisWebFrameworkService.cc.
References ASSERT, DBSPlugin::get(), VisEventProcessorService::reInitEventProcessor(), and parseConfig::service.
Referenced by reconfigure().
00114 { 00115 VisEventProcessorService *service = VisEventProcessorService::get (state); 00116 ASSERT (service); 00117 00118 service->reInitEventProcessor (parameterSet); 00119 }
Definition at line 122 of file VisWebFrameworkService.cc.
References doNextEvent(), IgWebService::Arguments::outputDevice(), IgWebService::sendDone(), IgWebService::state(), and IgWebService::Arguments::state().
Referenced by VisWebFrameworkService().
00123 { 00124 IgState *state = arguments->state (); 00125 QIODevice *outputDevice = arguments->outputDevice (); 00126 this->doNextEvent (state); 00127 this->sendDone (outputDevice); 00128 }
Definition at line 154 of file VisWebFrameworkService.cc.
References TestMuL1L2Filter_cff::cerr, and lat::endl().
Referenced by doInitSession().
Definition at line 96 of file VisWebFrameworkService.cc.
References IgWebService::Arguments::args(), doReconfigure(), IgWebService::Arguments::outputDevice(), IgWebService::sendError(), IgWebService::state(), and IgWebService::Arguments::state().
00097 { 00098 IgState *state = arguments->state (); 00099 QIODevice *outputDevice = arguments->outputDevice (); 00100 ArgumentsMap &args = *(arguments->args ()); 00101 00102 if (args.find ("parameterSet") == args.end ()) 00103 { 00104 this->sendError (outputDevice); 00105 return; 00106 } 00107 00108 this->doReconfigure (state, args["parameterSet"]); 00109 }