ATLAS Offline Software
Classes | Public Types | Signals | Public Member Functions | Static Public Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
VP1ExecutionScheduler Class Reference

#include <VP1ExecutionScheduler.h>

Inheritance diagram for VP1ExecutionScheduler:
Collaboration diagram for VP1ExecutionScheduler:

Classes

class  Imp
 

Public Types

enum  CruiseMode { NONE, TAB, EVENT, BOTH }
 

Signals

void refreshingStatusChanged (bool)
 

Public Member Functions

void setCruiseMode (const CruiseMode &)
 
bool executeNewEvent (const int &runnumber, const unsigned long long &eventnumber, const unsigned &triggerType=0, const unsigned &time=0)
 
 VP1ExecutionScheduler (QObject *parent, StoreGateSvc *eventStore, StoreGateSvc *detStore, ISvcLocator *svcLocator, IToolSvc *toolSvc, VP1AvailEvents *availEvents)
 
virtual ~VP1ExecutionScheduler ()
 
void bringFromConstructedToReady (IVP1ChannelWidget *)
 
void uncreateAndDelete (IVP1ChannelWidget *)
 
bool isRefreshing () const
 
bool hasAllActiveSystemsRefreshed (IVP1ChannelWidget *) const
 
QString nextRequestedEventFile () const
 
void setNextRequestedEventFile (const QString &)
 
QStringList userRequestedFiles ()
 
QString saveSnaphsotToFile (IVP1System *s, bool batch=false)
 

Static Public Member Functions

static VP1ExecutionSchedulerinit (StoreGateSvc *eventStore, StoreGateSvc *detStore, ISvcLocator *svcLocator, IToolSvc *toolSvc, QStringList joboptions, QString initialCruiseMode="NONE", unsigned initialCruiseSeconds=10, QString singleEventSource="", QString singleEventLocalTmpDir="", unsigned localFileCacheLimit=10, QStringList availableLocalInputDirectories=QStringList())
 
static void cleanup (VP1ExecutionScheduler *)
 

Private Slots

void processSystemForRefresh ()
 
void updateProgressBarDuringRefresh ()
 
void channelCreated (IVP1ChannelWidget *)
 
void channelUncreated (IVP1ChannelWidget *)
 
void startRefreshQueueIfAppropriate ()
 
void systemNeedErase ()
 
void performCruise ()
 

Private Member Functions

void refreshSystem (IVP1System *)
 
void eraseSystem (IVP1System *)
 
void actualUncreateAndDelete (IVP1ChannelWidget *)
 

Private Attributes

Impm_d
 

Detailed Description

Definition at line 42 of file VP1ExecutionScheduler.h.

Member Enumeration Documentation

◆ CruiseMode

Enumerator
NONE 
TAB 
EVENT 
BOTH 

Definition at line 49 of file VP1ExecutionScheduler.h.

49  { NONE,
50  TAB, //Cycles to a new tab at a fixed interval (when it is loaded - gives soonvisible bonus)
51  EVENT,//Proceeds to a new event at a fixed interval (counting from when all visible channels are refreshed)
52  BOTH };//Cycles through all tabs and loads next event when they have all been shown.

Constructor & Destructor Documentation

◆ VP1ExecutionScheduler()

VP1ExecutionScheduler::VP1ExecutionScheduler ( QObject *  parent,
StoreGateSvc eventStore,
StoreGateSvc detStore,
ISvcLocator *  svcLocator,
IToolSvc *  toolSvc,
VP1AvailEvents availEvents 
)

Definition at line 233 of file VP1ExecutionScheduler.cxx.

239 : QObject(parent), m_d(new Imp)
240 {
241  m_d->availEvents = availEvents;
242  VP1AthenaPtrs::setPointers(eventStore,detStore,svcLocator,toolSvc);
243  m_d->eventsProcessed = 0;
244 
245  m_d->scheduler = this;
246  m_d->prioritiser = new VP1Prioritiser(this);
247  m_d->mainwindow = new VP1MainWindow(this,availEvents);//mainwindow takes ownership of available events
248 
249  m_d->batchMode = false;
250  m_d->batchUtilities = nullptr;
251  m_d->batchModeAllEvents = false;
252  m_d->batchModeNEvents = 0;
253  m_d->batchModeRandomConfig = false;
254 
255  m_d->allSystemsRefreshed = false;
256  m_d->goingtonextevent=true;
258  m_d->eraseJustAfterRefresh=false;
260  m_d->refreshtimer = new QTimer(this);
261  connect(m_d->refreshtimer, SIGNAL(timeout()), this, SLOT(processSystemForRefresh()));
262 
263  //Connect signals to ensure that prioritiser knows about present channels and their visibility:
266  connect(m_d->mainwindow->channelManager(),SIGNAL(newChannelCreated(IVP1ChannelWidget*)),this, SLOT(channelCreated(IVP1ChannelWidget*)));
268 
269  connect(m_d->mainwindow->tabManager(),SIGNAL(visibleChannelsChanged(const QSet<IVP1ChannelWidget*>&,const QSet<IVP1ChannelWidget*>&,const double&)),
270  m_d->prioritiser,SLOT(visibleChannelsChanged(const QSet<IVP1ChannelWidget*>&,const QSet<IVP1ChannelWidget*>&,const double&)));
271 
272 
273  // Init and show the main window of VP1
274  SoQt::init( m_d->mainwindow );// SoQt::init( "VP1" );
275 
276  // check if 'batch mode'
277  bool batchMode = VP1QtUtils::environmentVariableIsSet("VP1_BATCHMODE"); // ::getenv("VP1_BATCHMODE");
278  if(VP1Msg::debug()){
279  qDebug() << "VP1ExecutionScheduler:: Do we run in 'batch' mode?" << batchMode;
280  }
281  if (batchMode) {
282  VP1Msg::messageWarningAllRed("User has run VP1 in 'batch-mode', so the main window of the program will not be shown.");
283  m_d->batchMode = true;
284 
285  // check if the user set the "all events" option as well
286  m_d->batchModeAllEvents = VP1QtUtils::environmentVariableIsSet("VP1_BATCHMODE_ALLEVENTS");
287 
288  // check if the user set the "random configuration file" option as well
289  m_d->batchModeRandomConfig = VP1QtUtils::environmentVariableIsSet("VP1_BATCHMODE_RANDOMCONFIG");
290  }
291  else {
292  m_d->mainwindow->show();
293  }
294 
295 
297  m_d->pbtimer = new QTimer(this);
298  connect(m_d->pbtimer, SIGNAL(timeout()), this, SLOT(updateProgressBarDuringRefresh()));
301 
302  m_d->cruisemode = NONE;
303  m_d->cruisetimer = new QTimer(this);
304  connect(m_d->cruisetimer, SIGNAL(timeout()), this, SLOT(performCruise()));
306 
307  #if defined BUILDVP1LIGHT
308  bool checkDisplayMouseClicks = VP1QtUtils::expertSettingIsOn("general","ExpertSettings/VP1_DISPLAY_MOUSE_CLICKS");
309  #else
310  bool checkDisplayMouseClicks = VP1QtUtils::environmentVariableIsOn("VP1_DISPLAY_MOUSE_CLICKS");
311  #endif
312 
313  if (checkDisplayMouseClicks) {
314  m_d->globalEventFilter = new Imp::GlobalEventFilter;
315  qApp->installEventFilter(m_d->globalEventFilter);
316  } else {
317  m_d->globalEventFilter = 0;
318  }
319 
320  VP1AvailEvtsHttps* availEvtsHttps = dynamic_cast<VP1AvailEvtsHttps*>(availEvents);
321  if(availEvtsHttps) {
322  m_d->skipEvent = true;
324 
325  connect(auth,SIGNAL(authenticationSuccessful(QNetworkAccessManager*)),
326  availEvtsHttps,SLOT(start(QNetworkAccessManager*)));
327  connect(availEvtsHttps,SIGNAL(freshEventsChanged()),
328  auth,SLOT(accept()));
329 
330  SoQt::init(auth);
331  auth->exec();
332  delete auth;
333  }
334  else
335  m_d->skipEvent = false;
336 }

◆ ~VP1ExecutionScheduler()

VP1ExecutionScheduler::~VP1ExecutionScheduler ( )
virtual

Definition at line 339 of file VP1ExecutionScheduler.cxx.

340 {
341  m_d->refreshtimer->stop();
342  delete m_d->batchUtilities;
343  delete m_d->mainwindow;
344  delete m_d->prioritiser;
345  delete m_d->globalEventFilter;
346  delete m_d;
347 }

