CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
CmsShowMain Class Reference

#include <Fireworks/Core/interface/CmsShowMain.h>

Inheritance diagram for CmsShowMain:
CmsShowMainBase

Public Member Functions

void appendData ()
 
 CmsShowMain (int argc, char *argv[])
 
const fireworks::Contextcontext () const
 
void doExit ()
 
void fileChangedSlot (const TFile *file)
 
const fwlite::EventgetCurrentEvent () const
 
bool getVersionCheck () const
 
void notified (TSocket *)
 
void openData ()
 
void openDataViaURL ()
 
virtual void quit ()
 
void resetInitialization ()
 
virtual ~CmsShowMain ()
 
- Public Member Functions inherited from CmsShowMainBase
FWModelChangeManagerchangeManager ()
 
 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 playBackward ()
 
void playForward ()
 
void registerPhysicsObject (const FWPhysicsObjectDesc &iItem)
 
void reloadConfiguration (const std::string &config)
 
FWSelectionManagerselectionManager ()
 
void setAutoSaveAllViewsFormat (const std::string &fmt)
 
void setConfigFilename (const std::string &f)
 
void setGeometryFilename (const std::string &filename)
 
void setIsPlaying (bool value)
 
void setPlayDelay (Float_t val)
 
void setPlayLoop ()
 
void setSimGeometryFilename (const std::string &filename)
 
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 writeToConfigFile (const std::string &config)
 
void writeToCurrentConfigFile ()
 
virtual ~CmsShowMainBase ()
 

Protected Member Functions

virtual void eventChangedImp ()
 
- Protected Member Functions inherited from CmsShowMainBase
void eventChangedSlot ()
 
void sendVersionInfo ()
 

Private Member Functions

virtual void autoLoadNewEvent ()
 
void checkLiveMode ()
 
virtual void checkPosition ()
 
 CmsShowMain (const CmsShowMain &)
 
void connectSocket ()
 
void filterButtonClicked ()
 
void loadGeometry ()
 
void navigatorChangedFilterState (int)
 
const CmsShowMainoperator= (const CmsShowMain &)
 
void postFiltering (bool)
 
void preFiltering ()
 
void reachedBeginning ()
 
void reachedEnd ()
 
void setLiveMode ()
 
void setupDataHandling ()
 
void setupSocket (unsigned int)
 
virtual void stopPlaying ()
 

Private Attributes

std::auto_ptr< fireworks::Contextm_context
 
std::vector< std::string > m_inputFiles
 
UInt_t m_lastXEventSerial
 
bool m_live
 
int m_liveTimeout
 
std::auto_ptr< SignalTimerm_liveTimer
 
bool m_loadedAnyInputFile
 
std::auto_ptr
< FWLiteJobMetadataManager
m_metadataManager
 
std::auto_ptr< TMonitor > m_monitor
 
std::auto_ptr< CmsShowNavigatorm_navigator
 
bool m_noVersionCheck
 
const TFile * m_openFile
 
std::auto_ptr< CmsShowSearchFilesm_searchFiles
 

Detailed Description

Description: Displays an fwlite::Event in ROOT

Usage: <usage>

Definition at line 60 of file CmsShowMain.h.

Constructor & Destructor Documentation

CmsShowMain::CmsShowMain ( int  argc,
char *  argv[] 
)

Definition at line 112 of file CmsShowMain.cc.

References CmsShowTaskExecutor::addTask(), cond::ecalcond::all, dir2webdir::argc, getDQMSummary::argv, CmsShowMainBase::configFilename(), connectSocket(), gather_cfg::cout, alignCSCRings::e, CmsShowMainBase::eiManager(), AutoLibraryLoader::enable(), FWColorPopup::EnableFreePalette(), cppFunctionSkipper::exception, cmsRelvalreport::exit, f, fmt, fwLog, CmsShowMainBase::geometryFilename(), CmsShowMainBase::guiManager(), kAdvancedRenderCommandOpt, kAdvancedRenderOpt, kAutoSaveAllViews, kChainCommandOpt, kConfigFileCommandOpt, kConfigFileOpt, kEnableFPE, fwlog::kError, kEveCommandOpt, kEveOpt, kFieldCommandOpt, kFreePaletteCommandOpt, kGeomFileCommandOpt, kGeomFileOpt, kHelpCommandOpt, kHelpOpt, fwlog::kInfo, kInputFilesCommandOpt, kInputFilesOpt, kLiveCommandOpt, kLogLevelCommandOpt, kLogLevelOpt, kLoopCommandOpt, kLoopOpt, kNoConfigFileCommandOpt, kNoConfigFileOpt, kNoVersionCheck, kPlainRootCommandOpt, kPlayCommandOpt, kPlayOpt, kPortCommandOpt, kRootInteractiveCommandOpt, kSimGeomFileCommandOpt, kSimGeomFileOpt, kSoftCommandOpt, FWMagField::kUser, kZeroWinOffsets, testEve_cfg::level, CmsShowMainBase::loadGeometry(), m_context, m_inputFiles, m_metadataManager, m_navigator, m_noVersionCheck, AlCaHLTBitMon_ParallelJobs::options, AlCaHLTBitMon_ParallelJobs::p, FWGUIManager::resetWMOffsets(), DTTTrigCorrFirst::run, CmsShowMainBase::setAutoSaveAllViewsFormat(), CmsShowMainBase::setConfigFilename(), FWEventItemsManager::setContext(), CmsShowMainBase::setGeometryFilename(), setLiveMode(), CmsShowNavigator::setMaxNumberOfFilesToChain(), CmsShowMainBase::setPlayLoop(), fwlog::setPresentLogLevel(), CmsShowMainBase::setSimGeometryFilename(), CmsShowMainBase::setup(), CmsShowMainBase::setupAutoLoad(), CmsShowMainBase::setupConfiguration(), setupDataHandling(), CmsShowMainBase::setupDebugSupport(), setupSocket(), CmsShowMainBase::setupViewManagers(), CmsShowTaskExecutor::startDoingTasks(), CmsShowMainBase::startupTasks(), AlCaHLTBitMon_QueryRunRegistry::string, and w().

