CMS 3D CMS Logo

List of all members | Public Member Functions | Private Types | Private Member Functions | Private Attributes
FWFFLooper Class Reference

#include <FWFFLooper.h>

Inheritance diagram for FWFFLooper:
CmsShowMainBase edm::EDLooperBase

Public Member Functions

void attachTo (edm::ActivityRegistry &) override
 Override this method if you need to monitor the state of the processing. More...
 
void autoLoadNewEvent () override
 
void beginRun (const edm::Run &, const edm::EventSetup &) override
 
void checkPosition () override
 
void display (const std::string &info="")
 
edm::EDLooperBase::Status duringLoop (const edm::Event &, const edm::EventSetup &, edm::ProcessingController &) override
 
edm::EDLooperBase::Status endOfLoop (const edm::EventSetup &, unsigned int) override
 
 FWFFLooper (const edm::ParameterSet &)
 
TEveMagField * getMagField ()
 
void postBeginJob ()
 
void postEndJob ()
 
void quit () override
 
void remakeGeometry (const DisplayGeomRecord &dgRec)
 
void requestChanges (const std::string &, const edm::ParameterSet &)
 
void setupFieldForPropagator (TEveTrackPropagator *prop)
 
void showPathsGUI (const TGWindow *p)
 
void startingNewLoop (unsigned int) override
 
void stopPlaying () override
 
 ~FWFFLooper () override
 
- Public Member Functions inherited from CmsShowMainBase
FWModelChangeManagerchangeManager ()
 
virtual void checkKeyBindingsOnPLayEventsStateChanged ()
 
 CmsShowMainBase ()
 
FWColorManagercolorManager ()
 
const char * configFilename () const
 
FWConfigurationManagerconfigurationManager ()
 
void doFirstEvent ()
 
void doLastEvent ()
 
void doNextEvent ()
 
void doPreviousEvent ()
 
void draw ()
 
FWEventItemsManagereiManager ()
 
bool forward () const
 
const std::string & geometryFilename (void)
 
FWGeometrygetGeom ()
 
void goToRunEvent (edm::RunNumber_t, edm::LuminosityBlockNumber_t, edm::EventNumber_t)
 
FWGUIManagerguiManager ()
 
bool isPlaying () const
 
void loadGeometry ()
 
bool loop () const
 
FWModelChangeManagermodelChangeManager ()
 
void partialLoadConfiguration (const std::string &config)
 
void partialWriteToConfigFile (const std::string &config)
 
void playBackward ()
 
void playForward ()
 
void registerPhysicsObject (const FWPhysicsObjectDesc &iItem)
 
void reloadConfiguration (const std::string &config)
 
FWSelectionManagerselectionManager ()
 
void setAutoSaveAllViewsFormat (const std::string &fmt)
 
void setAutoSaveAllViewsHeight (int x)
 
void setConfigFilename (const std::string &f)
 
void setGeometryFilename (const std::string &filename)
 
void setPlayDelay (Float_t val)
 
void setPlayLoop ()
 
void setSimGeometryFilename (const std::string &filename, const std::string &geoname)
 
void setup (FWNavigatorBase *navigator, fireworks::Context *context, FWJobMetadataManager *metadataManager)
 
void setupActions ()
 
void setupAutoLoad (float x)
 
void setupConfiguration ()
 
void setupDebugSupport ()
 
void setupViewManagers ()
 
void startAutoLoadTimer ()
 
CmsShowTaskExecutorstartupTasks ()
 
void stopAutoLoadTimer ()
 
void unsetPlayLoop ()
 
FWViewManagerManagerviewManager ()
 
void writePartialToConfigFile ()
 
void writeToConfigFile (const std::string &config)
 
void writeToCurrentConfigFile ()
 
virtual ~CmsShowMainBase () noexcept(false)
 
- Public Member Functions inherited from edm::EDLooperBase
void beginOfJob (EventSetupImpl const &)
 
virtual void beginOfJob (EventSetup const &)
 
virtual void beginOfJob ()
 
void copyInfo (ScheduleInfo const &)
 
void doBeginLuminosityBlock (LuminosityBlockPrincipal &, EventSetupImpl const &, ProcessContext *)
 
void doBeginRun (RunPrincipal &, EventSetupImpl const &, ProcessContext *)
 