Member Function Documentation

◆ actualUncreateAndDelete()

void VP1ExecutionScheduler::actualUncreateAndDelete ( IVP1ChannelWidget cw)
private

Definition at line 1110 of file VP1ExecutionScheduler.cxx.

1111 {
1112  assert(cw->state()==IVP1ChannelWidget::READY);
1113  cw->setUpdatesEnabled(false);//Just because...
1114 
1115  //From this point on, we are not interested in signals from the channel (and its systems) that could disturb us:
1116  std::set<IVP1System *>::iterator itsys, itsysE = cw->systems().end();
1117  for (itsys = cw->systems().begin();itsys!=itsysE;++itsys) {
1118  (*itsys)->blockSignals(true);
1119  disconnect(*itsys,0,0,0);
1120  }
1121  cw->blockSignals(true);
1122  disconnect(cw,0,0,0);
1123 
1124  //Make sure that all systems gets in the ERASED state. Throw assert if any is presently refreshing (BAD PROGRAMMER!!)
1125  for (itsys = cw->systems().begin();itsys!=itsysE;++itsys) {
1126  assert(m_d->currentsystemrefreshing!=(*itsys));
1127  if ((*itsys)->state()==IVP1System::REFRESHED)
1128  eraseSystem(*itsys);
1129  }
1130 
1131  //Uncreate systems:
1132  for (itsys = cw->systems().begin();itsys!=itsysE;++itsys) {
1133  assert((*itsys)->state()==IVP1System::ERASED);
1134  (*itsys)->uncreate();
1135  (*itsys)->setState(IVP1System::UNCREATED);
1136  }
1137 
1138  //Uncreate channel:
1139  assert(cw->state()==IVP1ChannelWidget::READY);
1140  cw->uncreate();//Fixme: Return codes!!
1142 
1143  assert(cw->state()==IVP1ChannelWidget::UNCREATED);
1144 
1145  cw->deleteControllers();//Also deletes system controllers.
1146 
1147  //Delete:
1148  cw->deleteLater();
1149 
1150 }

◆ bringFromConstructedToReady()

void VP1ExecutionScheduler::bringFromConstructedToReady ( IVP1ChannelWidget cw)

Definition at line 1069 of file VP1ExecutionScheduler.cxx.

1070 {
1071  assert(cw->state()==IVP1ChannelWidget::CONSTRUCTED);
1072 
1073  connect(cw,SIGNAL(message(const QString&)),m_d->mainwindow,SLOT(channelAddToMessageBox(const QString&)));
1074 
1075  std::set<IVP1System *>::iterator itsys, itsysE = cw->systems().end();
1076  for (itsys = cw->systems().begin();itsys!=itsysE;++itsys) {
1077  assert((*itsys)->state()==IVP1System::CONSTRUCTED);
1078  connect((*itsys),SIGNAL(sysmessage(const QString&)),m_d->mainwindow,SLOT(systemAddToMessageBox(const QString&)));
1079  }
1080  itsysE = cw->systems().end();
1081  for (itsys = cw->systems().begin();itsys!=itsysE;++itsys) {
1082  (*itsys)->setCanRegisterController(true);
1083  (*itsys)->create(VP1AthenaPtrs::detectorStore());
1084  (*itsys)->setCanRegisterController(false);
1085  (*itsys)->setState(IVP1System::ERASED);
1086  }
1087  assert(cw->state()==IVP1ChannelWidget::CONSTRUCTED);
1088  cw->setCanRegister(true,false);//Ok to register controllers during create.
1089  cw->create();
1090  cw->setCanRegister(false,false);
1092 
1093  assert(cw->state()==IVP1ChannelWidget::READY);
1094  //Fixme: statusbar!!!!!
1095 }

◆ channelCreated

void VP1ExecutionScheduler::channelCreated ( IVP1ChannelWidget cw)
privateslot

Definition at line 767 of file VP1ExecutionScheduler.cxx.

768 {
769  std::set<IVP1System*>::const_iterator it, itE = cw->systems().end();
770  for (it=cw->systems().begin();it!=itE;++it) {
771  qInfo() << "System name:" << (*it)->name();
772  connect(*it,SIGNAL(inactiveSystemTurnedActive()),this,SLOT(startRefreshQueueIfAppropriate()));
773  connect(*it,SIGNAL(needErase()),this,SLOT(systemNeedErase()));
774  #ifdef BUILDVP1LIGHT
775  connect(*it,SIGNAL(signalLoadEvent(IVP1System*)),this,SLOT(passEvent(IVP1System*)));
776  #endif // BUILDVP1LIGHT
777  }
779 
780 }

◆ channelUncreated

void VP1ExecutionScheduler::channelUncreated ( IVP1ChannelWidget cw)
privateslot

Definition at line 783 of file VP1ExecutionScheduler.cxx.

784 {
785  std::set<IVP1System*>::const_iterator it, itE = cw->systems().end();
786  for (it=cw->systems().begin();it!=itE;++it)
787  disconnect(*it,SIGNAL(inactiveSystemTurnedActive()),this,SLOT(startRefreshQueueIfAppropriate()));
788 }

◆ cleanup()

void VP1ExecutionScheduler::cleanup ( VP1ExecutionScheduler scheduler)
static

Definition at line 506 of file VP1ExecutionScheduler.cxx.

507 {
508  #if defined BUILDVP1LIGHT
509  bool checkEnableInformOnEndOfJob = VP1QtUtils::expertSettingIsOn("expert","ExpertSettings/VP1_ENABLE_INFORM_ON_END_OF_JOB");
510  #else
511  bool checkEnableInformOnEndOfJob = VP1QtUtils::environmentVariableIsOn("VP1_ENABLE_INFORM_ON_END_OF_JOB");
512  #endif
513 
514  if (checkEnableInformOnEndOfJob && ( !scheduler||!(scheduler->m_d->mainwindow->userRequestedExit()) ) )
515  QMessageBox::information(0, "End of job reached",Qt::convertFromPlainText("Job about to end.\n\nThis is most"
516  " likely since there are no more available events to process."),QMessageBox::Ok,QMessageBox::Ok);
517 
518  if (scheduler) {
519  delete scheduler;
520 // qApp->processEvents(QEventLoop::DeferredDeletion); // Qt 4
521  qApp->processEvents(); // Qt 5
522  qApp->deleteLater(); // Qt 5
523 
526 
527  delete qApp;
528  SoQt::done();
529  }
530 
531 
532 
533  const QString quickExitEnv("VP1_HARD_EXIT_AT_END");
534 
535  #if defined BUILDVP1LIGHT
536  bool checkHardExitAtEnd = VP1QtUtils::expertSettingIsOn("expert","ExpertSettings/"+quickExitEnv);
537  #else
538  bool checkHardExitAtEnd = VP1QtUtils::environmentVariableIsOn(quickExitEnv);
539  #endif
540 
541  if (checkHardExitAtEnd) {
542  VP1Msg::message("Hard job exit (unset "+quickExitEnv+" to disable this behaviour).");
543  exit(0);
544  }
545 
546 }

◆ eraseSystem()

void VP1ExecutionScheduler::eraseSystem ( IVP1System s)
private

Definition at line 713 of file VP1ExecutionScheduler.cxx.

713  {
714 
715  VP1Msg::messageDebug("VP1ExecutionScheduler::eraseSystem()");
716 
717  assert(s->state()==IVP1System::REFRESHED);
718  // cppcheck-suppress assertWithSideEffect
719  assert(!s->isRefreshing());
720 
721  QString base = QString(s->name())+" from channel "+s->channel()->unique_name();
722  m_d->mainwindow->statusBar()->showMessage( "Erasing system ["+base+"]" );
723  VP1Msg::messageDebug("ERASING - " + base);
724 
725  s->disallowUpdateGUI();
726  s->erase();//fixme: time?
727  s->setState(IVP1System::ERASED);
728  m_d->mainwindow->statusBar()->showMessage( "Post-erase update to channel ["+base+"]" );
729  s->channel()->systemErased(s);//fixme: time?
730  m_d->mainwindow->statusBar()->clearMessage();
731 }

◆ executeNewEvent()

bool VP1ExecutionScheduler::executeNewEvent ( const int &  runnumber,
const unsigned long long &  eventnumber,
const unsigned &  triggerType = 0,
const unsigned &  time = 0 
)

Definition at line 590 of file VP1ExecutionScheduler.cxx.