113  : CmsShowMainBase(),
114  m_navigator(new CmsShowNavigator(*this)),
118  eiManager(),
119  colorManager(),
120  m_metadataManager.get())),
121  m_loadedAnyInputFile(false),
122  m_openFile(0),
123  m_live(false),
124  m_liveTimer(new SignalTimer()),
125  m_liveTimeout(600000),
127  m_noVersionCheck(false)
128 {
129  try {
130  TGLWidget* w = TGLWidget::Create(gClient->GetDefaultRoot(), kTRUE, kTRUE, 0, 10, 10);
131  delete w;
132  }
133  catch (std::exception& iException) {
134  fwLog(fwlog::kError) << "Failed creating an OpenGL window: " << iException.what() << "\n"
135  "Things to check:\n"
136  "- Is DISPLAY environment variable set?\n"
137  "- Are OpenGL libraries installed?\n"
138  "- If running remotely, make sure you use 'ssh -X' or 'ssh -Y'.\n"
139  "See also: https://twiki.cern.ch/twiki/bin/viewauth/CMS/WorkBookFireworks\n";
140  gSystem->Exit(1);
141  }
142 
143  eiManager()->setContext(m_context.get());
144 
145 
146  std::string descString(argv[0]);
147  descString += " [options] <data file>\nGeneral";
148 
149  namespace po = boost::program_options;
150  po::options_description desc(descString);
151  desc.add_options()
152  (kInputFilesCommandOpt, po::value< std::vector<std::string> >(), "Input root files")
153  (kConfigFileCommandOpt, po::value<std::string>(), "Include configuration file")
154  (kNoConfigFileCommandOpt, "Empty configuration")
155  (kNoVersionCheck, "No file version check")
156  (kGeomFileCommandOpt, po::value<std::string>(), "Include geometry file")
157  (kSimGeomFileCommandOpt,po::value<std::string>(), "Set simulation geometry file to browser")
158  (kFieldCommandOpt, po::value<double>(), "Set magnetic field value explicitly. Default is auto-field estimation")
159  (kRootInteractiveCommandOpt, "Enable root interactive prompt")
160  (kSoftCommandOpt, "Try to force software rendering to avoid problems with bad hardware drivers")
161  (kHelpCommandOpt, "Display help message");
162 
163  po::options_description livedesc("Live Event Display");
164  livedesc.add_options()
165  (kPlayCommandOpt, po::value<float>(), "Start in play mode with given interval between events in seconds")
166  (kPortCommandOpt, po::value<unsigned int>(), "Listen to port for new data files to open")
167  (kLoopCommandOpt, "Loop events in play mode")
168  (kChainCommandOpt, po::value<unsigned int>(), "Chain up to a given number of recently open files. Default is 1 - no chain")
169  (kLiveCommandOpt, "Enforce playback mode if a user is not using display")
170  (kAutoSaveAllViews, po::value<std::string>(), "Auto-save all views with given prefix (run_event_lumi_view.png is appended)");
171 
172  po::options_description debugdesc("Debug");
173  debugdesc.add_options()
174  (kLogLevelCommandOpt, po::value<unsigned int>(), "Set log level starting from 0 to 4 : kDebug, kInfo, kWarning, kError")
175  (kEveCommandOpt, "Show TEveBrowser to help debug problems")
176  (kEnableFPE, "Enable detection of floating-point exceptions");
177 
178 
179  po::options_description rnrdesc("Appearance");
180  rnrdesc.add_options()
181  (kFreePaletteCommandOpt, "Allow free color selection (requires special configuration!)")
182  (kZeroWinOffsets, "Disable auto-detection of window position offsets")
183  (kAdvancedRenderCommandOpt, "Enable line anti-aliasing");
184  po::positional_options_description p;
185  p.add(kInputFilesOpt, -1);
186 
187 
188  po::options_description hiddendesc("hidden");
189  hiddendesc.add_options();
190 
191  po::options_description all("");
192  all.add(desc).add(rnrdesc).add(livedesc).add(debugdesc);
193 
194 
195  int newArgc = argc;
196  char **newArgv = argv;
197  po::variables_map vm;
198  try{
199  po::store(po::command_line_parser(newArgc, newArgv).
200  options(all).positional(p).run(), vm);
201 
202  po::notify(vm);
203  }
204  catch ( const std::exception& e)
205  {
206  // Return with exit status 0 to avoid generating crash reports
207 
208  fwLog(fwlog::kError) << e.what() << std::endl;
209  std::cout << all <<std::endl;
210  exit(0);
211  }
212 
213  if(vm.count(kHelpOpt)) {
214  std::cout << all <<std::endl;
215  exit(0);
216  }
217 
218  if(vm.count(kLogLevelOpt)) {
219  fwlog::LogLevel level = (fwlog::LogLevel)(vm[kLogLevelOpt].as<unsigned int>());
221  }
222 
223  if(vm.count(kPlainRootCommandOpt)) {
224  fwLog(fwlog::kInfo) << "Plain ROOT prompt requested" << std::endl;
225  return;
226  }
227 
228  const char* cmspath = gSystem->Getenv("CMSSW_BASE");
229  if(0 == cmspath) {
230  throw std::runtime_error("CMSSW_BASE environment variable not set");
231  }
232 
233  // input file
234  if (vm.count(kInputFilesOpt)) {
235  m_inputFiles = vm[kInputFilesOpt].as< std::vector<std::string> >();
236  }
237 
238  if (!m_inputFiles.size())
239  fwLog(fwlog::kInfo) << "No data file given." << std::endl;
240  else if (m_inputFiles.size() == 1)
241  fwLog(fwlog::kInfo) << "Input " << m_inputFiles.front() << std::endl;
242  else
243  fwLog(fwlog::kInfo) << m_inputFiles.size() << " input files; first: " << m_inputFiles.front() << ", last: " << m_inputFiles.back() << std::endl;
244 
245  // configuration file
246  if (vm.count(kConfigFileOpt)) {
247  setConfigFilename(vm[kConfigFileOpt].as<std::string>());
248  if (access(configFilename(), R_OK) == -1)
249  {
250  fwLog(fwlog::kError) << "Specified configuration file does not exist. Quitting.\n";
251  exit(0);
252  }
253  } else {
254  if (vm.count(kNoConfigFileOpt)) {
255  fwLog(fwlog::kInfo) << "No configuration is loaded, show everything.\n";
256  setConfigFilename("");
257  } else
258  setConfigFilename("default.fwc");
259  }
260  fwLog(fwlog::kInfo) << "Config " << configFilename() << std::endl;
261 
262  // geometry
263  if (vm.count(kGeomFileOpt)) {
264  setGeometryFilename(vm[kGeomFileOpt].as<std::string>());
265  } else {
266  // fwLog(fwlog::kInfo) << "No geom file name. Choosing default.\n";
267  setGeometryFilename("cmsGeom10.root");
268  }
269  fwLog(fwlog::kInfo) << "Geometry file " << geometryFilename() << "\n";
270 
271  if (vm.count(kSimGeomFileOpt)) {
272  setSimGeometryFilename(vm[kSimGeomFileOpt].as<std::string>());
273  } else {
274  setSimGeometryFilename("cmsSimGeom-14.root");
275  }
276  // Free-palette palette
277  if (vm.count(kFreePaletteCommandOpt)) {
279  fwLog(fwlog::kInfo) << "Palette restriction removed on user request!\n";
280  }
281  bool eveMode = vm.count(kEveOpt);
282 
283  //Delay creating guiManager and enabling autoloading until here so that if we have a 'help' request we don't
284  // open any graphics or build dictionaries
286 
287  TEveManager::Create(kFALSE, "FIV");
288 
289  setup(m_navigator.get(), m_context.get(), m_metadataManager.get());
290 
291  if (vm.count(kZeroWinOffsets))
292  {
294  fwLog(fwlog::kInfo) << "Window offsets reset on user request!\n";
295  }
296 
297  if ( vm.count(kAdvancedRenderOpt) )
298  {
299  TEveLine::SetDefaultSmooth(kTRUE);
300  }
301 
302  //figure out where to find macros
303  //tell ROOT where to find our macros
305  // first check if port is not occupied
306  if (vm.count(kPortCommandOpt)) {
307  f=boost::bind(&CmsShowMain::setupSocket, this, vm[kPortCommandOpt].as<unsigned int>());
308  startupTasks()->addTask(f);
309  }
310 
311  f=boost::bind(&CmsShowMainBase::loadGeometry,this);
312  startupTasks()->addTask(f);
313  f=boost::bind(&CmsShowMainBase::setupViewManagers,this);
314  startupTasks()->addTask(f);
315  f=boost::bind(&CmsShowMainBase::setupConfiguration,this);
316  startupTasks()->addTask(f);
317  f=boost::bind(&CmsShowMain::setupDataHandling,this);
318  startupTasks()->addTask(f);
319 
320  if (vm.count(kLoopOpt))
321  setPlayLoop();
322 
323  if (eveMode) {
324  f = boost::bind(&CmsShowMainBase::setupDebugSupport,this);
325  startupTasks()->addTask(f);
326  }
327  if(vm.count(kChainCommandOpt)) {
328  f = boost::bind(&CmsShowNavigator::setMaxNumberOfFilesToChain, m_navigator.get(), vm[kChainCommandOpt].as<unsigned int>());
329  startupTasks()->addTask(f);
330  }
331  if (vm.count(kPlayOpt)) {
332  f = boost::bind(&CmsShowMainBase::setupAutoLoad, this, vm[kPlayOpt].as<float>());
333  startupTasks()->addTask(f);
334  }
335 
336  if(vm.count(kLiveCommandOpt))
337  {
338  f = boost::bind(&CmsShowMain::setLiveMode, this);
339  startupTasks()->addTask(f);
340  }
341 
342  if(vm.count(kFieldCommandOpt))
343  {
344  m_context->getField()->setSource(FWMagField::kUser);
345  m_context->getField()->setUserField(vm[kFieldCommandOpt].as<double>());
346  }
347  if(vm.count(kAutoSaveAllViews)) {
349  fmt += "%u_%u_%u_%s.png";
351  }
352  if(vm.count(kNoVersionCheck)) {
353  m_noVersionCheck=true;
354  }
355  if(vm.count(kEnableFPE)) {
356  gSystem->SetFPEMask();
357  }
358 
359  if (vm.count(kPortCommandOpt)) {
360  f=boost::bind(&CmsShowMain::connectSocket, this);
361  startupTasks()->addTask(f);
362  }
363 
365 }
static const char *const kPlayCommandOpt
Definition: CmsShowMain.cc:84
static const char *const kNoVersionCheck
Definition: CmsShowMain.cc:106
static const char *const kGeomFileCommandOpt
Definition: CmsShowMain.cc:78
FWSelectionManager * selectionManager()
static const char *const kChainCommandOpt
Definition: CmsShowMain.cc:99
static const char *const kAutoSaveAllViews
Definition: CmsShowMain.cc:103
bool m_loadedAnyInputFile
Definition: CmsShowMain.h:119
FWGUIManager * guiManager()
FWColorManager * colorManager()
static const char *const kZeroWinOffsets
Definition: CmsShowMain.cc:105
void setupSocket(unsigned int)
Definition: CmsShowMain.cc:667
static const char *const kFieldCommandOpt
Definition: CmsShowMain.cc:101
FWEventItemsManager * eiManager()
static const char *const kLogLevelOpt
Definition: CmsShowMain.cc:88
static const char *const kSimGeomFileOpt
Definition: CmsShowMain.cc:79
std::auto_ptr< FWLiteJobMetadataManager > m_metadataManager
Definition: CmsShowMain.h:115
static const char *const kNoConfigFileOpt
Definition: CmsShowMain.cc:81
const char * configFilename() const
void setup(FWNavigatorBase *navigator, fireworks::Context *context, FWJobMetadataManager *metadataManager)
void setContext(fireworks::Context *)
static const char *const kConfigFileCommandOpt
Definition: CmsShowMain.cc:76
void setupDataHandling()
Definition: CmsShowMain.cc:607
FWModelChangeManager * changeManager()
static const char * fmt
Definition: Version.cc:9
std::auto_ptr< SignalTimer > m_liveTimer
Definition: CmsShowMain.h:126
static const char *const kAdvancedRenderOpt
Definition: CmsShowMain.cc:91
static const char *const kGeomFileOpt
Definition: CmsShowMain.cc:77
std::auto_ptr< fireworks::Context > m_context
Definition: CmsShowMain.h:116
LogLevel
Definition: fwLog.h:35
void setupAutoLoad(float x)
static const char *const kPortCommandOpt
Definition: CmsShowMain.cc:96
void setGeometryFilename(const std::string &filename)
static const char *const kPlayOpt
Definition: CmsShowMain.cc:83
void resetWMOffsets()
CmsShowTaskExecutor * startupTasks()
UInt_t m_lastXEventSerial
Definition: CmsShowMain.h:128
static const char *const kEveOpt
Definition: CmsShowMain.cc:89
static const char *const kConfigFileOpt
Definition: CmsShowMain.cc:75
static const char *const kFreePaletteCommandOpt
Definition: CmsShowMain.cc:102
static const char *const kLoopOpt
Definition: CmsShowMain.cc:85
static const char *const kEveCommandOpt
Definition: CmsShowMain.cc:90
double f[11][100]
static const char *const kSoftCommandOpt
Definition: CmsShowMain.cc:95
static const char *const kLogLevelCommandOpt
Definition: CmsShowMain.cc:87
static const char *const kNoConfigFileCommandOpt
Definition: CmsShowMain.cc:82
static const char *const kEnableFPE
Definition: CmsShowMain.cc:104
std::vector< std::string > m_inputFiles
Definition: CmsShowMain.h:118
void setLiveMode()
Definition: CmsShowMain.cc:807
void setSimGeometryFilename(const std::string &filename)
static const char *const kLiveCommandOpt
Definition: CmsShowMain.cc:100
static const char *const kHelpCommandOpt
Definition: CmsShowMain.cc:94
static const char *const kInputFilesCommandOpt
Definition: CmsShowMain.cc:74
#define fwLog(_level_)
Definition: fwLog.h:50
static const char *const kInputFilesOpt
Definition: CmsShowMain.cc:73
static const char *const kPlainRootCommandOpt
Definition: CmsShowMain.cc:97
tuple argc
Definition: dir2webdir.py:38
const TFile * m_openFile
Definition: CmsShowMain.h:120
void setAutoSaveAllViewsFormat(const std::string &fmt)
std::auto_ptr< CmsShowNavigator > m_navigator
Definition: CmsShowMain.h:114
static const char *const kRootInteractiveCommandOpt
Definition: CmsShowMain.cc:98
bool m_noVersionCheck
Definition: CmsShowMain.h:130
static const char *const kAdvancedRenderCommandOpt
Definition: CmsShowMain.cc:92
boost::function0< void > TaskFunctor
void addTask(const TaskFunctor &iTask)
int m_liveTimeout
Definition: CmsShowMain.h:127
void setMaxNumberOfFilesToChain(unsigned int i)
static void enable()
enable automatic library loading
tuple cout
Definition: gather_cfg.py:121
tuple level
Definition: testEve_cfg.py:34
T w() const
const std::string & geometryFilename(void)
static void EnableFreePalette()
void setPresentLogLevel(LogLevel)
Definition: fwLog.cc:55
static const char *const kSimGeomFileCommandOpt
Definition: CmsShowMain.cc:80
void connectSocket()
Definition: CmsShowMain.cc:680
static const char *const kHelpOpt
Definition: CmsShowMain.cc:93
static const char *const kLoopCommandOpt
Definition: CmsShowMain.cc:86
void setConfigFilename(const std::string &f)
CmsShowMain::~CmsShowMain ( )
virtual