Status doDuringLoop (EventPrincipal &eventPrincipal, EventSetupImpl const &es, ProcessingController &, StreamContext *)
 
void doEndLuminosityBlock (LuminosityBlockPrincipal &, EventSetupImpl const &, ProcessContext *)
 
Status doEndOfLoop (EventSetupImpl const &es)
 
void doEndRun (RunPrincipal &, EventSetupImpl const &, ProcessContext *)
 
void doStartingNewLoop ()
 
 EDLooperBase ()
 
 EDLooperBase (EDLooperBase const &)=delete
 
virtual void endOfJob ()
 
virtual std::set< eventsetup::EventSetupRecordKeymodifyingRecords () const
 
EDLooperBaseoperator= (EDLooperBase const &)=delete
 
void prepareForNextLoop (eventsetup::EventSetupProvider *esp)
 
void setActionTable (ExceptionToActionTable const *actionTable)
 
void setModuleChanger (ModuleChanger *)
 
virtual ~EDLooperBase () noexcept(false)
 

Private Types

typedef std::map< std::string, edm::ParameterSetModuleChanges
 

Private Member Functions

 FWFFLooper (const FWFFLooper &)
 
void loadDefaultGeometryFile (void)
 
const FWFFLooperoperator= (const FWFFLooper &)
 

Private Attributes

bool m_AllowStep
 
edm::Service< FWFFHelperm_appHelper
 
bool m_autoReload
 
std::unique_ptr< fireworks::Contextm_context
 
TEveManager * m_EveManager
 
bool m_firstTime
 
edm::ESWatcher< DisplayGeomRecordm_geomWatcher
 
bool m_isFirstEvent
 
bool m_isLastEvent
 
TEveMagField * m_MagField
 
std::unique_ptr< FWFFMetadataManagerm_metadataManager
 
std::unique_ptr< FWFFNavigatorm_navigator
 
edm::EventID m_nextEventId
 
FWPathsPopupm_pathsGUI
 
TRint * m_Rint
 
ModuleChanges m_scheduledChanges
 
bool m_ShowEvent
 

Additional Inherited Members

- Public Types inherited from edm::EDLooperBase
enum  Status { kContinue, kStop }
 
- Protected Member Functions inherited from CmsShowMainBase
fireworks::Contextcontext ()
 
virtual void eventChangedImp ()
 
void eventChangedSlot ()
 
void sendVersionInfo ()
 
- Protected Member Functions inherited from edm::EDLooperBase
ModuleChangermoduleChanger ()
 This only returns a non-zero value during the call to endOfLoop. More...
 
ScheduleInfo const * scheduleInfo () const
 This returns a non-zero value after the constructor has been called. More...
 

Detailed Description

Definition at line 42 of file FWFFLooper.h.

Member Typedef Documentation

typedef std::map<std::string, edm::ParameterSet> FWFFLooper::ModuleChanges
private

Definition at line 102 of file FWFFLooper.h.

Constructor & Destructor Documentation

FWFFLooper::FWFFLooper ( const edm::ParameterSet )
FWFFLooper::~FWFFLooper ( )
override

Definition at line 183 of file FWFFLooper.cc.

183 { delete m_MagField; }
TEveMagField * m_MagField
Definition: FWFFLooper.h:95
FWFFLooper::FWFFLooper ( const FWFFLooper )
private

Member Function Documentation

void FWFFLooper::attachTo ( edm::ActivityRegistry )
overridevirtual

Override this method if you need to monitor the state of the processing.

Reimplemented from edm::EDLooperBase.

Definition at line 175 of file FWFFLooper.cc.

References postEndJob(), FWPathsPopup::postModuleEvent(), FWPathsPopup::preModuleEvent(), edm::ActivityRegistry::watchPostEndJob(), edm::ActivityRegistry::watchPostModuleEvent(), and edm::ActivityRegistry::watchPreModuleEvent().