591 {
592  VP1Msg::messageDebug("VP1ExecutionScheduler::executeNewEvent()");
593 
595 
596 #if defined BUILDVP1LIGHT
597  unused(runnumber,eventnumber,triggerType,time); // silences the "unused parameter" warnings when building VP1Light. In this case, in fact, those variables will be used later in loadEvent().
598  if ( !firstlaunch ) {
599  if ( (getEvtNr() >= 0) && (getEvtNr() < m_totEvtNr) ) { // If selected event number is available in file
600  loadEvent();
601  //Pass the event to the AOD System
603  for (itsys = m_d->mainwindow->tabManager()->selectedChannelWidget()->systems().begin();itsys!=itsysE;++itsys) {
604  if((*itsys)->name()=="Analysis"){
605  passEvent(*itsys);
606  }
607  }
608  }
609  else if ( (getEvtNr() < 0) && (getEvtNr() >= m_totEvtNr) ) {
610  QMessageBox msgBox;
611  msgBox.setWindowTitle("No more events");
612  msgBox.setText("There are no more events in this file. Returning to previous event.");
613  msgBox.setIcon(QMessageBox::Icon::Information);
614  msgBox.exec();
615  }
616  }
617  else{
618  firstlaunch = false;
619  }
620 #else
622 #endif
623 
624  m_d->goingtonextevent = false;
628 
629  assert(!m_d->refreshtimer->isActive());//fixme: -> if.
630 
631 
632  VP1Msg::messageDebug("calling refreshtimer->start()...");
633  m_d->refreshtimer->start();
634 
635  VP1Msg::messageDebug("calling initCruise...");
636  m_d->initCruise();
637  VP1Msg::messageDebug("initCruise called.");
638 
639  //Flush event queue before reenabling controllers, etc.:
640  qApp->processEvents();
641  VP1Msg::messageDebug("qApp->processEvents() called.");
642 
643  //Enable various user input:
644  m_d->mainwindow->groupBox_channelcontrols->setEnabled(true);
645  m_d->mainwindow->groupBox_cruise->setEnabled(true);
646  m_d->mainwindow->groupBox_event->setEnabled(true);
647 
648 
650 
651  if (m_d->batchModeRandomConfig) {
652  VP1Msg::messageDebug("User chose 'batch' and 'batch-random-config'. So we now replace the configuration with a random one from the input set...");
653  QString randomConfigFile = QString::fromStdString( m_d->batchUtilities->getRandomConfigFile() );
654  m_d->mainwindow->replaceConfigurationFile(randomConfigFile);
655  }
656 
657  if ( m_d->batchMode && m_d->allVisibleRefreshed() ) { // or m_d->allSystemsRefreshed ???
658  VP1Msg::messageDebug("We're in batch mode, skipping the execution of the GUI...");
659  } else {
661  if(m_d->skipEvent) {
662  VP1Msg::messageDebug("skipEvent");
663  m_d->skipEvent=false;
665  }
666  else {
667  VP1Msg::messageDebug("calling qApp->exec()...");
668  qApp->exec();//NOTE!!! We then exit the exec() when someone pushes the "next event" button.
669  }
670  }
671 
672  VP1Msg::messageDebug("Disabling user inputs...");
673  //Disable various user input:
674  m_d->mainwindow->groupBox_channelcontrols->setEnabled(false);
675  m_d->mainwindow->groupBox_cruise->setEnabled(false);
676  m_d->mainwindow->groupBox_event->setEnabled(false);
677 
678  m_d->goingtonextevent = true;
679 
680  if (m_d->refreshtimer->isActive()) {
681  m_d->refreshtimer->stop();
682  }
683  m_d->pb->hide();
684  m_d->pb->reset();
685  m_d->pbtimer->stop();
686  //Fixme: Refresh all accumulators that still needs refresh (or just have the button disabled until now)
687 
688  //Fixme: wait here until end of any active refreshing...
689 
690  VP1Msg::messageDebug("Erasing systems...");
691  assert(!m_d->currentsystemrefreshing);
693  qApp->processEvents(QEventLoop::ExcludeUserInputEvents|QEventLoop::ExcludeSocketNotifiers);
694  eraseSystem(s);
695  }
696 
697  ++m_d->eventsProcessed; // we don't use Athena's tools for this, so we can use this in VP1Light as well.
698  VP1Msg::messageDebug("event processed. " + QString::number(m_d->eventsProcessed) + " events processed so far.");
699 
700  //Let channels know we are going to the next event now:
702  cw->goingToNextEvent();
703  }
704 
705  qApp->processEvents(QEventLoop::ExcludeUserInputEvents|QEventLoop::ExcludeSocketNotifiers);
706 
707 
708  VP1Msg::messageDebug("mainwindow->mustQuit ? " + QString::number(m_d->mainwindow->mustQuit()) );
709  return !m_d->mainwindow->mustQuit();
710 }

◆ hasAllActiveSystemsRefreshed()

bool VP1ExecutionScheduler::hasAllActiveSystemsRefreshed ( IVP1ChannelWidget cw) const

Definition at line 1186 of file VP1ExecutionScheduler.cxx.

1187 {
1188  VP1Msg::messageDebug("VP1ExecutionScheduler::hasAllActiveSystemsRefreshed() - channelWidget: " + cw->name());
1189 
1190  std::set<IVP1System*>::const_iterator it, itE = cw->systems().end();
1191  int i=0;
1192  for (it=cw->systems().begin();it!=itE;++it) {
1193 
1194  /*
1195  * enum State { CONSTRUCTED=0, REFRESHED, ERASED, UNCREATED };
1196  * enum ActiveState { ON=0, OFF };//Whether it is part of the erase/refresh cycle.
1197  */
1198  if (VP1Msg::verbose()) {
1199  QString name = QString((*it)->name());
1200  QString active = QString::number((*it)->activeState());
1201  QString state = QString::number((*it)->state());
1202  std::cout << i << " - name: " << name.toStdString() << " - active: " << active.toStdString() << " - refreshed: " << state.toStdString() << std::endl;
1203  }
1204  if ((*it)->activeState()==IVP1System::ON&&(*it)->state()!=IVP1System::REFRESHED)
1205  return false;
1206 
1207  i++;
1208  }
1209 
1210  return true;
1211 }

◆ init()

VP1ExecutionScheduler * VP1ExecutionScheduler::init ( StoreGateSvc eventStore,
StoreGateSvc detStore,
ISvcLocator *  svcLocator,
IToolSvc *  toolSvc,
QStringList  joboptions,
QString  initialCruiseMode = "NONE",
unsigned  initialCruiseSeconds = 10,
QString  singleEventSource = "",
QString  singleEventLocalTmpDir = "",
unsigned  localFileCacheLimit = 10,
QStringList  availableLocalInputDirectories = QStringList() 
)
static

Definition at line 350 of file VP1ExecutionScheduler.cxx.