Definition at line 371 of file CmsShowMain.cc.

References FWSelectionManager::clearSelection(), and CmsShowMainBase::selectionManager().

372 {
373  //avoids a seg fault from eve which happens if eve is terminated after the GUI is gone
375 }
FWSelectionManager * selectionManager()
CmsShowMain::CmsShowMain ( const CmsShowMain )
private

Member Function Documentation

void CmsShowMain::appendData ( )

Definition at line 484 of file CmsShowMain.cc.

References checkPosition(), FWGUIManager::clearStatus(), CmsShowMainBase::draw(), FWGUIManager::getMainFrame(), CmsShowMainBase::guiManager(), m_loadedAnyInputFile, m_navigator, FWGUIManager::titleChanged(), and FWGUIManager::updateStatus().

Referenced by setupDataHandling().

485 {
486  const char* kRootType[] = {"ROOT files","*.root", 0, 0};
487  TGFileInfo fi;
488  fi.fFileTypes = kRootType;
489  /* this is how things used to be done:
490  fi.fIniDir = ".";
491  this is bad because the destructor calls delete[] on fIniDir.
492  */
493  fi.fIniDir = new char[128];
494  strncpy(fi.fIniDir, ".", 127);
495  guiManager()->updateStatus("waiting for data file ...");
496  new TGFileDialog(gClient->GetDefaultRoot(), guiManager()->getMainFrame(), kFDOpen, &fi);
497  guiManager()->updateStatus("loading file ...");
498  if (fi.fFilename) {
499  m_navigator->appendFile(fi.fFilename, false, false);
500  m_loadedAnyInputFile = true;
501  checkPosition();
502  draw();
503  guiManager()->titleChanged(m_navigator->frameTitle());
504  }
505  guiManager()->clearStatus();
506 }
bool m_loadedAnyInputFile
Definition: CmsShowMain.h:119
virtual void checkPosition()
Definition: CmsShowMain.cc:586
FWGUIManager * guiManager()
void updateStatus(const char *status)
CmsShowMainFrame * getMainFrame() const
Definition: FWGUIManager.h:199
void clearStatus()
std::auto_ptr< CmsShowNavigator > m_navigator
Definition: CmsShowMain.h:114
void titleChanged(const char *title)
void CmsShowMain::autoLoadNewEvent ( )
privatevirtual

