#include <VisFramework/VisFrameworkBase/interface/VisEventMenu.h>
Definition at line 23 of file VisEventMenu.h.
VisEventMenu::VisEventMenu | ( | IgState * | state | ) |
Initialise the visual controls for the event.
At the moment only registers a couple of menu items for walking the event collection. In future this should create a control panel for the event and event collection, the menu items and possibly tool bar buttons.
Definition at line 61 of file VisEventMenu.cc.
References ASSERT, autoEvents(), autoPrint(), HLT_VtxMuL3::connect, event(), DBSPlugin::get(), IgQtAppMenuService::index(), initEventProcessor(), l1TriggerDialog(), m_auto, m_autoPrint, m_autoStart, m_delay, m_print, m_printDelay, m_printTimer, m_state, m_timer, MENU_EVENT_AUTO, MENU_EVENT_AUTO_PRINT, MENU_EVENT_L1TRIGGER, MENU_EVENT_NEXT, MENU_EVENT_NUM, MENU_EVENT_PREVIOUS, MENU_EVENT_REWIND, MENU_EVENT_SKIP, MENU_ID_EVENT, MENU_INIT_APP, MENU_RE_INIT_APP, nextEvent(), previousEvent(), print(), processEventDialog(), processOneEvent(), IgState::put(), reInitEventProcessor(), rewind(), skipEventDialog(), lhef::timeout(), and VisActiveConfigurable< T >::value().
00062 : m_state (state), 00063 m_timer (new QTimer (this)), 00064 m_printTimer (new QTimer (this)), 00065 m_auto (false), 00066 m_print (false), 00067 m_autoPrint (state, lat::CreateCallback (this, &VisEventMenu::autoChanged)), 00068 m_autoStart (state, lat::CreateCallback (this, &VisEventMenu::autoChanged)), 00069 m_delay (state, lat::CreateCallback (this, &VisEventMenu::delayChanged)), 00070 m_printDelay (state, lat::CreateCallback (this, &VisEventMenu::delayChanged)), 00071 m_done (true) 00072 { 00073 ASSERT (m_state); 00074 m_state->put (s_key, this); 00075 00076 // FIXME: Reuse the IgObjectMenu stuff! 00077 ASSERT (IgQtAppMenuService::get (m_state)); 00078 00079 QMenuBar *menu = IgQtAppMenuService::get (m_state)->menuBar (); 00080 ASSERT (menu); 00081 00082 QPopupMenu *event = new QPopupMenu (menu); 00083 event->setCaption ("Event"); 00084 event->insertTearOffHandle (); 00085 00086 ASSERT (menu); 00087 00088 event->insertItem ("&Init Event Processor", 00089 this, 00090 SLOT(initEventProcessor ()), 0, 00091 MENU_INIT_APP, IgQtAppMenuService::index 00092 (event, MENU_INIT_APP)); 00093 00094 event->insertItem ("&ReInit Event Processor", 00095 this, 00096 SLOT(reInitEventProcessor ()), 0, 00097 MENU_RE_INIT_APP, IgQtAppMenuService::index 00098 (event, MENU_RE_INIT_APP)); 00099 00100 event->insertItem ("&Next Event", 00101 this, 00102 SLOT(nextEvent ()), Qt::CTRL+Qt::Key_N, 00103 MENU_EVENT_NEXT, IgQtAppMenuService::index 00104 (event, MENU_EVENT_NEXT)); 00105 00106 event->insertItem ("&Previous Event", 00107 this, 00108 SLOT(previousEvent ()), Qt::CTRL+Qt::Key_P, 00109 MENU_EVENT_PREVIOUS, IgQtAppMenuService::index 00110 (event, MENU_EVENT_PREVIOUS)); 00111 00112 event->insertItem ("&Auto Events", 00113 this, 00114 SLOT(autoEvents ()), Qt::CTRL+Qt::Key_A, 00115 MENU_EVENT_AUTO, IgQtAppMenuService::index 00116 (event, MENU_EVENT_AUTO)); 00117 00118 event->insertItem ("&Goto Event...", 00119 this, 00120 SLOT(processEventDialog ()), Qt::CTRL+Qt::Key_G, 00121 MENU_EVENT_NUM, IgQtAppMenuService::index 00122 (event, MENU_EVENT_NUM)); 00123 00124 event->insertItem ("&Rewind", 00125 this, 00126 SLOT(rewind ()), Qt::CTRL+Qt::Key_R, 00127 MENU_EVENT_REWIND, IgQtAppMenuService::index 00128 (event, MENU_EVENT_REWIND)); 00129 00130 event->insertItem ("&Skip...", 00131 this, 00132 SLOT(skipEventDialog ()), 0, 00133 MENU_EVENT_SKIP, IgQtAppMenuService::index 00134 (event, MENU_EVENT_SKIP)); 00135 00136 event->insertSeparator (); 00137 00138 event->insertItem ("&L1 Filter...", 00139 this, 00140 SLOT(l1TriggerDialog ()), 0, 00141 MENU_EVENT_L1TRIGGER, IgQtAppMenuService::index 00142 (event, MENU_EVENT_L1TRIGGER)); 00143 00144 event->insertSeparator (); 00145 00146 event->insertItem ("Auto Print", 00147 this, 00148 SLOT(autoPrint ()), 0, 00149 MENU_EVENT_AUTO_PRINT, IgQtAppMenuService::index 00150 (event, MENU_EVENT_AUTO_PRINT)); 00151 00152 menu->insertItem ("&Event", event, MENU_ID_EVENT, 00153 IgQtAppMenuService::index (menu, MENU_ID_EVENT)); 00154 00155 // Disable the auto-events as it isn't implemented yet. Note that 00156 // this object gets created in the event processing thread so we 00157 // more or less know that we have, or are about to have, an event. 00158 // So there is little point in disabling the menu item. (FIXME: 00159 // Still need to disable it between events!) 00160 // 00161 // FIXME: Re-initialization of the event processor sort of works: 00162 // we can use it for dynamic twigs. The ones which were loaded 00163 // as the data proxies still have problems: connection with the 00164 // signal is lost somehow. 00165 menu->setItemEnabled (MENU_INIT_APP, false); 00166 menu->setItemEnabled (MENU_RE_INIT_APP, false); 00167 menu->setItemEnabled (MENU_EVENT_NEXT, true); 00168 00169 // FIXME: Previous event can be retrieved from the PoolSource 00170 // and yet to be tested with other sources. 00171 // For online we may want to write our own source to keep a few 00172 // events for that perpose. 00173 menu->setItemEnabled (MENU_EVENT_PREVIOUS, true); 00174 menu->setItemEnabled (MENU_EVENT_AUTO, true); 00175 menu->setItemChecked (MENU_EVENT_AUTO, m_autoStart.value ()); 00176 menu->setItemEnabled (MENU_EVENT_NUM, true); 00177 menu->setItemEnabled (MENU_EVENT_REWIND, true); 00178 menu->setItemChecked (MENU_EVENT_AUTO_PRINT, m_autoPrint.value ()); 00179 00180 if (m_autoStart.value ()) 00181 { 00182 m_auto = true; 00183 connect (m_timer, SIGNAL (timeout ()), SLOT (processOneEvent ())); 00184 m_timer->start (m_delay.value (), false); 00185 } 00186 if (m_autoPrint.value ()) 00187 { 00188 m_print = true; 00189 connect (m_printTimer, SIGNAL (timeout ()), SLOT (print ())); 00190 m_printTimer->start (m_printDelay.value (), false); 00191 } 00192 }
VisEventMenu::~VisEventMenu | ( | void | ) |
Destruct and deregister the state element.
Definition at line 203 of file VisEventMenu.cc.
References ASSERT, IgState::detach(), and m_state.
00204 { 00205 // FIXME: Clear the menu? Or did Qt already take care of that? 00206 // What if we get deleted before Qt GUI dies? Do our slots get 00207 // deregistered automatically? 00208 ASSERT (m_state); 00209 m_state->detach (s_key); 00210 }
Handle the "Auto Events" action.
See old IgVis implementation on what this should do: tick/untick the menu item. If ticked, schedule a QTimer to automatically do a next event every second or so. If unticked, kill the timer.
Definition at line 424 of file VisEventMenu.cc.
References arg, IgArgsElement::argv(), ASSERT, HLT_VtxMuL3::connect, hlt_scaler_cfg::critical, e, exception, lat::Error::explainSelf(), DBSPlugin::get(), m_auto, m_delay, m_state, m_timer, MENU_EVENT_AUTO, processOneEvent(), lhef::timeout(), and VisActiveConfigurable< T >::value().
Referenced by VisEventMenu().
00425 { 00426 // FIXME: remodel this without knowing about animators -- some 00427 // central event trigger mechanism and a custom animator that 00428 // knows about that? don't want to have 3d browser know about 00429 // events or us to know about 3d -- custom animator sounds best 00430 // but need to teach 3d browser about extensions like that... 00431 // on creation of this object should somehow register it, but 00432 // again without dependence on inventor -- really need to sort 00433 // out the requirements here! 00434 // 00435 // -- flip the menu item tick on autoevents 00436 // -- set autoevent handling based on the new value 00437 // -- on: 00438 // -- get current animator 00439 // -- connect its "ready for new event" to "next event" 00440 // -- connect its "axis reset" to "print by axis" 00441 // -- activate the animator 00442 // -- off: 00443 // -- get the current animator 00444 // -- turn it off 00445 // -- disconnect the "ready for new event" and "axis reset" 00446 00447 // FIXME: similar auto-print menu -- need somehow automatic actions 00448 // for both: automatically print event once it has been received 00449 // *and* all reps have updated themselves (so the scene is right!) 00450 // 00451 // thusly, need a) notification scheme on events (and possibly other 00452 // types of occurances?) that b) can be hooked up with automatic 00453 // printer, animator and next-event-stepper -- all in synchronised 00454 // fashion so that they execute in a sensible order! 00455 00456 IgArgsElement *args = IgArgsElement::get (m_state); 00457 00458 try 00459 { 00460 IgQtLock (); 00461 00462 m_auto ? m_auto = false : m_auto = true; 00463 00464 QMenuBar *menu = IgQtAppMenuService::get (m_state)->menuBar (); 00465 ASSERT (menu); 00466 menu->setItemChecked (MENU_EVENT_AUTO, m_auto); 00467 00468 std::string timeString; 00469 00470 if (m_auto) 00471 { 00472 connect (m_timer, SIGNAL (timeout ()), SLOT (processOneEvent ())); 00473 m_timer->start (m_delay.value (), false); // set 5 seconds apart 00474 } 00475 else 00476 { 00477 m_timer->stop (); 00478 m_timer->disconnect (); 00479 } 00480 } 00481 catch (lat::Error& e) 00482 { 00483 QMessageBox::critical (0, "IGUANA", QString ("<p>Exception caught in %1:</p>" 00484 "<p>%2</p>").arg (args->argv () [0]).arg (e.explainSelf ())); 00485 } 00486 catch (std::exception& e) 00487 { 00488 QMessageBox::critical (0, "IGUANA", QString ("<p>Standard library exception caught in %1:</p>" 00489 "<p>%2</p>").arg (args->argv () [0]).arg (e.what ())); 00490 } 00491 catch (...) 00492 { 00493 QMessageBox::critical (0, "IGUANA", QString ("<p>Unknown exception caught in %1</p>") 00494 .arg (args->argv () [0])); 00495 } 00496 }
Definition at line 777 of file VisEventMenu.cc.
References arg, IgArgsElement::argv(), ASSERT, HLT_VtxMuL3::connect, hlt_scaler_cfg::critical, e, exception, lat::Error::explainSelf(), DBSPlugin::get(), m_print, m_printDelay, m_printTimer, m_state, MENU_EVENT_AUTO_PRINT, print(), lhef::timeout(), and VisActiveConfigurable< T >::value().
Referenced by VisEventMenu().
00778 { 00779 IgArgsElement *args = IgArgsElement::get (m_state); 00780 00781 try 00782 { 00783 IgQtLock (); 00784 00785 m_print ? m_print = false : m_print = true; 00786 00787 QMenuBar *menu = IgQtAppMenuService::get (m_state)->menuBar (); 00788 ASSERT (menu); 00789 menu->setItemChecked (MENU_EVENT_AUTO_PRINT, m_print); 00790 00791 if (m_print) 00792 { 00793 connect (m_printTimer, SIGNAL (timeout ()), SLOT (print ())); 00794 m_printTimer->start (m_printDelay.value (), false); 00795 } 00796 else 00797 { 00798 m_printTimer->stop (); 00799 m_printTimer->disconnect (); 00800 } 00801 } 00802 catch (lat::Error& e) 00803 { 00804 QMessageBox::critical (0, "IGUANA", QString ("<p>Exception caught in %1:</p>" 00805 "<p>%2</p>").arg (args->argv () [0]).arg (e.explainSelf ())); 00806 } 00807 catch (std::exception& e) 00808 { 00809 QMessageBox::critical (0, "IGUANA", QString ("<p>Standard library exception caught in %1:</p>" 00810 "<p>%2</p>").arg (args->argv () [0]).arg (e.what ())); 00811 } 00812 catch (...) 00813 { 00814 QMessageBox::critical (0, "IGUANA", QString ("<p>Unknown exception caught in %1</p>") 00815 .arg (args->argv () [0])); 00816 } 00817 }
Definition at line 565 of file VisEventMenu.cc.
References ASSERT, DBSPlugin::get(), m_auto, m_state, m_timer, and MENU_EVENT_AUTO.
Referenced by processOneEvent().
00566 { 00567 IgQtLock (); 00568 00569 if (m_timer->isActive ()) 00570 { 00571 m_auto ? m_auto = false : m_auto = true; 00572 00573 QMenuBar *menu = IgQtAppMenuService::get (m_state)->menuBar (); 00574 ASSERT (menu); 00575 menu->setItemChecked (MENU_EVENT_AUTO, m_auto); 00576 00577 m_timer->stop (); 00578 m_timer->disconnect (); 00579 } 00580 }
VisEventMenu::IG_DECLARE_STATE_ELEMENT | ( | VisEventMenu | ) | [private] |
Definition at line 213 of file VisEventMenu.cc.
References arg, IgArgsElement::argv(), ASSERT, HLT_VtxMuL3::connect, hlt_scaler_cfg::critical, e, exception, lat::Error::explainSelf(), FALSE, DBSPlugin::get(), m_state, IgQtAppStatusBarService::setMessage(), and lhef::timeout().
Referenced by VisEventMenu().
00214 { 00215 IgArgsElement *args = IgArgsElement::get (m_state); 00216 00217 try 00218 { 00219 IgQtLock (); 00220 00221 QApplication::setOverrideCursor (Qt::waitCursor); 00222 IgQtAppStatusBarService *sbar = IgQtAppStatusBarService::get (m_state); 00223 ASSERT (sbar); 00224 sbar->setMessage (QString ("Start Event Processor initialization...")); 00225 00226 QTimer *timer = new QTimer; 00227 connect (timer, SIGNAL (timeout ()), qApp, SLOT (flushX ())); 00228 timer->start (0, FALSE); 00229 00230 if (VisEventProcessorService *procService = VisEventProcessorService::get (m_state)) 00231 { 00232 sbar->setMessage (QString ("Start begin job...")); 00233 (*procService)->beginJob (); 00234 sbar->setMessage (QString ("Finished begin job.")); 00235 (*procService).on (); 00236 00237 QApplication::restoreOverrideCursor (); 00238 sbar->setMessage (QString ("Event Processor is initialized.")); 00239 } 00240 else 00241 { 00242 QApplication::restoreOverrideCursor (); 00243 sbar->setMessage (QString ("Event Processor failed to initialize.")); 00244 } 00245 timer->stop (); 00246 delete timer; 00247 } 00248 catch (lat::Error& e) 00249 { 00250 IgQtLock (); 00251 00252 QMessageBox::critical (0, "IGUANA", QString ("<p>Exception caught in %1:</p>" 00253 "<p>%2</p>").arg (args->argv () [0]).arg (e.explainSelf ())); 00254 } 00255 catch (std::exception& e) 00256 { 00257 IgQtLock (); 00258 00259 QMessageBox::critical (0, "IGUANA", QString ("<p>Standard library exception caught in %1:</p>" 00260 "<p>%2</p>").arg (args->argv () [0]).arg (e.what ())); 00261 } 00262 catch (...) 00263 { 00264 IgQtLock (); 00265 00266 QMessageBox::critical (0, "IGUANA", QString ("<p>Unknown exception caught in %1</p>") 00267 .arg (args->argv () [0])); 00268 } 00269 }
Definition at line 728 of file VisEventMenu.cc.
References DBSPlugin::get(), getDQMSummary::key, VisL1TriggerMenu::listView, m_state, GenMuonPlsPt100GeV_cfg::maxEvents, name, processOneEvent(), s, and split.
Referenced by VisEventMenu().
00729 { 00730 VisL1TriggerMenu *dialog = new VisL1TriggerMenu (); 00731 00732 if (VisL1FilterService *trgService = VisL1FilterService::get (m_state)) 00733 { 00734 const VisL1TriggerMap amap = trgService->algoMap (); 00735 // QCheckListItem *topItem = new QCheckListItem (dialog->listView, "Name", 00736 // "Bit"); 00737 for (VisL1TriggerMap::const_iterator mit = amap.begin(), mitEnd = amap.end(); mit != mitEnd; ++mit) 00738 { 00739 std::string name = mit->first; 00740 std::string key = mit->second; 00741 QString s = (name); 00742 QStringList snames = QStringList::split (": ", s); 00743 00744 // QCheckListItem *listItem = new QCheckListItem (dialog->listView, QString (name).section (": ", 1, 1), 00745 // QString (name).left (QString (name).find (":"))); 00746 00747 // std::cout << "name: " << name << ", key: " << key << std::endl; 00748 // std::cout << "Bit: " << snames [0] << ", Name: " << snames [1] << std::endl; 00749 00750 QListViewItem *listItem = new QListViewItem (dialog->listView, snames [1], 00751 snames [0], key); 00752 listItem->renameEnabled (2); 00753 } 00754 } 00755 00756 dialog->setModal (true); 00757 dialog->show (); 00758 00759 int nEvents = 0; 00760 int maxEvents = 100; 00761 00762 if (dialog->exec () == QDialog::Accepted) 00763 { 00764 if (VisL1FilterService *trgService = VisL1FilterService::get (m_state)) 00765 { 00766 while (! (trgService->filter ()) || nEvents++ < maxEvents) 00767 { 00768 processOneEvent (); 00769 } 00770 } 00771 } 00772 00773 delete dialog; 00774 }
Handle the "Next Event" action.
Schedules an event-thread action for VisQueueProcessor to return for advance to the next event -- once all already-registered actions have executed.
Definition at line 346 of file VisEventMenu.cc.
References arg, IgArgsElement::argv(), hlt_scaler_cfg::critical, e, exception, lat::Error::explainSelf(), DBSPlugin::get(), m_state, proc, and processOneEvent().
Referenced by VisEventMenu().
00347 { 00348 IgArgsElement *args = IgArgsElement::get (m_state); 00349 00350 try 00351 { 00352 processOneEvent (); 00353 } 00354 catch (lat::Error& e) 00355 { 00356 IgQtLock (); 00357 00358 QMessageBox::critical (0, "IGUANA", QString ("<p>Exception caught in %1:</p>" 00359 "<p>%2</p>").arg (args->argv () [0]).arg (e.explainSelf ())); 00360 } 00361 catch (std::exception& e) 00362 { 00363 IgQtLock (); 00364 00365 QMessageBox::critical (0, "IGUANA", QString ("<p>Standard library exception caught in %1:</p>" 00366 "<p>%2</p>").arg (args->argv () [0]).arg (e.what ())); 00367 } 00368 catch (...) 00369 { 00370 IgQtLock (); 00371 00372 QMessageBox::critical (0, "IGUANA", QString ("<p>Unknown exception caught in %1</p>") 00373 .arg (args->argv () [0])); 00374 } 00375 if (VisQueueProcessor *proc = VisQueueProcessor::get (m_state)) 00376 proc->scheduleNextEvent (); 00377 }
Definition at line 380 of file VisEventMenu.cc.
References arg, IgArgsElement::argv(), hlt_scaler_cfg::critical, e, exception, lat::Error::explainSelf(), DBSPlugin::get(), m_state, and proc.
Referenced by VisEventMenu().
00381 { 00382 IgArgsElement *args = IgArgsElement::get (m_state); 00383 00384 try 00385 { 00386 IgQtLock (); 00387 00388 if (VisEventProcessorService *procService = VisEventProcessorService::get (m_state)) 00389 { 00390 (*procService)->skip (-2); 00391 (*procService)->run (1); 00392 } 00393 } 00394 catch (lat::Error& e) 00395 { 00396 IgQtLock (); 00397 00398 QMessageBox::critical (0, "IGUANA", QString ("<p>Exception caught in %1:</p>" 00399 "<p>%2</p>").arg (args->argv () [0]).arg (e.explainSelf ())); 00400 } 00401 catch (std::exception& e) 00402 { 00403 IgQtLock (); 00404 00405 QMessageBox::critical (0, "IGUANA", QString ("<p>Standard library exception caught in %1:</p>" 00406 "<p>%2</p>").arg (args->argv () [0]).arg (e.what ())); 00407 } 00408 catch (...) 00409 { 00410 IgQtLock (); 00411 00412 QMessageBox::critical (0, "IGUANA", QString ("<p>Unknown exception caught in %1</p>") 00413 .arg (args->argv () [0])); 00414 } 00415 if (VisQueueProcessor *proc = VisQueueProcessor::get (m_state)) 00416 proc->scheduleNextEvent (); 00417 }
Definition at line 820 of file VisEventMenu.cc.
References DBSPlugin::get(), m_state, and IgPage::printViews().
Referenced by autoPrint(), and VisEventMenu().
00821 { 00822 IgQtLock (); 00823 00824 IgPage *currentPage = IgDocumentData::get (m_state)->document ()->currentPage (); 00825 00826 QString text ("No information available."); 00827 00828 currentPage->printViews (text); 00829 }
Definition at line 583 of file VisEventMenu.cc.
References VisExceptionService::cmsExceptionCallback(), e, VisExceptionService::errorCallback(), exception, VisExceptionService::exceptionCallback(), DBSPlugin::get(), m_state, and VisExceptionService::unhandledExceptionCallback().
Referenced by processEventDialog().
00584 { 00585 IgQtLock (); 00586 00587 if (VisEventProcessorService *procService = VisEventProcessorService::get (m_state)) 00588 { 00589 VisExceptionService *exService = VisExceptionService::get (m_state); 00590 if (! exService) 00591 { 00592 exService = new VisExceptionService (m_state); 00593 } 00594 try 00595 { 00596 (*procService)->run (edm::EventID (runNum, eventNum)); 00597 } 00598 catch (cms::Exception& e) 00599 { 00600 exService->cmsExceptionCallback (&e); 00601 } 00602 catch (lat::Error& e) 00603 { 00604 exService->errorCallback (&e); 00605 } 00606 catch (std::exception& e) 00607 { 00608 exService->exceptionCallback (&e); 00609 } 00610 catch (...) 00611 { 00612 exService->unhandledExceptionCallback (); 00613 } 00614 } 00615 }
Definition at line 618 of file VisEventMenu.cc.
References VisProcessEventDialog::eventNumberText, processEvent(), and VisProcessEventDialog::runNumberText.
Referenced by VisEventMenu().
00619 { 00620 VisProcessEventDialog *eventSelector = new VisProcessEventDialog (); 00621 eventSelector->setModal (true); 00622 QRegExp rx ("\\d+"); 00623 eventSelector->runNumberText->setValidator (new QRegExpValidator (rx, this)); 00624 eventSelector->eventNumberText->setValidator (new QRegExpValidator (rx, this)); 00625 00626 eventSelector->show (); 00627 00628 if (eventSelector->exec () == QDialog::Accepted) 00629 { 00630 processEvent (eventSelector->runNumberText->text ().toUInt (), eventSelector->eventNumberText->text ().toUInt ()); 00631 } 00632 00633 delete eventSelector; 00634 }
Definition at line 499 of file VisEventMenu.cc.
References ASSERT, e, exception, cms::Exception::explainSelf(), finalizeTimer(), DBSPlugin::get(), m_done, m_state, and IgQtAppStatusBarService::setMessage().
Referenced by autoEvents(), l1TriggerDialog(), nextEvent(), and VisEventMenu().
00500 { 00501 IgQtLock (); 00502 00503 int rc = -1; 00504 00505 if (m_done) 00506 { 00507 m_done = false; 00508 00509 if (VisEventProcessorService *procService = VisEventProcessorService::get (m_state)) 00510 { 00511 try 00512 { 00513 (*procService)->run (1); 00514 } 00515 catch (cms::Exception& e) 00516 { 00517 finalizeTimer (); 00518 std::string shortDesc ("CMSException"); 00519 std::ostringstream longDesc; 00520 longDesc << "cms::Exception caught in " 00521 << "iguana -s CMSSW" 00522 << "\n" 00523 << e.explainSelf(); 00524 rc = 8001; 00525 procService->jobReport ()->reportError (shortDesc, longDesc.str (), rc); 00526 edm::LogSystem (shortDesc) << longDesc.str () << "\n"; 00527 } 00528 catch (std::exception& e) 00529 { 00530 finalizeTimer (); 00531 std::string shortDesc ("StdLibException"); 00532 std::ostringstream longDesc; 00533 longDesc << "Standard library exception caught in " 00534 << "iguana -s CMSSW" 00535 << "\n" 00536 << e.what(); 00537 rc = 8002; 00538 procService->jobReport ()->reportError (shortDesc, longDesc.str (), rc); 00539 edm::LogSystem (shortDesc) << longDesc.str () << "\n"; 00540 } 00541 catch (...) 00542 { 00543 finalizeTimer (); 00544 std::string shortDesc ("UnknownException"); 00545 std::ostringstream longDesc; 00546 longDesc << "Unknown exception caught in " 00547 << "iguana -s CMSSW" 00548 << "\n"; 00549 rc = 8003; 00550 procService->jobReport ()->reportError (shortDesc, longDesc.str (), rc); 00551 edm::LogSystem (shortDesc) << longDesc.str () << "\n"; 00552 } 00553 } 00554 m_done = true; 00555 } 00556 else 00557 { 00558 IgQtAppStatusBarService *sbar = IgQtAppStatusBarService::get (m_state); 00559 ASSERT (sbar); 00560 sbar->setMessage (QString ("Waiting for an event...")); 00561 } 00562 }
Definition at line 272 of file VisEventMenu.cc.
References arg, IgArgsElement::argv(), hlt_scaler_cfg::critical, e, exception, lat::Error::explainSelf(), EgammaValidation_cff::filename, DBSPlugin::get(), parsecf::pyparsing::line(), and m_state.
Referenced by VisEventMenu().
00273 { 00274 IgArgsElement *args = IgArgsElement::get (m_state); 00275 00276 QString filename = QFileDialog::getOpenFileName ("./", 00277 "", 00278 0, 00279 QString::null, 00280 "Select a new Parameter set file"); 00281 std::ifstream configFile (filename.latin1 ()); 00282 std::string line; 00283 std::string configstring; 00284 00285 while (std::getline (configFile, line)) 00286 { 00287 configstring += line; 00288 configstring += "\n"; 00289 } 00290 00291 try 00292 { 00293 IgQtLock (); 00294 00295 QApplication::setOverrideCursor (Qt::waitCursor); 00296 if (IgQtAppStatusBarService *sbar = IgQtAppStatusBarService::get (m_state)) 00297 sbar->setMessage (QString ("Start Event Processor reinitialization...")); 00298 00299 if (VisEventProcessorService *procService = VisEventProcessorService::get (m_state)) 00300 { 00301 (*procService).reInitEventProcessor (configstring); 00302 (*procService)->beginJob (); 00303 (*procService).on (); 00304 00305 QApplication::restoreOverrideCursor (); 00306 if (IgQtAppStatusBarService *sbar = IgQtAppStatusBarService::get (m_state)) 00307 sbar->setMessage (QString ("Event Processor is reinitialized.")); 00308 } 00309 else 00310 { 00311 QApplication::restoreOverrideCursor (); 00312 if (IgQtAppStatusBarService *sbar = IgQtAppStatusBarService::get (m_state)) 00313 sbar->setMessage (QString ("Event Processor failed to initialize.")); 00314 } 00315 } 00316 catch (lat::Error& e) 00317 { 00318 IgQtLock (); 00319 00320 QMessageBox::critical (0, "IGUANA", QString ("<p>Exception caught in %1:</p>" 00321 "<p>%2</p>").arg (args->argv () [0]).arg (e.explainSelf ())); 00322 } 00323 catch (std::exception& e) 00324 { 00325 IgQtLock (); 00326 00327 QMessageBox::critical (0, "IGUANA", QString ("<p>Standard library exception caught in %1:</p>" 00328 "<p>%2</p>").arg (args->argv () [0]).arg (e.what ())); 00329 } 00330 catch (...) 00331 { 00332 IgQtLock (); 00333 00334 QMessageBox::critical (0, "IGUANA", QString ("<p>Unknown exception caught in %1</p>") 00335 .arg (args->argv () [0])); 00336 } 00337 }
Definition at line 637 of file VisEventMenu.cc.
References VisExceptionService::cmsExceptionCallback(), e, VisExceptionService::errorCallback(), exception, VisExceptionService::exceptionCallback(), DBSPlugin::get(), m_state, and VisExceptionService::unhandledExceptionCallback().
Referenced by VisEventMenu().
00638 { 00639 IgQtLock (); 00640 00641 if (VisEventProcessorService *procService = VisEventProcessorService::get (m_state)) 00642 { 00643 VisExceptionService *exService = VisExceptionService::get (m_state); 00644 if (! exService) 00645 { 00646 exService = new VisExceptionService (m_state); 00647 } 00648 try 00649 { 00650 (*procService)->rewind (); 00651 (*procService)->run (1); 00652 } 00653 catch (cms::Exception& e) 00654 { 00655 exService->cmsExceptionCallback (&e); 00656 } 00657 catch (lat::Error& e) 00658 { 00659 exService->errorCallback (&e); 00660 } 00661 catch (std::exception& e) 00662 { 00663 exService->exceptionCallback (&e); 00664 } 00665 catch (...) 00666 { 00667 exService->unhandledExceptionCallback (); 00668 } 00669 } 00670 }
void VisEventMenu::skipEvent | ( | long | num | ) | [slot] |
Definition at line 690 of file VisEventMenu.cc.
References arg, IgArgsElement::argv(), hlt_scaler_cfg::critical, e, exception, lat::Error::explainSelf(), DBSPlugin::get(), and m_state.
Referenced by skipEventDialog().
00691 { 00692 IgArgsElement *args = IgArgsElement::get (m_state); 00693 00694 IgQtLock (); 00695 00696 if (VisEventProcessorService *procService = VisEventProcessorService::get (m_state)) 00697 { 00698 try 00699 { 00700 (*procService)->skip (num - 1); 00701 (*procService)->run (1); 00702 } 00703 catch (lat::Error& e) 00704 { 00705 IgQtLock (); 00706 00707 QMessageBox::critical (0, "IGUANA", QString ("<p>Exception caught in %1:</p>" 00708 "<p>%2</p>").arg (args->argv () [0]).arg (e.explainSelf ())); 00709 } 00710 catch (std::exception& e) 00711 { 00712 IgQtLock (); 00713 00714 QMessageBox::critical (0, "IGUANA", QString ("<p>Standard library exception caught in %1:</p>" 00715 "<p>%2</p>").arg (args->argv () [0]).arg (e.what ())); 00716 } 00717 catch (...) 00718 { 00719 IgQtLock (); 00720 00721 QMessageBox::critical (0, "IGUANA", QString ("<p>Unknown exception caught in %1</p>") 00722 .arg (args->argv () [0])); 00723 } 00724 } 00725 }
Definition at line 673 of file VisEventMenu.cc.
References VisEventNavigationDialog::buttonGroup, skipEvent(), and VisEventNavigationDialog::skipNumberLineEdit.
Referenced by VisEventMenu().
00674 { 00675 VisEventNavigationDialog *eventSelector = new VisEventNavigationDialog (); 00676 eventSelector->setModal (true); 00677 QRegExp rx ("\\d+"); 00678 eventSelector->skipNumberLineEdit->setValidator (new QRegExpValidator (rx, this)); 00679 eventSelector->show (); 00680 00681 if (eventSelector->exec () == QDialog::Accepted) 00682 { 00683 eventSelector->buttonGroup->selectedId () == 0 ? skipEvent (eventSelector->skipNumberLineEdit->text ().toULong ()) : 00684 skipEvent (-eventSelector->skipNumberLineEdit->text ().toULong ()); 00685 } 00686 delete eventSelector; 00687 }
bool VisEventMenu::m_auto [private] |
Definition at line 70 of file VisEventMenu.h.
Referenced by autoEvents(), finalizeTimer(), and VisEventMenu().
VisAutoPrint VisEventMenu::m_autoPrint [private] |
VisAutoStart VisEventMenu::m_autoStart [private] |
VisEventTimer VisEventMenu::m_delay [private] |
bool VisEventMenu::m_done [private] |
bool VisEventMenu::m_print [private] |
VisPrintTimer VisEventMenu::m_printDelay [private] |
QTimer* VisEventMenu::m_printTimer [private] |
IgState* VisEventMenu::m_state [private] |
Definition at line 67 of file VisEventMenu.h.
Referenced by autoEvents(), autoPrint(), finalizeTimer(), initEventProcessor(), l1TriggerDialog(), nextEvent(), previousEvent(), print(), processEvent(), processOneEvent(), reInitEventProcessor(), rewind(), skipEvent(), VisEventMenu(), and ~VisEventMenu().
QTimer* VisEventMenu::m_timer [private] |
Definition at line 68 of file VisEventMenu.h.
Referenced by autoEvents(), finalizeTimer(), and VisEventMenu().
const int VisEventMenu::MENU_EVENT_AUTO = 7906 [static] |
Definition at line 34 of file VisEventMenu.h.
Referenced by autoEvents(), finalizeTimer(), and VisEventMenu().
const int VisEventMenu::MENU_EVENT_AUTO_PRINT = 7913 [static] |
const int VisEventMenu::MENU_EVENT_L1TRIGGER = 7911 [static] |
const int VisEventMenu::MENU_EVENT_NEXT = 7904 [static] |
const int VisEventMenu::MENU_EVENT_NUM = 7907 [static] |
const int VisEventMenu::MENU_EVENT_PREVIOUS = 7905 [static] |
const int VisEventMenu::MENU_EVENT_REWIND = 7908 [static] |
const int VisEventMenu::MENU_EVENT_SKIP = 7909 [static] |
const int VisEventMenu::MENU_ID_EVENT = 7900 [static] |
const int VisEventMenu::MENU_INIT_APP = 7902 [static] |
const int VisEventMenu::MENU_RE_INIT_APP = 7903 [static] |