361 {
362  //First we make sure the DISPLAY variable is set (importing ROOT in
363  //athena.py might cause it to be unset!).
364  //
365  //NB: The following might only be relevant in X11 build:
366  if (VP1QtUtils::environmentVariableValue("DISPLAY").isEmpty()) {
367  const bool unset(!VP1QtUtils::environmentVariableIsSet("DISPLAY"));
368  QString alternative = VP1QtUtils::environmentVariableValue("DISPLAY_ORIG");
369  if (alternative.isEmpty()) {
370  VP1Msg::message("ERROR: The DISPLAY environment variable is "+QString(unset?"not set":"empty")+".");
371  VP1Msg::message("This might be because something else in Athena has disabled it.");
372  VP1Msg::message("You can work around this problem by setting "
373  "the DISPLAY_ORIG environment variable to the contents of DISPLAY before launching your job.");
374  VP1Msg::message("E.g., in bash do:");
375  VP1Msg::message(" export DISPLAY_ORIG=$DISPLAY");
376  VP1Msg::message("");
377  VP1Msg::message("For the current job, I will try with DISPLAY=\":0.0\", which is the correct value when running locally.");
378  alternative=":0.0";
379  } else {
380  VP1Msg::message("WARNING: The DISPLAY environment variable is "+QString(unset?"not set":"empty")+". Setting to value found in DISPLAY_ORIG");
381  }
382  VP1Msg::message("WARNING: Setting DISPLAY variable to '"+alternative+"'");
383  VP1QtUtils::setEnvironmentVariable("DISPLAY",alternative);
384  }
385 
386 
387 
388  QCoreApplication::setOrganizationName("ATLAS");
389  #if defined BUILDVP1LIGHT
390  QCoreApplication::setApplicationName("VP1Light");
391  #else
392  QCoreApplication::setApplicationName("VP1");
393  #endif
394  QCoreApplication::setAttribute(Qt::AA_UseDesktopOpenGL);
395 
396 
397 
398  // here we check if the main (and unique!) Qt application has been initialized already. If not we initialize it.
399  if (qApp) {
400  VP1Msg::message("VP1ExecutionScheduler::init ERROR: QApplication already initialized. Expect problems!!!");
401  } else {
402  //NB: Static to avoid scope-problems:
403  static int argc=1;
404  static char execpath[] = "/some/fake/executable/vp1";
405  static char *argv[2];
406  // VP1Msg::messageDebug("setting argv[0]...");
407  argv[0] = execpath;
408  // VP1Msg::messageDebug("setting argv[1]...");
409  argv[1] = NULL;
410  // instead of using the default Qt QApplication class,
411  // we now use our custom inherited class where we
412  // reimplemented the notify() method, in order to catch
413  // C++ exceptions, especially while running it inside Athena.
414  //new QApplication(argc, argv);
415  new VP1QtApplication(argc, argv);
416  }
417 
418  VP1AvailEvents * availEvents(0);
419  if (!singleEventSource.isEmpty()&&!singleEventLocalTmpDir.isEmpty()) {
420  const bool httpmode = singleEventSource.startsWith("http://");
421  const bool httpsmode = singleEventSource.startsWith("https://");
422  //Create appropriate instance:
423  if (httpmode) {
424  availEvents = new VP1AvailEvtsHttp(singleEventSource, 60/*update interval*/, 30*60/*time cut for new*/, singleEventLocalTmpDir,localFileCacheLimit);
425  } else if(httpsmode) {
426  availEvents = new VP1AvailEvtsHttps(singleEventSource, 1000/*update interval*/, 30*60/*time cut for new*/, singleEventLocalTmpDir,localFileCacheLimit);
427  } else {
428  availEvents = new VP1AvailEvtsLocalDir(5*60/*time cut for new*/, singleEventSource,
429  singleEventLocalTmpDir,localFileCacheLimit);
430  static_cast<VP1AvailEvtsLocalDir*>(availEvents)->setAvailableSourceDirectories(availableLocalInputDirectories);
431 
432  }
433 
434  }
435 
436  VP1ExecutionScheduler*scheduler = new VP1ExecutionScheduler(0,eventStore,detStore,svcLocator,toolSvc,availEvents);
437 
438  //Pass on "joboptions"
439  if (joboptions.empty()) {
440  //scheduler->m_d->mainwindow->tabManager()->addNewTab("My Tab");
441  } else {
442  qDebug() << "config files: " << joboptions; // DEBUG
443  for (QString opt : joboptions)
445 
446  if ( scheduler->m_d->batchMode ) {
447  if (scheduler->m_d->batchModeRandomConfig ) {
448  if (joboptions.size() != 0 ) {
449  scheduler->m_d->batchUtilities = new VP1BatchUtilities( qstringlistToVecString(joboptions) );
450  }
451  }
452  QString batchNevents = VP1QtUtils::environmentVariableValue("VP1_BATCHMODE_NEVENTS");
453  if (batchNevents > 0 ) {
454  scheduler->m_d->batchModeNEvents = batchNevents.toInt();
455  }
456  }
457  }
458 
459 
460  if (scheduler->m_d->mainwindow->tabWidget_central->count()<=1) {
461  if (initialCruiseMode=="TAB") {
462  VP1Msg::message("ERROR: Can not start in cruisemode TAB unless there are at least 2 tabs loaded from initial .vp1 files. Reverting to cruise mode NONE.");
463  initialCruiseMode="NONE";
464  } else if (initialCruiseMode=="BOTH") {
465  VP1Msg::message("ERROR: Can not start in cruisemode BOTH unless there are at least 2 tabs loaded from initial .vp1 files. Reverting to cruise mode EVENT.");
466  initialCruiseMode="EVENT";
467  }
468  }
469 
470  //Set default value of cruisemode (dont use setCruiseMode() since it starts timers):
471  if (initialCruiseMode=="EVENT") {
472  scheduler->m_d->cruisemode=EVENT;
473  scheduler->m_d->mainwindow->radioButton_cruise_event->setChecked(true);
474  scheduler->m_d->mainwindow->pushButton_cruise->setChecked(true);
475 
476  } else if (initialCruiseMode=="TAB") {
477  scheduler->m_d->cruisemode=TAB;
478  scheduler->m_d->mainwindow->radioButton_cruise_tab->setChecked(true);
479  scheduler->m_d->mainwindow->pushButton_cruise->setChecked(true);
480  } else if (initialCruiseMode=="BOTH") {
481  scheduler->m_d->cruisemode=BOTH;
482  scheduler->m_d->mainwindow->radioButton_cruise_both->setChecked(true);
483  scheduler->m_d->mainwindow->pushButton_cruise->setChecked(true);
484  } else {
485  if (initialCruiseMode!="NONE")
486  VP1Msg::message("ERROR: unknown initial cruise mode "+initialCruiseMode+" (valid are NONE/EVENT/TAB/BOTH). Assuming NONE.");
487  scheduler->m_d->cruisemode=NONE;
488  scheduler->m_d->mainwindow->radioButton_cruise_event->setChecked(true);
489  scheduler->m_d->mainwindow->pushButton_cruise->setChecked(false);
490  }
491 
492  scheduler->m_d->mainwindow->request_cruisemodechange();
493 
494  int cruisesecs = ( initialCruiseSeconds == 0 ? 0 :
495  std::max(scheduler->m_d->mainwindow->spinBox_cruise->minimum(),
496  std::min(scheduler->m_d->mainwindow->spinBox_cruise->maximum(),
497  static_cast<int>(initialCruiseSeconds))));
498  if ( cruisesecs>0 )
499  scheduler->m_d->mainwindow->spinBox_cruise->setValue(cruisesecs);
500 
501 
502  return scheduler;
503 }

◆ isRefreshing()

bool VP1ExecutionScheduler::isRefreshing ( ) const

Definition at line 798 of file VP1ExecutionScheduler.cxx.

799 {
801 }

◆ nextRequestedEventFile()

QString VP1ExecutionScheduler::nextRequestedEventFile ( ) const

Definition at line 578 of file VP1ExecutionScheduler.cxx.

579 {
580  return m_d->nextRequestedEvent;
581 }

◆ performCruise

void VP1ExecutionScheduler::performCruise ( )
privateslot

Definition at line 1327 of file VP1ExecutionScheduler.cxx.

1328 {
1329  //In any case, we should stop the timer (fixme: What if there are 0 visible channels - when will the timer get started again?):
1330  m_d->cruisetimer->stop();
1331 
1333  //Hmm. Would like to cruise, but that is not ok. Check back in a few seconds.
1334  m_d->cruisetimer->start( (m_d->mainwindow->spinBox_cruise->value() > 5 ? 3000 : 1000) );
1335  return;
1336  }
1337 
1338  assert(!m_d->goingtonextevent);//Otherwise it is a bit silly?
1339 
1340  switch (m_d->cruisemode) {
1341  case NONE:
1342  assert(0&&"should never happen");
1343  break;
1344  case TAB:
1345  assert(m_d->cruisetab_waitingtoproceed==false);
1346  if (m_d->allSoonVisibleRefreshed()) {
1348  //If now all visible are refreshed, we start the timer again.
1349  if (m_d->allVisibleRefreshed())
1350  m_d->cruisetimer->start(m_d->mainwindow->spinBox_cruise->value()*1000);
1351  } else {
1353  }
1354  break;
1355  case EVENT:
1357  VP1Msg::messageDebug("Crusing to next event");
1358  break;
1359  case BOTH:
1360  assert(0&&"Not implemented");
1361  VP1Msg::messageDebug("ERROR: BOTH cruise mode not implemented");
1362  break;
1363  default:
1364  assert(0&&"UNKNOWN CRUISE MODE");
1365  VP1Msg::messageDebug("ERROR: Unknown cruise mode");
1366  break;
1367  }
1368 }

◆ processSystemForRefresh

void VP1ExecutionScheduler::processSystemForRefresh ( )
privateslot

Definition at line 747 of file VP1ExecutionScheduler.cxx.

748 {
749  assert(!m_d->goingtonextevent);
751  return;
752 
754  if (s) {
755  refreshSystem(s);
756  } else {
757  assert(m_d->refreshtimer->isActive());//fixme: -> if. ???
758  //if (refreshtimer->isActive())
759  m_d->refreshtimer->stop();
760  m_d->pb->hide();
761  m_d->pb->reset();
762  m_d->pbtimer->stop();
763  }
764 }