Implements CmsShowMainBase.

Definition at line 539 of file CmsShowMain.cc.

References checkPosition(), CmsShowMainBase::draw(), FWGUIManager::enableActions(), CmsShowMainBase::forward(), CmsShowMainBase::guiManager(), CmsShowMainBase::loop(), m_loadedAnyInputFile, m_monitor, m_navigator, reachedEnd(), CmsShowMainBase::startAutoLoadTimer(), and CmsShowMainBase::stopAutoLoadTimer().

540 {
542 
543  // case when start with no input file
545  {
546  if (m_monitor.get())
548  return;
549  }
550 
551  bool reachedEnd = (forward() && m_navigator->isLastEvent()) || (!forward() && m_navigator->isFirstEvent());
552 
553  if (loop() && reachedEnd)
554  {
555  forward() ? m_navigator->firstEvent() : m_navigator->lastEvent();
556  draw();
557  }
558  else if (!reachedEnd)
559  {
560  forward() ? m_navigator->nextEvent() : m_navigator->previousEvent();
561  draw();
562  }
563 
564  // stop loop in case no loop or monitor mode
565  if (reachedEnd && (loop() || m_monitor.get()) == kFALSE)
566  {
567  if (forward() && m_navigator->isLastEvent())
568  {
570  checkPosition();
571  }
572 
573  if ((!forward()) && m_navigator->isFirstEvent())
574  {
576  checkPosition();
577  }
578  }
579  else
581 }
bool m_loadedAnyInputFile
Definition: CmsShowMain.h:119
virtual void checkPosition()
Definition: CmsShowMain.cc:586
FWGUIManager * guiManager()
void enableActions(bool enable=true)
bool loop() const
std::auto_ptr< TMonitor > m_monitor
Definition: CmsShowMain.h:132
std::auto_ptr< CmsShowNavigator > m_navigator
Definition: CmsShowMain.h:114
bool forward() const
void reachedEnd()
void CmsShowMain::checkLiveMode ( )
private

Definition at line 829 of file CmsShowMain.cc.

References CmsShowMainBase::guiManager(), CmsShowMainBase::isPlaying(), m_lastXEventSerial, m_liveTimeout, m_liveTimer, FWGUIManager::playEventsAction(), and CSGContinuousAction::switchMode().

Referenced by setLiveMode().