175  {
176  m_pathsGUI = new FWPathsPopup(this, guiManager());
177 
178  ar.watchPostModuleEvent(m_pathsGUI, &FWPathsPopup::postModuleEvent);
179  ar.watchPreModuleEvent(m_pathsGUI, &FWPathsPopup::preModuleEvent);
180  ar.watchPostEndJob(this, &FWFFLooper::postEndJob);
181 }
void preModuleEvent(edm::StreamContext const &, edm::ModuleCallingContext const &)
FWGUIManager * guiManager()
FWPathsPopup * m_pathsGUI
Definition: FWFFLooper.h:100
void postEndJob()
Definition: FWFFLooper.cc:210
void postModuleEvent(edm::StreamContext const &, edm::ModuleCallingContext const &)
void FWFFLooper::autoLoadNewEvent ( )
overridevirtual

This actually needs to be different from the standalone case because nextEvent() / previousEvent() will immediately interrupt the GUI event loop and fall back to the looper.

Implements CmsShowMainBase.

Definition at line 237 of file FWFFLooper.cc.

References heppy_loop::loop, and CmsShowMainBase::stopPlaying().

237  {
239  bool reachedEnd = (forward() && m_isLastEvent) || (!forward() && m_isFirstEvent);
240 
241  if (!reachedEnd || loop()) {
242  // Will exit the loop here!
243  m_autoReload = true;
244  forward() ? m_navigator->nextEvent() : m_navigator->previousEvent();
245  } else {
246  m_autoReload = false;
250  }
251 }
bool m_isLastEvent
Definition: FWFFLooper.h:107
FWGUIManager * guiManager()
void enableActions(bool enable=true)
virtual void stopPlaying()
bool loop() const
bool m_autoReload
Definition: FWFFLooper.h:105
CmsShowMainFrame * getMainFrame() const
Definition: FWGUIManager.h:196
bool m_isFirstEvent
Definition: FWFFLooper.h:106
std::unique_ptr< FWFFNavigator > m_navigator
Definition: FWFFLooper.h:88
bool forward() const
void enableComplexNavigation(bool enable=true)
void FWFFLooper::beginRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
override

Definition at line 264 of file FWFFLooper.cc.

References edm::ConditionsInRunBlock::BAvgCurrent, cppFunctionSkipper::exception, edm::EventSetup::find(), fwLog, edm::EventSetup::get(), edm::Run::getByLabel(), FWRecoGeometry::idToName, edm::HandleBase::isValid(), fwlog::kInfo, CmsShowMainBase::loadGeometry(), RunInfo::m_avg_current, edm::ESHandle< T >::product(), FWGUIManager::showEventFilterGUI(), and showPathsGUI().