◆ refreshingStatusChanged

void VP1ExecutionScheduler::refreshingStatusChanged ( bool  )
signal

◆ refreshSystem()

void VP1ExecutionScheduler::refreshSystem ( IVP1System s)
private

Definition at line 804 of file VP1ExecutionScheduler.cxx.

805 {
806  QString sysname = s->name();
807  VP1Msg::messageDebug("VP1ExecutionScheduler::refreshSystem() - system: " + sysname);
808 
810 
811  assert(s->state()==IVP1System::ERASED);
812  assert(s->activeState()==IVP1System::ON);
813  assert(!m_d->currentsystemrefreshing);
814 
817 
818  QString base = QString(s->name())+" from channel "+s->channel()->unique_name();
819  m_d->mainwindow->statusBar()->showMessage( "Refreshing system ["+base+"]" );
820 
821  s->allowUpdateGUI();
822  s->setRefreshing(true);
824  s->channel()->emitRefreshInfoChanged();
825  s->refresh(VP1AthenaPtrs::eventStore());
826  s->setState(IVP1System::REFRESHED);
827  s->setRefreshing(false);
828  s->disallowUpdateGUI();
829 
830  m_d->mainwindow->statusBar()->showMessage( "Post-refresh update to channel ["+base+"]" );
831  s->channel()->systemRefreshed(s);//fixme: time independently?
832 
833  m_d->mainwindow->statusBar()->clearMessage();
838 
840  s->channel()->emitRefreshInfoChanged();
841 
842  VP1Msg::messageDebug("checking if all systems have refreshed...");
843  if (hasAllActiveSystemsRefreshed(s->channel())) {
844 
845  VP1Msg::messageDebug("All systems refreshed! - last system refreshed! - system: " + sysname);
846  s->channel()->lastOfActiveSystemsRefreshed();
847 
848  m_d->allSystemsRefreshed = true; // check if that is fine for multiple channels window: i.e. VP1 instances with a couple of 3DCkocktail windows, for example.
849 
850  } // end of hasAllActiveSystemsRefreshed()
851 
853 
854  if (m_d->eraseJustAfterRefresh) {
855  //Someone asked to erase the system while it was refreshing!
856  m_d->eraseJustAfterRefresh=false;
857  //Check that it still needs to (maybe it was flicked back to ON by the impatient user)
858  if (s->activeState()==IVP1System::OFF)
859  eraseSystem(s);
860  }
864  }
865 
866  VP1Msg::messageDebug("end of refreshing the system: " + sysname);
867 
868 // // if in "batch mode", now exit from VP1
869 // if (m_d->batchMode) {
870 //
873 //
874 // VP1Msg::messageWarningRed("'batch mode'. Now exiting VP1");
875 //
876 // // N.B. calling QApplication::quit() here it makes move to the next event;
877 // // NOTE!!!! It can be useful for a batch mode on all events of one single file!!
878 // // TODO: An additional switch to the command line batch option should be implemented
879 // //QApplication::quit();
880 //
881 // //for the moment, we only quit VP1.
882 // //To quit the application completely, we have to call "MainWindow::close()"
883 // m_d->mainwindow->close();
885 //
886 // }
887 
888  // ***************************
889  // we now run all the things
890  // that need to be done
891  // after all tabs are drawn...
892  // ***************************
893  if ( hasAllActiveSystemsRefreshed(s->channel()) ) {
894 
895 
896  if (m_d->batchMode) {
897 
898  VP1Msg::messageDebug("we are in 'batch-mode'...");
899  VP1Msg::messageDebug("batchModeNEvents: " + QString::number(m_d->batchModeNEvents) + " - m_d->eventsProcessed: " + QString::number(m_d->eventsProcessed) );
900 
901  // saving the snapshot of the 3D window to a file
902  QString save_ok = saveSnaphsotToFile(s, true);
903  if (save_ok == "") {
904  VP1Msg::messageWarningAllRed("FAILED! The snapshot for the channel '" + s->channel()->name() + "' has not been saved!");
905  } else {
906  VP1Msg::message("OK! Snapshot saved to file: " + save_ok);
907  }
908 
909 
910  if (m_d->batchModeAllEvents) {
911  VP1Msg::messageWarningAllRed("******************************************************************");
912  VP1Msg::messageWarningAllRed("'batch mode' with 'all events' option. Moving to the next event...");
913  VP1Msg::messageWarningAllRed("******************************************************************");
914  // N.B. calling QApplication::quit() here it makes VP1 move to the next event;
915  QApplication::quit();
916  // Now, VP1ExecutionScheduler::executeNewEvent() will end, then VP1Gui::executeNewEvent() will end, then they will start again: first VP1Gui then VP1ExecutionScheduler.
917  } else if ( m_d->batchModeNEvents > 0 ) {
918  if ( m_d->batchModeNEvents == m_d->eventsProcessed+1) { // here we use +1 because this is performed after the creation of the event snapshot. //TODO: maybe we can move this to a more natural place, at the beginning or at the end of an event
919  VP1Msg::messageWarningAllRed("******************************************************************");
920  VP1Msg::messageWarningAllRed("'batch mode' with 'batch-n-events' option. Processed the " + QString::number(m_d->eventsProcessed+1) + " events set by the user. Now exiting VP1");
921  VP1Msg::messageWarningAllRed("******************************************************************");
922  m_d->mainwindow->close();
923  } else {
924  VP1Msg::messageWarningAllRed("'batch mode' with 'batch-n-events' option. Moving to the next event...");
925  // N.B. calling QApplication::quit() here it makes VP1 move to the next event;
926  QApplication::quit();
927  // Now, VP1ExecutionScheduler::executeNewEvent() will end, then VP1Gui::executeNewEvent() will end, then they will start again: first VP1Gui then VP1ExecutionScheduler.
928  }
929  }
930  else {
931  // We come here if the user did not choose to run batch mode on all events.
932  // Thus, we want to close VP1 completely.
933  // So, in order to do that, we have to call "MainWindow::close()"
934  VP1Msg::messageWarningRed("'batch mode'. Done. Now exiting VP1");
935  m_d->mainwindow->close();
936  }
937 
938 
939  }
940  }
941 }

◆ saveSnaphsotToFile()

QString VP1ExecutionScheduler::saveSnaphsotToFile ( IVP1System s,
bool  batch = false 
)

Definition at line 944 of file VP1ExecutionScheduler.cxx.