830 {
831  m_liveTimer->TurnOff();
832 
833 #if defined(R__LINUX)
834  TGX11 *x11 = dynamic_cast<TGX11*>(gVirtualX);
835  if (x11) {
836  XAnyEvent *ev = (XAnyEvent*) x11->GetNativeEvent();
837  // printf("serial %d \n",(int)ev->serial );
838 
839  if ( !isPlaying() && m_lastXEventSerial == ev->serial )
841  m_lastXEventSerial = ev->serial;
842  }
843 #endif
844  m_liveTimer->SetTime((Long_t)(m_liveTimeout));
845  m_liveTimer->Reset();
846  m_liveTimer->TurnOn();
847 }
FWGUIManager * guiManager()
std::auto_ptr< SignalTimer > m_liveTimer
Definition: CmsShowMain.h:126
UInt_t m_lastXEventSerial
Definition: CmsShowMain.h:128
CSGContinuousAction * playEventsAction()
bool isPlaying() const
int m_liveTimeout
Definition: CmsShowMain.h:127
void CmsShowMain::checkPosition ( )
privatevirtual

Implements CmsShowMainBase.

Definition at line 586 of file CmsShowMain.cc.

References FWGUIManager::disableNext(), FWGUIManager::disablePrevious(), CSGAction::enable(), CmsShowMainFrame::enableNavigatorControls(), FWGUIManager::getMainFrame(), CmsShowMainBase::guiManager(), CSGAction::isEnabled(), CmsShowMainBase::isPlaying(), CmsShowMainBase::loop(), m_monitor, m_navigator, and FWGUIManager::playEventsAction().

Referenced by appendData(), autoLoadNewEvent(), navigatorChangedFilterState(), notified(), openData(), openDataViaURL(), postFiltering(), setupDataHandling(), and stopPlaying().

587 {
588  if ((m_monitor.get() || loop() ) && isPlaying())
589  return;
590 
592 
593  if (m_navigator->isFirstEvent())
595 
596  if (m_navigator->isLastEvent())
597  {
598  guiManager()->disableNext();
599  // force enable play events action in --port mode
600  if (m_monitor.get() && !guiManager()->playEventsAction()->isEnabled())
602  }
603 }
FWGUIManager * guiManager()
void enable()
Definition: CSGAction.cc:284
bool loop() const
virtual Bool_t isEnabled() const
Definition: CSGAction.cc:308
std::auto_ptr< TMonitor > m_monitor
Definition: CmsShowMain.h:132
CmsShowMainFrame * getMainFrame() const
Definition: FWGUIManager.h:199
void disablePrevious()
std::auto_ptr< CmsShowNavigator > m_navigator
Definition: CmsShowMain.h:114
CSGContinuousAction * playEventsAction()
bool isPlaying() const
void disableNext()
void CmsShowMain::connectSocket ( )
private

Definition at line 680 of file CmsShowMain.cc.

References m_monitor.

Referenced by CmsShowMain().

681 {
682  m_monitor->Connect("Ready(TSocket*)","CmsShowMain",this,"notified(TSocket*)");
683 
684 }
std::auto_ptr< TMonitor > m_monitor
Definition: CmsShowMain.h:132
const fireworks::Context* CmsShowMain::context ( ) const
inline

Definition at line 80 of file CmsShowMain.h.

References m_context.

Referenced by CmsShowNavigator::getProcessList(), and CmsShowNavigator::updateFileFilters().

80 { return m_context.get(); };
std::auto_ptr< fireworks::Context > m_context
Definition: CmsShowMain.h:116
void CmsShowMain::doExit ( )

Definition at line 401 of file CmsShowMain.cc.

References FWGUIManager::evePreTerminate(), CmsShowMainBase::guiManager(), and m_context.

Referenced by DieTimer::Notify().

402 {
403  // pre terminate eve
404  m_context->deleteEveElements();
406 
407  // sleep at least 150 ms
408  // windows in ROOT GUI are destroyed in 150 ms timeout after
409  gSystem->Sleep(151);
410  gSystem->ProcessEvents();
411  gSystem->ExitLoop();
412 }
FWGUIManager * guiManager()
std::auto_ptr< fireworks::Context > m_context
Definition: CmsShowMain.h:116
void evePreTerminate()
void CmsShowMain::eventChangedImp ( )
protectedvirtual

Reimplemented from CmsShowMainBase.

Definition at line 449 of file CmsShowMain.cc.

References CmsShowMainBase::eventChangedImp(), getCurrentEvent(), CmsShowMainBase::guiManager(), m_metadataManager, m_navigator, m_openFile, and FWGUIManager::titleChanged().

450 {
452  guiManager()->titleChanged(m_navigator->frameTitle());
454 }
const fwlite::Event * getCurrentEvent() const
Definition: CmsShowMain.cc:431
FWGUIManager * guiManager()
std::auto_ptr< FWLiteJobMetadataManager > m_metadataManager
Definition: CmsShowMain.h:115
virtual void eventChangedImp()
const TFile * m_openFile
Definition: CmsShowMain.h:120
std::auto_ptr< CmsShowNavigator > m_navigator
Definition: CmsShowMain.h:114
void titleChanged(const char *title)
void CmsShowMain::fileChangedSlot ( const TFile *  file)

Definition at line 439 of file CmsShowMain.cc.

References mergeVDriftHistosByStation::file, getCurrentEvent(), CmsShowMainBase::guiManager(), m_metadataManager, m_navigator, m_openFile, and FWGUIManager::titleChanged().

Referenced by setupDataHandling().

440 {
441  m_openFile = file;
442  if (file)
443  guiManager()->titleChanged(m_navigator->frameTitle());
444 
446 }
const fwlite::Event * getCurrentEvent() const
Definition: CmsShowMain.cc:431
FWGUIManager * guiManager()
std::auto_ptr< FWLiteJobMetadataManager > m_metadataManager
Definition: CmsShowMain.h:115
const TFile * m_openFile
Definition: CmsShowMain.h:120
std::auto_ptr< CmsShowNavigator > m_navigator
Definition: CmsShowMain.h:114
void titleChanged(const char *title)
void CmsShowMain::filterButtonClicked ( )
private

Definition at line 779 of file CmsShowMain.cc.

References CmsShowMainBase::guiManager(), CmsShowNavigator::kWithdrawn, m_navigator, and FWGUIManager::showEventFilterGUI().

Referenced by setupDataHandling().

780 {
781  if (m_navigator->getFilterState() == CmsShowNavigator::kWithdrawn )
783  else
784  m_navigator->toggleFilterEnable();
785 }
FWGUIManager * guiManager()
std::auto_ptr< CmsShowNavigator > m_navigator
Definition: CmsShowMain.h:114
void showEventFilterGUI()
const fwlite::Event * CmsShowMain::getCurrentEvent ( ) const