264  {
265  // Check DisplayGeomRecord changes.
266  try {
267  m_geomWatcher.check(iSetup);
268  } catch (...) {
269  }
270 
271  // If the geometry was not picked up from a file, we try to get it from the
272  // EventSetup!
273  // FIXME: we need to check we execute only once because the view managers
274  // depend on geometry and they cannot be initialised more than once.
275  // This should actually be cleaned up so that the various view manager
276  // don't care about geometry.
277  // FIXME: we should actually be able to update the geometry when requested.
278  // this is not possible at the moment.
279  if (m_firstTime == true) {
280  if (m_context->getGeom() == nullptr) {
281  try {
282  guiManager()->updateStatus("Loading geometry...");
284  iSetup.get<FWRecoGeometryRecord>().get(geoh);
285  getGeom().initMap(geoh.product()->idToName);
286  m_context->setGeom(&(getGeom()));
287  } catch (const cms::Exception& exception) {
288  setGeometryFilename("cmsGeom10.root");
290  }
291  }
292 
295  setupActions();
296 
297  guiManager()->showEventFilterGUI_.connect(boost::bind(&FWFFLooper::showPathsGUI, this, _1));
298  guiManager()->setFilterButtonText("Show paths / CMSSW configuration editor");
300 
301  m_firstTime = false;
302  m_autoReload = false;
303  }
304 
305  float current = 18160.0f;
306  try {
308  // bool res = iRun.getByType(runCond);
309  bool res = iRun.getByLabel("conditionsInEdm", runCond);
310  if (res && runCond.isValid()) {
311  printf("Got current from conds in edm %f\n", runCond->BAvgCurrent);
312  current = runCond->BAvgCurrent;
313  } else {
314  printf("Could not extract run-conditions get-result=%d, is-valid=%d\n", res, runCond.isValid());
315 
316  auto rec = iSetup.find(edm::eventsetup::EventSetupRecordKey::makeKey<RunInfoRcd>());
317  if (rec) {
319  iSetup.get<RunInfoRcd>().get(sum);
320 
321  current = sum->m_avg_current;
322  printf("Got current from RunInfoRcd %f\n", sum->m_avg_current);
323  }
324  }
325  } catch (...) {
326  fwLog(fwlog::kInfo) << "ConditionsInRunBlock not available\n";
327  }
328  static_cast<CmsEveMagField*>(m_MagField)->SetFieldByCurrent(current);
329  context()->getField()->setFFFieldMag(m_MagField->GetMaxFieldMag());
330 }
edm::ESWatcher< DisplayGeomRecord > m_geomWatcher
Definition: FWFFLooper.h:109
std::optional< eventsetup::EventSetupRecordGeneric > find(const eventsetup::EventSetupRecordKey &iKey) const
Definition: EventSetup.h:162
bool getByLabel(std::string const &label, Handle< PROD > &result) const
Definition: Run.h:280
sigc::signal< void > filterButtonClicked_
Definition: FWGUIManager.h:202
FWGUIManager * guiManager()
void initMap(const FWRecoGeom::InfoMap &map)
Definition: FWGeometry.cc:199
TEveMagField * m_MagField
Definition: FWFFLooper.h:95
void updateStatus(const char *status)
Definition: Electron.h:6
FWRecoGeom::InfoMap idToName
void setGeometryFilename(const std::string &filename)
void setFFFieldMag(float)
Definition: FWMagField.cc:190
FWMagField * getField() const
Definition: Context.h:66
bool m_autoReload
Definition: FWFFLooper.h:105
sigc::signal< void, const TGWindow * > showEventFilterGUI_
Definition: FWGUIManager.h:203
fireworks::Context * context()
bool m_firstTime
Definition: FWFFLooper.h:99
bool isValid() const
Definition: HandleBase.h:70
#define fwLog(_level_)
Definition: fwLog.h:45
void setFilterButtonText(const char *txt)
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:52
float m_avg_current
Definition: RunInfo.h:28
FWGeometry & getGeom()
void showEventFilterGUI()
std::unique_ptr< fireworks::Context > m_context
Definition: FWFFLooper.h:90
T get() const
Definition: EventSetup.h:73
void showPathsGUI(const TGWindow *p)
Definition: FWFFLooper.cc:437
T const * product() const
Definition: ESHandle.h:86
void FWFFLooper::checkPosition ( )
overridevirtual

Implements CmsShowMainBase.

Definition at line 215 of file FWFFLooper.cc.

References heppy_loop::loop.

215  {
216  if (loop() && isPlaying())
217  return;
218 
221 
222  if (m_isFirstEvent)
224 
225  if (m_isLastEvent) {
226  guiManager()->disableNext();
227  // force enable play events action in --port mode
228  if (!guiManager()->playEventsAction()->isEnabled())
230  }
231 }
bool m_isLastEvent
Definition: FWFFLooper.h:107
FWGUIManager * guiManager()
void enable()
Definition: CSGAction.cc:268
bool loop() const
CmsShowMainFrame * getMainFrame() const
Definition: FWGUIManager.h:196
void disablePrevious()
bool m_isFirstEvent
Definition: FWFFLooper.h:106
CSGContinuousAction * playEventsAction()
bool isPlaying() const
void enableComplexNavigation(bool enable=true)
void disableNext()
void FWFFLooper::display ( const std::string &  info = "")

Definition at line 390 of file FWFFLooper.cc.

References FWFFHelper::m_Rint.

390  {
391  // Display whatever was registered so far, wait until user presses
392  // the "Step" button.
393 
394  if (m_AllowStep) {
395  gEve->Redraw3D();
396  m_Rint->Run(kTRUE);
397  }
398 }
TRint * m_Rint
Definition: FWFFLooper.h:93
bool m_AllowStep
Definition: FWFFLooper.h:97
edm::EDLooperBase::Status FWFFLooper::duringLoop ( const edm::Event event,
const edm::EventSetup es,
edm::ProcessingController controller 
)
override

Definition at line 333 of file FWFFLooper.cc.