945 {
946  QString chnlname = s->name().toLower();
947  VP1Msg::messageDebug("VP1ExecutionScheduler::saveSnaphsotToFile() - taking the snapshot of the channel " + chnlname );
948 
949  QString currentsaveimagepath = VP1Settings::defaultFileSelectDirectory() + QDir::separator();
950 
951 
952  if (batch) {
953 
954  VP1Msg::messageDebug("Note: 'batch-mode'");
955 
956 
957  // A FOLDER CONTAINER
958  QString folderName = "";
959 
960  // check if use specified an output folder for the batch job
961  QString batchOutFolder = VP1QtUtils::environmentVariableValue("VP1_BATCHMODE_OUT_FOLDER"); // ::getenv("VP1_BATCHMODE");
962  if ( ! (batchOutFolder == "") ) {
963  VP1Msg::messageDebug("Setting 'batch' output folder from user's settings");
964  folderName = batchOutFolder;
965  }
966  else
967  folderName = "atlas_vp1_batch_images";
968 
969  // check if the folder already exists, if not make a new folder
970  QDir dir(folderName);
971  if (!dir.exists()) {
972  dir.mkpath(".");
973  }
974 
975  QString folder;
976  if (folderName.startsWith("/"))
977  folder = folderName + QDir::separator();
978  else
979  folder = currentsaveimagepath + folderName + QDir::separator();
980 
981  VP1Msg::messageDebug("folder set: " + folder);
982 
983 
984  // EVENT INFO AND TIMESTAMP
985 
986  QString runnumb = QString::number(m_d->mainwindow->getRunNumber());
987  QString evnumb = QString::number(m_d->mainwindow->getEventNumber());
988  QString evtimestamp = QString::number(m_d->mainwindow->getEventTimestamp());
989 
990  time_t t_evttimestamp = m_d->mainwindow->getEventTimestamp();
991  tm * human_evtimestamp = localtime(&t_evttimestamp);
992 
993  std::ostringstream h_evtimestamp_ostri;
994  h_evtimestamp_ostri << 1900 + human_evtimestamp->tm_year
995  << "-" << 1 + human_evtimestamp->tm_mon // tm_mon is in the range [0, 11], so 1 must be added to get real months
996  << "-" << human_evtimestamp->tm_mday
997  << "T" << human_evtimestamp->tm_hour << "-" << human_evtimestamp->tm_min << "-" << human_evtimestamp->tm_sec << "CEST";
998 
999  std::string h_evtimestamp_str = h_evtimestamp_ostri.str();
1000  QString h_evtimestamp = QString::fromStdString(h_evtimestamp_str);
1001 
1002  // IMAGE TIMESTAMP
1003 
1004  time_t t_timestamp = time(0); // get time now;
1005  tm *ltm = localtime(&t_timestamp);
1006 
1007  // print various components of tm structure.
1008  VP1Msg::messageDebug( "Year: "+ QString::number(1900 + ltm->tm_year)
1009  + " - " + "Month: " + QString::number(1 + ltm->tm_mon) + " - " // tm_mon is in the range [0, 11], so 1 must be added to get real months
1010  + "Day: " + QString::number(ltm->tm_mday)
1011  + " - " "Time: " + QString::number(ltm->tm_hour) + ":" + QString::number(ltm->tm_min) + ":" + QString::number(ltm->tm_sec) + "CEST");
1012 
1013  std::ostringstream ostri_unix;
1014  ostri_unix << t_timestamp;
1015 
1016  std::ostringstream ostri;
1017  ostri << 1900 + ltm->tm_year
1018  << "-" << 1 + ltm->tm_mon // tm_mon is in the range [0, 11], so 1 must be added to get real months
1019  << "-" << ltm->tm_mday
1020  << "T" << ltm->tm_hour << "-" << ltm->tm_min << "-" << ltm->tm_sec << "CEST";
1021 
1022  std::string unixTimestamp = ostri_unix.str();
1023  std::string humanTimestamp = ostri.str();
1024  QString q_unixTimestamp = QString::fromStdString(unixTimestamp);
1025  QString q_humanTimestamp = QString::fromStdString(humanTimestamp);
1026  VP1Msg::messageDebug("Unix timestamp: " + q_unixTimestamp );
1027  VP1Msg::messageDebug("'human readable' timestamp: " + q_humanTimestamp );
1028 
1029  /* channel's name is the name of the last channel updated by the executer,
1030  * i.e. the name changes according to the order the channels are refreshed.
1031  * Thus, we don't use the channel's name in the filename,
1032  * because it could be misleading.
1033  */
1034  //QString filename = currentsaveimagepath + "vp1_" + chnlname + "_snapshot_" + q_humanTimestamp + ".png";
1035  QString filename = folder + "vp1_batch_snapshot_r" + runnumb + "_ev" + evnumb + "_evtime_H" + h_evtimestamp + "_U" + evtimestamp + "___imgtime_H" + q_humanTimestamp + "_U" + q_unixTimestamp + ".png";
1036 
1037  // taking the actual snapshot
1038  QPixmap pm = s->channel()->getSnapshot();
1039  if (pm.isNull()) {
1040  VP1Msg::messageDebug("QPixmap is null! returning...");
1041  return QString();
1042  }
1043 
1044  // saving to file
1045  pm.save(filename);
1046 
1047  // save last-saved image filename to working dir
1048  QString latestImageFileName = currentsaveimagepath + QString("latest_vp1image");
1049  QFile latestImage(latestImageFileName);
1050  if(latestImage.exists() && !latestImage.remove())
1051  throw std::runtime_error("Unable to overwrite the existing latest image file");
1052  if(!latestImage.open(QIODevice::WriteOnly | QIODevice::Text))
1053  throw std::runtime_error("Unable to create new latest image file");
1054  latestImage.write(filename.toStdString().c_str());
1055  latestImage.close();
1056 
1057 
1058  return filename;
1059  }
1060 
1061  // default exit
1062  return QString();//filename;
1063 
1064 }

◆ setCruiseMode()

void VP1ExecutionScheduler::setCruiseMode ( const CruiseMode m)

Definition at line 1312 of file VP1ExecutionScheduler.cxx.

1313 {
1314  if (m_d->cruisemode == m)
1315  return;
1316  m_d->cruisemode = m;
1317 
1319 
1320  m_d->initCruise();
1321 
1322 }

◆ setNextRequestedEventFile()

void VP1ExecutionScheduler::setNextRequestedEventFile ( const QString &  f)

Definition at line 584 of file VP1ExecutionScheduler.cxx.

585 {
587 }

◆ startRefreshQueueIfAppropriate

void VP1ExecutionScheduler::startRefreshQueueIfAppropriate ( )
privateslot

Definition at line 791 of file VP1ExecutionScheduler.cxx.

792 {
793  if (!m_d->goingtonextevent&&!m_d->refreshtimer->isActive())
794  m_d->refreshtimer->start();
795 }

◆ systemNeedErase

void VP1ExecutionScheduler::systemNeedErase ( )
privateslot

Definition at line 734 of file VP1ExecutionScheduler.cxx.

734  {
735  IVP1System*s = static_cast<IVP1System*>(sender());
736  assert(s);
737  if (m_d->currentsystemrefreshing!=s) {
738  eraseSystem(s);
739  } else {
740  // cppcheck-suppress assertWithSideEffect
741  assert(s->isRefreshing());
743  }
744 }

◆ uncreateAndDelete()

void VP1ExecutionScheduler::uncreateAndDelete ( IVP1ChannelWidget cw)

Definition at line 1098 of file VP1ExecutionScheduler.cxx.

1099 {
1100  assert(cw->state()==IVP1ChannelWidget::READY);
1101  if (m_d->currentsystemrefreshing&&cw->systems().find(m_d->currentsystemrefreshing)!=cw->systems().end()) {
1104  } else {
1106  }
1107 }

◆ updateProgressBarDuringRefresh

void VP1ExecutionScheduler::updateProgressBarDuringRefresh ( )
privateslot

Definition at line 566 of file VP1ExecutionScheduler.cxx.

567 {
569  return;
570  double timing=(m_d->prioritiser->elapsedTiming_Refresh())*0.95;//The *0.95 is to give a smoother overall impression.
572  return;
573  m_d->pb->setValue(static_cast<int>((m_d->calctimethisevent+timing)*10.0));
574 }

◆ userRequestedFiles()

QStringList VP1ExecutionScheduler::userRequestedFiles ( )

Definition at line 1371 of file VP1ExecutionScheduler.cxx.

1372 {
1373  return m_d->mainwindow->userRequestedFiles();
1374 }

Member Data Documentation

◆ m_d

Imp* VP1ExecutionScheduler::m_d
private

Definition at line 117 of file VP1ExecutionScheduler.h.