Definition at line 431 of file CmsShowMain.cc.

References m_navigator.

Referenced by eventChangedImp(), and fileChangedSlot().

432 {
433  if (m_navigator.get())
434  return static_cast<const fwlite::Event*>(m_navigator->getCurrentEvent());
435  return 0;
436 }
std::auto_ptr< CmsShowNavigator > m_navigator
Definition: CmsShowMain.h:114
bool CmsShowMain::getVersionCheck ( ) const
inline

Definition at line 81 of file CmsShowMain.h.

References m_noVersionCheck.

Referenced by CmsShowNavigator::appendFile(), and CmsShowNavigator::openFile().

81 { return !m_noVersionCheck; }
bool m_noVersionCheck
Definition: CmsShowMain.h:130
void CmsShowMain::loadGeometry ( )
private
void CmsShowMain::navigatorChangedFilterState ( int  state)
private

Definition at line 768 of file CmsShowMain.cc.

References checkPosition(), CmsShowMainBase::guiManager(), m_navigator, FWGUIManager::setFilterButtonIcon(), and FWGUIManager::setFilterButtonText().

Referenced by setupDataHandling().

769 {
771  if (m_navigator->filesNeedUpdate() == false)
772  {
773  guiManager()->setFilterButtonText(m_navigator->filterStatusMessage());
774  checkPosition();
775  }
776 }
virtual void checkPosition()
Definition: CmsShowMain.cc:586
FWGUIManager * guiManager()
void setFilterButtonIcon(int)
std::auto_ptr< CmsShowNavigator > m_navigator
Definition: CmsShowMain.h:114
void setFilterButtonText(const char *txt)
void CmsShowMain::notified ( TSocket *  iSocket)

Definition at line 687 of file CmsShowMain.cc.

References checkPosition(), CmsShowMainBase::draw(), convertXMLtoSQLite_cfg::fileName, CmsShowMainBase::forward(), CmsShowMainBase::guiManager(), CmsShowMainBase::isPlaying(), m_live, m_loadedAnyInputFile, m_monitor, m_navigator, alignCSCRings::s, contentValuesFiles::server, AlCaHLTBitMon_QueryRunRegistry::string, and FWGUIManager::updateStatus().

688 {
689  TServerSocket* server = dynamic_cast<TServerSocket*> (iSocket);
690  if (server)
691  {
692  TSocket* connection = server->Accept();
693  if (connection)
694  {
695  m_monitor->Add(connection);
696  std::stringstream s;
697  s << "received connection from "<<iSocket->GetInetAddress().GetHostName();
698  guiManager()->updateStatus(s.str().c_str());
699  }
700  }
701  else
702  {
703  char buffer[4096];
704  memset(buffer,0,sizeof(buffer));
705  if (iSocket->RecvRaw(buffer, sizeof(buffer)) <= 0)
706  {
707  m_monitor->Remove(iSocket);
708  //std::stringstream s;
709  //s << "closing connection to "<<iSocket->GetInetAddress().GetHostName();
710  //m_guiManager->updateStatus(s.str().c_str());
711  delete iSocket;
712  return;
713  }
714  std::string fileName(buffer);
715  std::string::size_type lastNonSpace = fileName.find_last_not_of(" \n\t");
716  if (lastNonSpace != std::string::npos)
717  {
718  fileName.erase(lastNonSpace+1);
719  }
720 
721  std::stringstream s;
722  s <<"New file notified '"<<fileName<<"'";
723  guiManager()->updateStatus(s.str().c_str());
724 
725  bool appended = m_navigator->appendFile(fileName, true, m_live);
726 
727  if (appended)
728  {
729  if (m_live && isPlaying() && forward())
730  m_navigator->activateNewFileOnNextEvent();
731  else if (!isPlaying())
732  checkPosition();
733 
734  // bootstrap case: --port and no input file
736  {
737  m_loadedAnyInputFile = true;
738  m_navigator->firstEvent();
739  if (!isPlaying())
740  draw();
741  }
742 
743  std::stringstream sr;
744  sr <<"New file registered '"<<fileName<<"'";
745  guiManager()->updateStatus(sr.str().c_str());
746  }
747  else
748  {
749  std::stringstream sr;
750  sr <<"New file NOT registered '"<<fileName<<"'";
751  guiManager()->updateStatus(sr.str().c_str());
752  }
753  }
754 }
bool m_loadedAnyInputFile
Definition: CmsShowMain.h:119
virtual void checkPosition()
Definition: CmsShowMain.cc:586
FWGUIManager * guiManager()
void updateStatus(const char *status)
uint16_t size_type
std::auto_ptr< TMonitor > m_monitor
Definition: CmsShowMain.h:132
std::auto_ptr< CmsShowNavigator > m_navigator
Definition: CmsShowMain.h:114
bool isPlaying() const
bool forward() const
void CmsShowMain::openData ( )

Definition at line 460 of file CmsShowMain.cc.

References checkPosition(), FWGUIManager::clearStatus(), CmsShowMainBase::draw(), FWGUIManager::getMainFrame(), CmsShowMainBase::guiManager(), m_loadedAnyInputFile, m_navigator, and FWGUIManager::updateStatus().

Referenced by setupDataHandling().

461 {
462  const char* kRootType[] = {"ROOT files","*.root", 0, 0};
463  TGFileInfo fi;
464  fi.fFileTypes = kRootType;
465  /* this is how things used to be done:
466  fi.fIniDir = ".";
467  this is bad because the destructor calls delete[] on fIniDir.
468  */
469  fi.fIniDir = new char[128];
470  strncpy(fi.fIniDir, ".", 127);
471  guiManager()->updateStatus("waiting for data file ...");
472  new TGFileDialog(gClient->GetDefaultRoot(), guiManager()->getMainFrame(), kFDOpen, &fi);
473  guiManager()->updateStatus("loading file ...");
474  if (fi.fFilename) {
475  m_navigator->openFile(fi.fFilename);
476  m_loadedAnyInputFile = true;
477  m_navigator->firstEvent();
478  checkPosition();
479  draw();
480  }
481  guiManager()->clearStatus();
482 }
bool m_loadedAnyInputFile
Definition: CmsShowMain.h:119
virtual void checkPosition()
Definition: CmsShowMain.cc:586
FWGUIManager * guiManager()
void updateStatus(const char *status)
CmsShowMainFrame * getMainFrame() const
Definition: FWGUIManager.h:199
void clearStatus()
std::auto_ptr< CmsShowNavigator > m_navigator
Definition: CmsShowMain.h:114
void CmsShowMain::openDataViaURL ( )

Definition at line 509 of file CmsShowMain.cc.