References ntuplePlotting::draw(), edm::ProcessingController::forwardState(), edm::ProcessingController::kAtFirstEvent, edm::ProcessingController::kAtLastEvent, FWFFNavigator::kFirstEvent, FWFFNavigator::kLastEvent, FWFFNavigator::kNextEvent, FWFFNavigator::kPreviousEvent, FWFFHelper::m_Rint, edm::ProcessingController::reverseState(), edm::ProcessingController::setTransitionToEvent(), edm::ProcessingController::setTransitionToNextEvent(), and edm::ProcessingController::setTransitionToPreviousEvent().

335  {
336  // Check DisplayGeomRecord changes.
337  try {
338  m_geomWatcher.check(es);
339  } catch (...) {
340  }
341 
342  m_pathsGUI->postEvent(event);
343 
346  // If the next event id is valid, set the transition so
347  // that we go to it go to to it.
348  if (m_nextEventId != edm::EventID()) {
351  return kContinue;
352  }
353  // We handle "last event" by going to the first event and then moving to the
354  // previous event.
355  if (m_navigator->currentTransition() == FWFFNavigator::kLastEvent) {
356  m_navigator->resetTransition();
357  controller.setTransitionToPreviousEvent();
358  return kContinue;
359  }
360 
361  m_pathsGUI->hasChanges() = false;
362  m_metadataManager->update(new FWFFMetadataUpdateRequest(event));
363  m_navigator->setCurrentEvent(&event);
364  if (m_autoReload == true)
366 
367  checkPosition();
368  draw();
369 
370  m_Rint->Run(kTRUE);
371  // If the GUI changed the PSet, save the current event to reload
372  // it on next iteration.
373  if (m_pathsGUI->hasChanges()) {
375  return kStop;
376  } else if (m_navigator->currentTransition() == FWFFNavigator::kFirstEvent) {
377  m_nextEventId = m_navigator->getFirstEventID();
378  return kStop;
379  } else if (m_navigator->currentTransition() == FWFFNavigator::kLastEvent) {
380  m_nextEventId = m_navigator->getFirstEventID();
381  return kStop;
382  } else if (m_navigator->currentTransition() == FWFFNavigator::kNextEvent)
383  controller.setTransitionToNextEvent();
384  else if (m_navigator->currentTransition() == FWFFNavigator::kPreviousEvent)
385  controller.setTransitionToPreviousEvent();
386  return kContinue;
387 }
edm::ESWatcher< DisplayGeomRecord > m_geomWatcher
Definition: FWFFLooper.h:109
bool m_isLastEvent
Definition: FWFFLooper.h:107
FWPathsPopup * m_pathsGUI
Definition: FWFFLooper.h:100
void setTransitionToEvent(edm::EventID const &iID)
bool m_autoReload
Definition: FWFFLooper.h:105
ForwardState forwardState() const
Returns the present state of processing.
std::unique_ptr< FWFFMetadataManager > m_metadataManager
Definition: FWFFLooper.h:89
bool & hasChanges()
Definition: FWPathsPopup.h:35
TRint * m_Rint
Definition: FWFFLooper.h:93
bool m_isFirstEvent
Definition: FWFFLooper.h:106
void checkPosition() override
Definition: FWFFLooper.cc:215
std::unique_ptr< FWFFNavigator > m_navigator
Definition: FWFFLooper.h:88
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:52
void postEvent(edm::Event const &event)
edm::EventID m_nextEventId
Definition: FWFFLooper.h:104
ReverseState reverseState() const
edm::EDLooperBase::Status FWFFLooper::endOfLoop ( const edm::EventSetup ,
unsigned  int 
)
override

This is called at the end of looping. We always continue because we want the transition set in the ProcessingController to happen.

Definition at line 423 of file FWFFLooper.cc.

References beam_dqm_sourceclient-live_cfg::cerr, MillePedeFileConverter_cfg::e, fwLog, mps_fire::i, fwlog::kError, and cms::Exception::what().