The documentation for this class was generated from the following files:
VP1ExecutionScheduler::Imp::allSystemsRefreshed
bool allSystemsRefreshed
Definition: VP1ExecutionScheduler.cxx:150
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
VP1ExecutionScheduler::Imp::eventsProcessed
long int eventsProcessed
Definition: VP1ExecutionScheduler.cxx:138
base
std::string base
Definition: hcg.cxx:78
VP1ExecutionScheduler::refreshSystem
void refreshSystem(IVP1System *)
Definition: VP1ExecutionScheduler.cxx:804
VP1ExecutionScheduler::NONE
@ NONE
Definition: VP1ExecutionScheduler.h:49
VP1TabManager::showNextTab
void showNextTab()
Definition: VP1TabManager.cxx:1108
python.CaloRecoConfig.f
f
Definition: CaloRecoConfig.py:127
VP1QtUtils::setEnvironmentVariable
static void setEnvironmentVariable(const QString &name, const QString &content)
Definition: VP1QtUtils.cxx:146
VP1Prioritiser::nextErasedActiveSystemByPriority
IVP1System * nextErasedActiveSystemByPriority()
Definition: VP1Prioritiser.cxx:208
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
max
#define max(a, b)
Definition: cfImp.cxx:41
VP1ExecutionScheduler::m_d
Imp * m_d
Definition: VP1ExecutionScheduler.h:116
VP1Prioritiser::getSystemsToEraseByPriority
QList< IVP1System * > getSystemsToEraseByPriority()
Definition: VP1Prioritiser.cxx:218
VP1ExecutionScheduler::Imp::mainwindow
VP1MainWindow * mainwindow
Definition: VP1ExecutionScheduler.cxx:136
VP1AvailEvtsHttps
Definition: VP1AvailEvtsHttps.h:28
VP1BatchUtilities
Definition: VP1BatchUtilities.h:25
python.base_data.auth
auth
Definition: base_data.py:57
VP1ExecutionScheduler::Imp::warnIfWidgetsAlive
static void warnIfWidgetsAlive()
Definition: VP1ExecutionScheduler.cxx:1153
IVP1System::CONSTRUCTED
@ CONSTRUCTED
Definition: IVP1System.h:143
VP1ExecutionScheduler::Imp::batchModeRandomConfig
bool batchModeRandomConfig
Definition: VP1ExecutionScheduler.cxx:143
VP1ExecutionScheduler::actualUncreateAndDelete
void actualUncreateAndDelete(IVP1ChannelWidget *)
Definition: VP1ExecutionScheduler.cxx:1110
CutsMETMaker::accept
StatusCode accept(const xAOD::Muon *mu)
Definition: CutsMETMaker.cxx:18
mergePhysValFiles.start
start
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:14
VP1MainWindow::replaceConfigurationFile
void replaceConfigurationFile(QString file)
Definition: VP1MainWindow.cxx:1415
fillPileUpNoiseLumi.connect
string connect
Definition: fillPileUpNoiseLumi.py:70
VP1MainWindow::getEventNumber
unsigned long long getEventNumber()
Definition: VP1MainWindow.h:151
skel.it
it
Definition: skel.GENtoEVGEN.py:423
VP1ExecutionScheduler::refreshingStatusChanged
void refreshingStatusChanged(bool)
VP1ExecutionScheduler::Imp::calctimethisevent
double calctimethisevent
Definition: VP1ExecutionScheduler.cxx:155
VP1ExecutionScheduler::Imp::availEvents
VP1AvailEvents * availEvents
Definition: VP1ExecutionScheduler.cxx:146
VP1Msg::debug
static bool debug()
Definition: VP1Msg.h:32
IVP1ChannelWidget::deleteControllers
void deleteControllers()
Definition: IVP1ChannelWidget.cxx:161
VP1ExecutionScheduler::saveSnaphsotToFile
QString saveSnaphsotToFile(IVP1System *s, bool batch=false)
Definition: VP1ExecutionScheduler.cxx:944
VP1Msg::messageWarningAllRed
static void messageWarningAllRed(const QString &str, IVP1System *sys=0)
Definition: VP1Msg.cxx:70
VP1AvailEvtsHttps::fileinfoLocation
QString fileinfoLocation()
Definition: VP1AvailEvtsHttps.cxx:148
VP1ExecutionScheduler::channelCreated
void channelCreated(IVP1ChannelWidget *)
Definition: VP1ExecutionScheduler.cxx:767
VP1ExecutionScheduler::Imp::eraseJustAfterRefresh
bool eraseJustAfterRefresh
Definition: VP1ExecutionScheduler.cxx:161
LArCellConditions.argv
argv
Definition: LArCellConditions.py:112
IVP1ChannelWidget::create
virtual void create()
Definition: IVP1ChannelWidget.cxx:124
Preparation.batch
batch
Definition: Preparation.py:50
VP1ExecutionScheduler::Imp::batchModeAllEvents
bool batchModeAllEvents
Definition: VP1ExecutionScheduler.cxx:141
VP1AthenaPtrs::setPointers
static void setPointers(StoreGateSvc *eventStore, StoreGateSvc *detectorStore, ISvcLocator *, IToolSvc *)
Definition: VP1AthenaPtrs.cxx:23
VP1ExecutionScheduler::Imp::scheduler
VP1ExecutionScheduler * scheduler
Definition: VP1ExecutionScheduler.cxx:134
VP1ExecutionScheduler::Imp::refreshtimer
QTimer * refreshtimer
Definition: VP1ExecutionScheduler.cxx:148
VP1ExecutionScheduler::Imp::performPostRefreshCruiseActions
void performPostRefreshCruiseActions(IVP1ChannelWidget *cw)
Definition: VP1ExecutionScheduler.cxx:1232
ReweightUtils.message
message
Definition: ReweightUtils.py:15
VP1MainWindow::tabManager
VP1TabManager * tabManager() const
Definition: VP1MainWindow.h:146
TruthTest.itE
itE
Definition: TruthTest.py:25
VP1QtUtils::environmentVariableValue
static QString environmentVariableValue(const QString &name)
Definition: VP1QtUtils.cxx:117
VP1ExecutionScheduler::EVENT
@ EVENT
Definition: VP1ExecutionScheduler.h:51
VP1ExecutionScheduler::updateProgressBarDuringRefresh
void updateProgressBarDuringRefresh()
Definition: VP1ExecutionScheduler.cxx:566
VP1ExecutionScheduler::systemNeedErase
void systemNeedErase()
Definition: VP1ExecutionScheduler.cxx:734
VP1ExecutionScheduler::Imp::pbtimer
QTimer * pbtimer
Definition: VP1ExecutionScheduler.cxx:158
VP1ExecutionScheduler::Imp::cruisemode
CruiseMode cruisemode
Definition: VP1ExecutionScheduler.cxx:164
VP1ExecutionScheduler::processSystemForRefresh
void processSystemForRefresh()
Definition: VP1ExecutionScheduler.cxx:747
VP1ExecutionScheduler::Imp::allVisibleRefreshed
bool allVisibleRefreshed() const
Definition: VP1ExecutionScheduler.cxx:1214
IVP1System
Definition: IVP1System.h:36
VP1MainWindow::loadConfigurationFromFile
void loadConfigurationFromFile(QString file)
Definition: VP1MainWindow.cxx:1410
VP1ExecutionScheduler::Imp::batchUtilities
VP1BatchUtilities * batchUtilities
Definition: VP1ExecutionScheduler.cxx:144
trigDumpTimers.timing
def timing(hist)
Definition: trigDumpTimers.py:13
VP1Settings::defaultFileSelectDirectory
static QString defaultFileSelectDirectory()
Definition: VP1Settings.cxx:22
Trk::active
@ active
Definition: Layer.h:48
VP1MainWindow::request_cruisemodechange
void request_cruisemodechange()
Definition: VP1MainWindow.cxx:1475
VP1ExecutionScheduler::Imp::batchMode
bool batchMode
Definition: VP1ExecutionScheduler.cxx:140
IVP1ChannelWidget::uncreate
virtual void uncreate()
Definition: IVP1ChannelWidget.cxx:155
VP1QtUtils::environmentVariableIsOn
static bool environmentVariableIsOn(const QString &name)
Definition: VP1QtUtils.cxx:127
lumiFormat.i
int i
Definition: lumiFormat.py:92
VP1Prioritiser
Definition: VP1Prioritiser.h:22
IVP1ChannelWidget::CONSTRUCTED
@ CONSTRUCTED
Definition: IVP1ChannelWidget.h:130
VP1ExecutionScheduler::Imp::prioritiser
VP1Prioritiser * prioritiser
Definition: VP1ExecutionScheduler.cxx:135
VP1MainWindow::okToProceedToNextEvent
bool okToProceedToNextEvent() const
Definition: VP1MainWindow.cxx:876
VP1HelperClassBase::warnUndeletedInstances
static void warnUndeletedInstances()
Definition: VP1HelperClassBase.cxx:183
VP1ExecutionScheduler::performCruise
void performCruise()
Definition: VP1ExecutionScheduler.cxx:1327
IVP1ChannelWidget::UNCREATED
@ UNCREATED
Definition: IVP1ChannelWidget.h:130
test_pyathena.parent
parent
Definition: test_pyathena.py:15
VP1Prioritiser::endTiming_Refresh
double endTiming_Refresh()
Definition: VP1Prioritiser.cxx:259
IVP1System::REFRESHED
@ REFRESHED
Definition: IVP1System.h:143
IVP1ChannelWidget::systems
const std::set< IVP1System * > & systems()
Definition: IVP1ChannelWidget.cxx:231
VP1QtUtils::environmentVariableIsSet
static bool environmentVariableIsSet(const QString &name)
Definition: VP1QtUtils.cxx:108
VP1ExecutionScheduler::Imp::currentsystemrefreshing
IVP1System * currentsystemrefreshing
Definition: VP1ExecutionScheduler.cxx:149
VP1ExecutionScheduler::TAB
@ TAB
Definition: VP1ExecutionScheduler.h:50
VP1MainWindow::nextEvent
void nextEvent()
Definition: VP1MainWindow.cxx:883
VP1QtUtils::expertSettingIsOn
static bool expertSettingIsOn(const QString &type, const QString &name)
Definition: VP1QtUtils.cxx:60
DQHistogramMergeRegExp.argc
argc
Definition: DQHistogramMergeRegExp.py:20
VP1ExecutionScheduler::channelUncreated
void channelUncreated(IVP1ChannelWidget *)
Definition: VP1ExecutionScheduler.cxx:783
VP1ExecutionScheduler::Imp::cruisetimer
QTimer * cruisetimer
Definition: VP1ExecutionScheduler.cxx:165
VP1ExecutionScheduler::Imp::goingtonextevent
bool goingtonextevent
Definition: VP1ExecutionScheduler.cxx:151
IVP1System::UNCREATED
@ UNCREATED
Definition: IVP1System.h:143
calibdata.exit
exit
Definition: calibdata.py:236
VP1TabManager::selectedChannelWidget
IVP1ChannelWidget * selectedChannelWidget() const
Definition: VP1TabManager.cxx:465
IVP1ChannelWidget::setState
void setState(const State &)
Definition: IVP1ChannelWidget.cxx:108
VP1TabManager::allChannels
QList< IVP1ChannelWidget * > allChannels() const
Definition: VP1TabManager.cxx:1455
DeMoScan.runnumber
runnumber
Definition: DeMoScan.py:266
beamspotman.dir
string dir
Definition: beamspotman.py:623
min
#define min(a, b)
Definition: cfImp.cxx:40
VP1MainWindow::channelManager
VP1ChannelManager * channelManager() const
Definition: VP1MainWindow.h:145
VP1ExecutionScheduler::Imp::pb
QProgressBar * pb
Definition: VP1ExecutionScheduler.cxx:154
VP1Authenticator
Definition: VP1Authenticator.h:29
IVP1ChannelWidget
Definition: IVP1ChannelWidget.h:34
IVP1System::ON
@ ON
Definition: IVP1System.h:144
VP1ExecutionScheduler::Imp::globalEventFilter
GlobalEventFilter * globalEventFilter
Definition: VP1ExecutionScheduler.cxx:131
VP1ExecutionScheduler::Imp::nextRequestedEvent
QString nextRequestedEvent
Definition: VP1ExecutionScheduler.cxx:174
VP1ExecutionScheduler
Definition: VP1ExecutionScheduler.h:42
VP1AthenaPtrs::eventStore
static StoreGateSvc * eventStore()
Definition: VP1AthenaPtrs.h:27
VP1MainWindow::userRequestedExit
bool userRequestedExit()
Definition: VP1MainWindow.h:148
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
IVP1ChannelWidget::state
State state() const
Definition: IVP1ChannelWidget.cxx:102
CaloCellTimeCorrFiller.folderName
string folderName
Definition: CaloCellTimeCorrFiller.py:20
VP1ExecutionScheduler::Imp::currentrefreshsystemestimate
double currentrefreshsystemestimate
Definition: VP1ExecutionScheduler.cxx:156
python.selection.number
number
Definition: selection.py:20
VP1MainWindow::getEventTimestamp
int getEventTimestamp()
Definition: VP1MainWindow.h:152
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
pmontree.opt
opt
Definition: pmontree.py:16
VP1Prioritiser::beginTiming_Refresh
double beginTiming_Refresh(IVP1System *)
Definition: VP1Prioritiser.cxx:242
VP1MainWindow::progressbar
QProgressBar * progressbar
Definition: VP1MainWindow.h:195
VP1ExecutionScheduler::Imp::batchModeNEvents
int batchModeNEvents
Definition: VP1ExecutionScheduler.cxx:142
python.PyKernel.init
def init(v_theApp, v_rootStream=None)
Definition: PyKernel.py:45
VP1ExecutionScheduler::Imp::postponedUncreateAndDeleteCW
IVP1ChannelWidget * postponedUncreateAndDeleteCW
Definition: VP1ExecutionScheduler.cxx:162
VP1ExecutionScheduler::startRefreshQueueIfAppropriate
void startRefreshQueueIfAppropriate()
Definition: VP1ExecutionScheduler.cxx:791
VP1ExecutionScheduler::hasAllActiveSystemsRefreshed
bool hasAllActiveSystemsRefreshed(IVP1ChannelWidget *) const
Definition: VP1ExecutionScheduler.cxx:1186
unused
void unused(Args &&...)
Definition: VP1ExpertSettings.cxx:39
VP1Msg::messageDebug
static void messageDebug(const QString &)
Definition: VP1Msg.cxx:39
qstringlistToVecString
std::vector< std::string > qstringlistToVecString(QStringList list)
Definition: VP1ExecutionScheduler.cxx:86
VP1Prioritiser::elapsedTiming_Refresh
double elapsedTiming_Refresh()
Definition: VP1Prioritiser.cxx:253
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
VP1ExecutionScheduler::Imp::skipEvent
bool skipEvent
Definition: VP1ExecutionScheduler.cxx:176
IVP1ChannelWidget::setCanRegister
void setCanRegister(const bool &controller, const bool &system)
Definition: IVP1ChannelWidget.cxx:299
VP1Msg::message
static void message(const QString &, IVP1System *sys=0)
Definition: VP1Msg.cxx:30
VP1MainWindow::getRunNumber
int getRunNumber()
Definition: VP1MainWindow.h:150
IVP1ChannelWidget::READY
@ READY
Definition: IVP1ChannelWidget.h:130
VP1TabManager::setTabCruiseMode
void setTabCruiseMode(const bool &)
Definition: VP1TabManager.cxx:1485
CaloCellTimeCorrFiller.filename
filename
Definition: CaloCellTimeCorrFiller.py:24
RunTileMonitoring.triggerType
triggerType
Definition: RunTileMonitoring.py:162
VP1ExecutionScheduler::Imp::allSoonVisibleRefreshed
bool allSoonVisibleRefreshed() const
Definition: VP1ExecutionScheduler.cxx:1223
CaloCondBlobAlgs_fillNoiseFromASCII.folder
folder
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:56
VP1QtApplication
Definition: VP1QtApplication.h:43
IVP1ChannelWidget::name
const QString & name() const
Definition: IVP1ChannelWidget.cxx:180
VP1MainWindow::setRunEvtNumber
void setRunEvtNumber(const int &runnumber, const unsigned long long &eventnumber, const unsigned &triggerType=0, const unsigned &time=0, const bool &printmessage=true)
Definition: VP1MainWindow.cxx:974
VP1ExecutionScheduler::eraseSystem
void eraseSystem(IVP1System *)
Definition: VP1ExecutionScheduler.cxx:713
VP1AvailEvents
Definition: VP1AvailEvents.h:25
VP1Msg::verbose
static bool verbose()
Definition: VP1Msg.h:31
VP1ExecutionScheduler::Imp::initCruise
void initCruise()
Definition: VP1ExecutionScheduler.cxx:1278
VP1ExecutionScheduler::VP1ExecutionScheduler
VP1ExecutionScheduler(QObject *parent, StoreGateSvc *eventStore, StoreGateSvc *detStore, ISvcLocator *svcLocator, IToolSvc *toolSvc, VP1AvailEvents *availEvents)
Definition: VP1ExecutionScheduler.cxx:233
VP1ExecutionScheduler::BOTH
@ BOTH
Definition: VP1ExecutionScheduler.h:52
VP1MainWindow::userRequestedFiles
QStringList userRequestedFiles()
Definition: VP1MainWindow.cxx:1868
VP1Msg::messageWarningRed
static void messageWarningRed(const QString &str, IVP1System *sys=0)
Definition: VP1Msg.cxx:57
VP1AthenaPtrs::detectorStore
static StoreGateSvc * detectorStore()
Definition: VP1AthenaPtrs.h:28
VP1BatchUtilities::getRandomConfigFile
std::string getRandomConfigFile()
Definition: VP1BatchUtilities.cxx:40
VP1MainWindow::goToNextEvent
void goToNextEvent()
Definition: VP1MainWindow.cxx:898
VP1AvailEvtsHttp
Definition: VP1AvailEvtsHttp.h:24
VP1MainWindow
Definition: VP1MainWindow.h:82
python.TrigInDetArtSteps.timeout
timeout
Definition: TrigInDetArtSteps.py:35
VP1AvailEvtsLocalDir
Definition: VP1AvailEvtsLocalDir.h:24
VP1MainWindow::mustQuit
bool mustQuit() const
Definition: VP1MainWindow.cxx:564
IVP1System::OFF
@ OFF
Definition: IVP1System.h:144
IVP1System::ERASED
@ ERASED
Definition: IVP1System.h:143
VP1ExecutionScheduler::Imp::cruisetab_waitingtoproceed
bool cruisetab_waitingtoproceed
Definition: VP1ExecutionScheduler.cxx:170
VP1ExecutionScheduler::Imp::updateProgressBar
void updateProgressBar()
Definition: VP1ExecutionScheduler.cxx:549