References checkPosition(), FWGUIManager::clearStatus(), CmsShowMainBase::draw(), CmsShowMainBase::guiManager(), m_loadedAnyInputFile, m_navigator, m_searchFiles, AlCaHLTBitMon_QueryRunRegistry::string, and FWGUIManager::updateStatus().

Referenced by setupDataHandling().

510 {
511  if (m_searchFiles.get() == 0) {
512  m_searchFiles = std::auto_ptr<CmsShowSearchFiles>(new CmsShowSearchFiles("",
513  "Open Remote Data Files",
514  guiManager()->getMainFrame(),
515  500, 400));
516  m_searchFiles->CenterOnParent(kTRUE,TGTransientFrame::kBottomRight);
517  }
518  std::string chosenFile = m_searchFiles->chooseFileFromURL();
519  if(!chosenFile.empty()) {
520  guiManager()->updateStatus("loading file ...");
521  if(m_navigator->openFile(chosenFile.c_str())) {
522  m_loadedAnyInputFile = true;
523  m_navigator->firstEvent();
524  checkPosition();
525  draw();
526  guiManager()->clearStatus();
527  } else {
528  guiManager()->updateStatus("failed to load data file");
529  }
530  }
531 }
bool m_loadedAnyInputFile
Definition: CmsShowMain.h:119
virtual void checkPosition()
Definition: CmsShowMain.cc:586
FWGUIManager * guiManager()
void updateStatus(const char *status)
void clearStatus()
std::auto_ptr< CmsShowNavigator > m_navigator
Definition: CmsShowMain.h:114
std::auto_ptr< CmsShowSearchFiles > m_searchFiles
Definition: CmsShowMain.h:122
const CmsShowMain& CmsShowMain::operator= ( const CmsShowMain )
private
void CmsShowMain::postFiltering ( bool  doDraw)
private

Definition at line 795 of file CmsShowMain.cc.

References checkPosition(), FWGUIManager::clearStatus(), CmsShowMainBase::draw(), CmsShowMainBase::guiManager(), m_navigator, and FWGUIManager::setFilterButtonText().

Referenced by setupDataHandling().

796 {
797  // called only filter is changed
798  guiManager()->clearStatus();
799  if (doDraw) draw();
800  checkPosition();
801  guiManager()->setFilterButtonText(m_navigator->filterStatusMessage());
802 }
virtual void checkPosition()
Definition: CmsShowMain.cc:586
FWGUIManager * guiManager()
void clearStatus()
std::auto_ptr< CmsShowNavigator > m_navigator
Definition: CmsShowMain.h:114
void setFilterButtonText(const char *txt)
void CmsShowMain::preFiltering ( )
private

Definition at line 788 of file CmsShowMain.cc.

References CmsShowMainBase::guiManager(), and FWGUIManager::updateStatus().

789 {
790  // called only if filter has changed
791  guiManager()->updateStatus("Filtering events");
792 }
FWGUIManager * guiManager()
void updateStatus(const char *status)
void CmsShowMain::quit ( )
virtual

Implements CmsShowMainBase.

Definition at line 396 of file CmsShowMain.cc.

397 {
398  new DieTimer(this);
399 }
void CmsShowMain::reachedBeginning ( )
private
void CmsShowMain::reachedEnd ( )
private

Referenced by autoLoadNewEvent().

void CmsShowMain::resetInitialization ( )

Definition at line 456 of file CmsShowMain.cc.

456  {
457  //printf("Need to reset\n");
458 }
void CmsShowMain::setLiveMode ( )
private

Definition at line 807 of file CmsShowMain.cc.

References checkLiveMode(), m_live, m_liveTimeout, and m_liveTimer.

Referenced by CmsShowMain().

808 {
809  m_live = true;
810  m_liveTimer.reset(new SignalTimer());
811  m_liveTimer->timeout_.connect(boost::bind(&CmsShowMain::checkLiveMode,this));
812 
813  Window_t rootw, childw;
814  Int_t root_x, root_y, win_x, win_y;
815  UInt_t mask;
816  gVirtualX->QueryPointer(gClient->GetDefaultRoot()->GetId(),
817  rootw, childw,
818  root_x, root_y,
819  win_x, win_y,
820  mask);
821 
822 
823  m_liveTimer->SetTime(m_liveTimeout);
824  m_liveTimer->Reset();
825  m_liveTimer->TurnOn();
826 }
void checkLiveMode()
Definition: CmsShowMain.cc:829
std::auto_ptr< SignalTimer > m_liveTimer
Definition: CmsShowMain.h:126
int m_liveTimeout
Definition: CmsShowMain.h:127
void CmsShowMain::setupDataHandling ( )
private

Definition at line 607 of file CmsShowMain.cc.

References CSGAction::activated, appendData(), FWEventItemsManager::begin(), checkPosition(), CmsShowMainBase::draw(), CmsShowMainBase::eiManager(), FWEventItemsManager::end(), fileChangedSlot(), filterButtonClicked(), FWGUIManager::filterButtonClicked_, alignmentValidation::fname, FWGUIManager::getAction(), CmsShowMainBase::guiManager(), cuy::ii, m_inputFiles, m_loadedAnyInputFile, m_monitor, m_navigator, navigatorChangedFilterState(), openData(), openDataViaURL(), postFiltering(), cmsshow::sAppendData, FWGUIManager::setFilterButtonIcon(), CmsShowMainBase::setupActions(), CmsShowNavigator::showEventFilterGUI(), FWGUIManager::showEventFilterGUI_, cmsshow::sOpenData, cmsshow::sSearchFiles, AlCaHLTBitMon_QueryRunRegistry::string, FWGUIManager::updateEventFilterEnable(), and FWGUIManager::updateStatus().

Referenced by CmsShowMain().