423  {
424  // Looks like the module changer is availble only here.
425  for (ModuleChanges::iterator i = m_scheduledChanges.begin(), e = m_scheduledChanges.end(); i != e; ++i) {
426  try {
427  moduleChanger()->changeModule(i->first, i->second);
428  } catch (cms::Exception const& e) {
429  fwLog(fwlog::kError) << "FWFFLooper::endOfLoop caught exception.\n";
430  std::cerr << e.what() << std::endl;
431  }
432  }
433  m_scheduledChanges.clear();
434  return kContinue;
435 }
ModuleChanges m_scheduledChanges
Definition: FWFFLooper.h:103
char const * what() const override
Definition: Exception.cc:103
bool changeModule(const std::string &iLabel, const ParameterSet &iPSet)
#define fwLog(_level_)
Definition: fwLog.h:45
ModuleChanger * moduleChanger()
This only returns a non-zero value during the call to endOfLoop.
TEveMagField * FWFFLooper::getMagField ( )

Definition at line 404 of file FWFFLooper.cc.

404 { return m_MagField; }
TEveMagField * m_MagField
Definition: FWFFLooper.h:95
void FWFFLooper::loadDefaultGeometryFile ( void  )
private

Definition at line 169 of file FWFFLooper.cc.

References f, and CmsShowMainBase::loadGeometry().

169  {
171  f = boost::bind(&CmsShowMainBase::loadGeometry, this);
172  startupTasks()->addTask(f);
173 }
CmsShowTaskExecutor * startupTasks()
double f[11][100]
boost::function0< void > TaskFunctor
void addTask(const TaskFunctor &iTask)
const FWFFLooper& FWFFLooper::operator= ( const FWFFLooper )
private
void FWFFLooper::postBeginJob ( )
void FWFFLooper::postEndJob ( )

Definition at line 210 of file FWFFLooper.cc.

Referenced by attachTo().

210  {
211  printf("FWFFLooper::postEndJob\n");
212  TEveManager::Terminate();
213 }
void FWFFLooper::quit ( )
overridevirtual

Implements CmsShowMainBase.

Definition at line 408 of file FWFFLooper.cc.

408  {
409  gSystem->ExitLoop();
410 
411  // Throwing exception here is bad because:
412  // a) it does not work when in a "debug step";
413  // b) does not restore terminal state.
414  // So we do exit instead for now.
415  // throw cms::Exception("UserTerminationRequest");
416  gSystem->Exit(0);
417 }
void FWFFLooper::remakeGeometry ( const DisplayGeomRecord dgRec)

Definition at line 455 of file FWFFLooper.cc.

References fwLog, relativeConstraints::geom, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::get(), fwlog::kInfo, edm::ESHandle< T >::product(), and FWGeometryTableViewManager::setGeoManagerRuntime().

455  {
456  fwLog(fwlog::kInfo) << "FWFFLooper set TGeo geometry from DisplayGeomRecord.\n";
457 
459  dgRec.get(geom);
460  TEveGeoManagerHolder _tgeo(const_cast<TGeoManager*>(geom.product()));
462 }
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
#define fwLog(_level_)
Definition: fwLog.h:45
static void setGeoManagerRuntime(TGeoManager *)
T const * product() const
Definition: ESHandle.h:86
void FWFFLooper::requestChanges ( const std::string &  moduleLabel,
const edm::ParameterSet ps 
)

Definition at line 449 of file FWFFLooper.cc.

References HerwigMaxPtPartonFilter_cfi::moduleLabel.

Referenced by FWPathsPopup::scheduleReloadEvent().

449  {
451 }
ModuleChanges m_scheduledChanges
Definition: FWFFLooper.h:103
void FWFFLooper::setupFieldForPropagator ( TEveTrackPropagator *  prop)

Definition at line 406 of file FWFFLooper.cc.

406 { prop->SetMagFieldObj(m_MagField, kFALSE); }
TEveMagField * m_MagField
Definition: FWFFLooper.h:95
void FWFFLooper::showPathsGUI ( const TGWindow *  p)

Definition at line 437 of file FWFFLooper.cc.

Referenced by beginRun().

437  {
438  if (!m_pathsGUI)
439  return;
440  if (m_pathsGUI->IsMapped()) {
441  guiManager()->setFilterButtonText("Show paths / CMSSW configuration editor");
442  m_pathsGUI->UnmapWindow();
443  } else {
444  guiManager()->setFilterButtonText("Hide paths / CMSSW configuration editor");
445  m_pathsGUI->MapWindow();
446  }
447 }
FWGUIManager * guiManager()
FWPathsPopup * m_pathsGUI
Definition: FWFFLooper.h:100
void setFilterButtonText(const char *txt)
void FWFFLooper::startingNewLoop ( unsigned  int)
overridevirtual

Called before system starts to loop over the events. The argument is a count of how many loops have been processed. For the first time through the events the argument will be 0.

Implements edm::EDLooperBase.

Definition at line 189 of file FWFFLooper.cc.

References f, info(), and FWFFHelper::m_Rint.

189  {
190  // Initialise on first loop.
191  if (count == 0) {
193  m_pathsGUI->setup(info);
194 
195  // We need to enter the GUI loop in order to
196  // have all the callbacks executed. The last callback will
197  // be responsible for returning the control to CMSSW.
198  assert(m_Rint);
200  f = boost::bind(&TApplication::Terminate, m_Rint, 0);
201  startupTasks()->addTask(f);
202  // FIXME: do we really need to delay tasks like this?
204  m_Rint->Run(kTRUE);
205  // Show the GUI ...
206  gSystem->ProcessEvents();
207  }
208 }
static const TGPicture * info(bool iBackgroundIsBlack)
void startDoingTasks() override
FWPathsPopup * m_pathsGUI
Definition: FWFFLooper.h:100
CmsShowTaskExecutor * startupTasks()
TRint * m_Rint
Definition: FWFFLooper.h:93
double f[11][100]
ScheduleInfo const * scheduleInfo() const
This returns a non-zero value after the constructor has been called.
boost::function0< void > TaskFunctor
void addTask(const TaskFunctor &iTask)
void setup(const edm::ScheduleInfo *info)
void FWFFLooper::stopPlaying ( )
overridevirtual

Reimplemented from CmsShowMainBase.

Definition at line 253 of file FWFFLooper.cc.

References CmsShowMainBase::stopPlaying().

253  {
255  m_autoReload = false;
259  checkPosition();
260 }
FWGUIManager * guiManager()
void enableActions(bool enable=true)
virtual void stopPlaying()
bool m_autoReload
Definition: FWFFLooper.h:105
CmsShowMainFrame * getMainFrame() const
Definition: FWGUIManager.h:196
void checkPosition() override
Definition: FWFFLooper.cc:215
void enableComplexNavigation(bool enable=true)

Member Data Documentation

bool FWFFLooper::m_AllowStep
private

Definition at line 97 of file FWFFLooper.h.

edm::Service<FWFFHelper> FWFFLooper::m_appHelper
private

Definition at line 87 of file FWFFLooper.h.

bool FWFFLooper::m_autoReload
private

Definition at line 105 of file FWFFLooper.h.

std::unique_ptr<fireworks::Context> FWFFLooper::m_context
private

Definition at line 90 of file FWFFLooper.h.

TEveManager* FWFFLooper::m_EveManager
private

Definition at line 92 of file FWFFLooper.h.

bool FWFFLooper::m_firstTime
private

Definition at line 99 of file FWFFLooper.h.

edm::ESWatcher<DisplayGeomRecord> FWFFLooper::m_geomWatcher
private

Definition at line 109 of file FWFFLooper.h.

bool FWFFLooper::m_isFirstEvent
private

Definition at line 106 of file FWFFLooper.h.

bool FWFFLooper::m_isLastEvent
private

Definition at line 107 of file FWFFLooper.h.

TEveMagField* FWFFLooper::m_MagField
private

Definition at line 95 of file FWFFLooper.h.

std::unique_ptr<FWFFMetadataManager> FWFFLooper::m_metadataManager
private

Definition at line 89 of file FWFFLooper.h.

std::unique_ptr<FWFFNavigator> FWFFLooper::m_navigator
private

Definition at line 88 of file FWFFLooper.h.

edm::EventID FWFFLooper::m_nextEventId
private

Definition at line 104 of file FWFFLooper.h.

FWPathsPopup* FWFFLooper::m_pathsGUI
private

Definition at line 100 of file FWFFLooper.h.

TRint* FWFFLooper::m_Rint
private

Definition at line 93 of file FWFFLooper.h.

ModuleChanges FWFFLooper::m_scheduledChanges
private

Definition at line 103 of file FWFFLooper.h.

bool FWFFLooper::m_ShowEvent
private

Definition at line 98 of file FWFFLooper.h.