608 {
609  guiManager()->updateStatus("Setting up data handling...");
610 
611 
612  // navigator filtering ->
613  m_navigator->fileChanged_.connect(boost::bind(&CmsShowMain::fileChangedSlot, this, _1));
614  m_navigator->editFiltersExternally_.connect(boost::bind(&FWGUIManager::updateEventFilterEnable, guiManager(), _1));
615  m_navigator->filterStateChanged_.connect(boost::bind(&CmsShowMain::navigatorChangedFilterState, this, _1));
616  m_navigator->postFiltering_.connect(boost::bind(&CmsShowMain::postFiltering, this, _1));
617 
618  // navigator fitlering <-
621 
622  // Data handling. File related and therefore not in the base class.
623  if (guiManager()->getAction(cmsshow::sOpenData) != 0)
624  guiManager()->getAction(cmsshow::sOpenData)->activated.connect(sigc::mem_fun(*this, &CmsShowMain::openData));
625  if (guiManager()->getAction(cmsshow::sAppendData) != 0)
626  guiManager()->getAction(cmsshow::sAppendData)->activated.connect(sigc::mem_fun(*this, &CmsShowMain::appendData));
627  if (guiManager()->getAction(cmsshow::sSearchFiles) != 0)
629 
630  setupActions();
631  // init data from CmsShowNavigator configuration, can do this with signals since there were not connected yet
632  guiManager()->setFilterButtonIcon(m_navigator->getFilterState());
633 
634  for (unsigned int ii = 0; ii < m_inputFiles.size(); ++ii)
635  {
636  const std::string& fname = m_inputFiles[ii];
637  if (fname.empty())
638  continue;
639  guiManager()->updateStatus("loading data file ...");
640  if (!m_navigator->appendFile(fname, false, false))
641  {
642  guiManager()->updateStatus("failed to load data file");
643  }
644  else
645  {
646  m_loadedAnyInputFile = true;
647 
648  }
649  }
650 
652  {
653  m_navigator->firstEvent();
654  checkPosition();
655  draw();
656  }
657  else if (m_monitor.get() == 0 && (eiManager()->begin() != eiManager()->end()) )
658  {
659  if (m_inputFiles.empty())
660  openDataViaURL();
661  else
662  openData();
663  }
664 }
void fileChangedSlot(const TFile *file)
Definition: CmsShowMain.cc:439
void navigatorChangedFilterState(int)
Definition: CmsShowMain.cc:768
void openData()
Definition: CmsShowMain.cc:460
void showEventFilterGUI(const TGWindow *p)
sigc::signal< void > filterButtonClicked_
Definition: FWGUIManager.h:205
bool m_loadedAnyInputFile
Definition: CmsShowMain.h:119
virtual void checkPosition()
Definition: CmsShowMain.cc:586
FWGUIManager * guiManager()
void appendData()
Definition: CmsShowMain.cc:484
void setFilterButtonIcon(int)
FWEventItemsManager * eiManager()
sigc::signal< void > activated
Definition: CSGAction.h:88
const std::string sOpenData
Definition: ActionsList.cc:12
void updateStatus(const char *status)
int ii
Definition: cuy.py:588
void filterButtonClicked()
Definition: CmsShowMain.cc:779
const std::string sAppendData
Definition: ActionsList.cc:13
std::auto_ptr< TMonitor > m_monitor
Definition: CmsShowMain.h:132
sigc::signal< void, const TGWindow * > showEventFilterGUI_
Definition: FWGUIManager.h:206
std::vector< std::string > m_inputFiles
Definition: CmsShowMain.h:118
void postFiltering(bool)
Definition: CmsShowMain.cc:795
const_iterator begin() const
NOTE: iterator is allowed to return a null object for items that have been removed.
CSGAction * getAction(const std::string name)
void updateEventFilterEnable(bool)
std::auto_ptr< CmsShowNavigator > m_navigator
Definition: CmsShowMain.h:114
string fname
main script
void openDataViaURL()
Definition: CmsShowMain.cc:509
const_iterator end() const
const std::string sSearchFiles
Definition: ActionsList.cc:14
void CmsShowMain::setupSocket ( unsigned int  iSocket)
private

Definition at line 667 of file CmsShowMain.cc.

References cmsRelvalreport::exit, fwLog, fwlog::kError, m_monitor, and contentValuesFiles::server.

Referenced by CmsShowMain().

668 {
669  m_monitor = std::auto_ptr<TMonitor>(new TMonitor);
670  TServerSocket* server = new TServerSocket(iSocket,kTRUE);
671  if (server->GetErrorCode())
672  {
673  fwLog(fwlog::kError) << "CmsShowMain::setupSocket, can't create socket on port "<< iSocket << "." << std::endl;
674  exit(0);
675  }
676  m_monitor->Add(server);
677 }
std::auto_ptr< TMonitor > m_monitor
Definition: CmsShowMain.h:132
#define fwLog(_level_)
Definition: fwLog.h:50
void CmsShowMain::stopPlaying ( )
privatevirtual

Implements CmsShowMainBase.

Definition at line 757 of file CmsShowMain.cc.

References checkPosition(), FWGUIManager::enableActions(), CmsShowMainBase::guiManager(), m_live, m_navigator, CmsShowMainBase::setIsPlaying(), and CmsShowMainBase::stopAutoLoadTimer().

758 {
760  if (m_live)
761  m_navigator->resetNewFileOnNextEvent();
762  setIsPlaying(false);
764  checkPosition();
765 }
virtual void checkPosition()
Definition: CmsShowMain.cc:586
FWGUIManager * guiManager()
void enableActions(bool enable=true)
void setIsPlaying(bool value)
std::auto_ptr< CmsShowNavigator > m_navigator
Definition: CmsShowMain.h:114

Member Data Documentation

std::auto_ptr<fireworks::Context> CmsShowMain::m_context
private

Definition at line 116 of file CmsShowMain.h.

Referenced by CmsShowMain(), context(), and doExit().

std::vector<std::string> CmsShowMain::m_inputFiles
private

Definition at line 118 of file CmsShowMain.h.

Referenced by CmsShowMain(), and setupDataHandling().

UInt_t CmsShowMain::m_lastXEventSerial
private

Definition at line 128 of file CmsShowMain.h.

Referenced by checkLiveMode().

bool CmsShowMain::m_live
private

Definition at line 125 of file CmsShowMain.h.

Referenced by notified(), setLiveMode(), and stopPlaying().

int CmsShowMain::m_liveTimeout
private

Definition at line 127 of file CmsShowMain.h.

Referenced by checkLiveMode(), and setLiveMode().

std::auto_ptr<SignalTimer> CmsShowMain::m_liveTimer
private

Definition at line 126 of file CmsShowMain.h.

Referenced by checkLiveMode(), and setLiveMode().

bool CmsShowMain::m_loadedAnyInputFile
private
std::auto_ptr<FWLiteJobMetadataManager> CmsShowMain::m_metadataManager
private

Definition at line 115 of file CmsShowMain.h.

Referenced by CmsShowMain(), eventChangedImp(), and fileChangedSlot().

std::auto_ptr<TMonitor> CmsShowMain::m_monitor
private
std::auto_ptr<CmsShowNavigator> CmsShowMain::m_navigator
private
bool CmsShowMain::m_noVersionCheck
private

Definition at line 130 of file CmsShowMain.h.

Referenced by CmsShowMain(), and getVersionCheck().

const TFile* CmsShowMain::m_openFile
private

Definition at line 120 of file CmsShowMain.h.

Referenced by eventChangedImp(), and fileChangedSlot().

std::auto_ptr<CmsShowSearchFiles> CmsShowMain::m_searchFiles
private

Definition at line 122 of file CmsShowMain.h.

Referenced by openDataViaURL().