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 setAutoSaveAllViewsHeight (int x)
 
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 114 of file CmsShowMain.cc.

References CmsShowTaskExecutor::addTask(), cond::ecalcond::all, dir2webdir::argc, getDQMSummary::argv, CmsShowMainBase::configFilename(), CmsShowMainBase::configurationManager(), 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, kAutoSaveHeight, kAutoSaveType, 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::setAutoSaveAllViewsHeight(), CmsShowMainBase::setConfigFilename(), FWEventItemsManager::setContext(), CmsShowMainBase::setGeometryFilename(), FWConfigurationManager::setIgnore(), 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.

115  : CmsShowMainBase(),
116  m_navigator(new CmsShowNavigator(*this)),
120  eiManager(),
121  colorManager(),
122  m_metadataManager.get())),
123  m_loadedAnyInputFile(false),
124  m_openFile(0),
125  m_live(false),
126  m_liveTimer(new SignalTimer()),
127  m_liveTimeout(600000),
129  m_noVersionCheck(false)
130 {
131  try {
132  TGLWidget* w = TGLWidget::Create(gClient->GetDefaultRoot(), kTRUE, kTRUE, 0, 10, 10);
133  delete w;
134  }
135  catch (std::exception& iException) {
136  fwLog(fwlog::kError) << "Failed creating an OpenGL window: " << iException.what() << "\n"
137  "Things to check:\n"
138  "- Is DISPLAY environment variable set?\n"
139  "- Are OpenGL libraries installed?\n"
140  "- If running remotely, make sure you use 'ssh -X' or 'ssh -Y'.\n"
141  "See also: https://twiki.cern.ch/twiki/bin/viewauth/CMS/WorkBookFireworks\n";
142  gSystem->Exit(1);
143  }
144 
145  eiManager()->setContext(m_context.get());
146 
147 
148  std::string descString(argv[0]);
149  descString += " [options] <data file>\nGeneral";
150 
151  namespace po = boost::program_options;
152  po::options_description desc(descString);
153  desc.add_options()
154  (kInputFilesCommandOpt, po::value< std::vector<std::string> >(), "Input root files")
155  (kConfigFileCommandOpt, po::value<std::string>(), "Include configuration file")
156  (kNoConfigFileCommandOpt, "Empty configuration")
157  (kNoVersionCheck, "No file version check")
158  (kGeomFileCommandOpt, po::value<std::string>(), "Reco geometry file. Default is cmsGeom10.root")
159  (kSimGeomFileCommandOpt,po::value<std::string>(), "Geometry file for browsing in table view. Default is CmsSimGeom-14.root. Can be simulation or reco geometry in TGeo format")
160  (kFieldCommandOpt, po::value<double>(), "Set magnetic field value explicitly. Default is auto-field estimation")
161  (kRootInteractiveCommandOpt, "Enable root interactive prompt")
162  (kSoftCommandOpt, "Try to force software rendering to avoid problems with bad hardware drivers")
163  (kHelpCommandOpt, "Display help message");
164 
165  po::options_description livedesc("Live Event Display");
166  livedesc.add_options()
167  (kPlayCommandOpt, po::value<float>(), "Start in play mode with given interval between events in seconds")
168  (kPortCommandOpt, po::value<unsigned int>(), "Listen to port for new data files to open")
169  (kLoopCommandOpt, "Loop events in play mode")
170  (kChainCommandOpt, po::value<unsigned int>(), "Chain up to a given number of recently open files. Default is 1 - no chain")
171  (kLiveCommandOpt, "Enforce playback mode if a user is not using display")
172  (kAutoSaveAllViews, po::value<std::string>(), "Auto-save all views with given prefix (run_event_lumi_view.<auto-save-type> is appended)")
173  (kAutoSaveType, po::value<std::string>(), "Image type of auto-saved views, png or jpg (png is default)")
174  (kAutoSaveHeight, po::value<int>(), "Screenshots height when auto-save-all-views is enabled");
175 
176  po::options_description debugdesc("Debug");
177  debugdesc.add_options()
178  (kLogLevelCommandOpt, po::value<unsigned int>(), "Set log level starting from 0 to 4 : kDebug, kInfo, kWarning, kError")
179  (kEveCommandOpt, "Show TEveBrowser to help debug problems")
180  (kEnableFPE, "Enable detection of floating-point exceptions");
181 
182 
183  po::options_description rnrdesc("Appearance");
184  rnrdesc.add_options()
185  (kFreePaletteCommandOpt, "Allow free color selection (requires special configuration!)")
186  (kZeroWinOffsets, "Disable auto-detection of window position offsets")
187  (kAdvancedRenderCommandOpt, "Enable line anti-aliasing");
188  po::positional_options_description p;
189  p.add(kInputFilesOpt, -1);
190 
191 
192  po::options_description hiddendesc("hidden");
193  hiddendesc.add_options();
194 
195  po::options_description all("");
196  all.add(desc).add(rnrdesc).add(livedesc).add(debugdesc);
197 
198 
199  int newArgc = argc;
200  char **newArgv = argv;
201  po::variables_map vm;
202  try{
203  po::store(po::command_line_parser(newArgc, newArgv).
204  options(all).positional(p).run(), vm);
205 
206  po::notify(vm);
207  }
208  catch ( const std::exception& e)
209  {
210  // Return with exit status 0 to avoid generating crash reports
211 
212  fwLog(fwlog::kError) << e.what() << std::endl;
213  std::cout << all <<std::endl;
214  exit(0);
215  }
216 
217  if(vm.count(kHelpOpt)) {
218  std::cout << all <<std::endl;
219  exit(0);
220  }
221 
222  if(vm.count(kLogLevelOpt)) {
223  fwlog::LogLevel level = (fwlog::LogLevel)(vm[kLogLevelOpt].as<unsigned int>());
225  }
226 
227  if(vm.count(kPlainRootCommandOpt)) {
228  fwLog(fwlog::kInfo) << "Plain ROOT prompt requested" << std::endl;
229  return;
230  }
231 
232  const char* cmspath = gSystem->Getenv("CMSSW_BASE");
233  if(0 == cmspath) {
234  throw std::runtime_error("CMSSW_BASE environment variable not set");
235  }
236 
237  // input file
238  if (vm.count(kInputFilesOpt)) {
239  m_inputFiles = vm[kInputFilesOpt].as< std::vector<std::string> >();
240  }
241 
242  if (!m_inputFiles.size())
243  fwLog(fwlog::kInfo) << "No data file given." << std::endl;
244  else if (m_inputFiles.size() == 1)
245  fwLog(fwlog::kInfo) << "Input " << m_inputFiles.front() << std::endl;
246  else
247  fwLog(fwlog::kInfo) << m_inputFiles.size() << " input files; first: " << m_inputFiles.front() << ", last: " << m_inputFiles.back() << std::endl;
248 
249  // configuration file
250  if (vm.count(kConfigFileOpt)) {
251  setConfigFilename(vm[kConfigFileOpt].as<std::string>());
252  if (access(configFilename(), R_OK) == -1)
253  {
254  fwLog(fwlog::kError) << "Specified configuration file does not exist. Quitting.\n";
255  exit(1);
256  }
257 
258  fwLog(fwlog::kInfo) << "Config " << configFilename() << std::endl;
259  } else {
260  if (vm.count(kNoConfigFileOpt)) {
261  fwLog(fwlog::kInfo) << "No configuration is loaded.\n";
263  }
264  }
265 
266  // geometry
267  if (vm.count(kGeomFileOpt)) {
268  setGeometryFilename(vm[kGeomFileOpt].as<std::string>());
269  fwLog(fwlog::kInfo) << "Geometry file " << geometryFilename() << "\n";
270  } else {
271  // fwLog(fwlog::kInfo) << "No geom file name. Choosing default.\n";
272  setGeometryFilename("cmsGeom10.root");
273  }
274 
275  if (vm.count(kSimGeomFileOpt)) {
276  setSimGeometryFilename(vm[kSimGeomFileOpt].as<std::string>());
277  } else {
278  setSimGeometryFilename("cmsSimGeom-14.root");
279  }
280  // Free-palette palette
281  if (vm.count(kFreePaletteCommandOpt)) {
283  fwLog(fwlog::kInfo) << "Palette restriction removed on user request!\n";
284  }
285  bool eveMode = vm.count(kEveOpt);
286 
287  //Delay creating guiManager and enabling autoloading until here so that if we have a 'help' request we don't
288  // open any graphics or build dictionaries
290 
291  TEveManager::Create(kFALSE, eveMode ? "FIV" : "FI");
292 
293  setup(m_navigator.get(), m_context.get(), m_metadataManager.get());
294 
295  if (vm.count(kZeroWinOffsets))
296  {
298  fwLog(fwlog::kInfo) << "Window offsets reset on user request!\n";
299  }
300 
301  if ( vm.count(kAdvancedRenderOpt) )
302  {
303  TEveLine::SetDefaultSmooth(kTRUE);
304  }
305 
306  //figure out where to find macros
307  //tell ROOT where to find our macros
309  // first check if port is not occupied
310  if (vm.count(kPortCommandOpt)) {
311  f=boost::bind(&CmsShowMain::setupSocket, this, vm[kPortCommandOpt].as<unsigned int>());
312  startupTasks()->addTask(f);
313  }
314 
315  f=boost::bind(&CmsShowMainBase::loadGeometry,this);
316  startupTasks()->addTask(f);
317  f=boost::bind(&CmsShowMainBase::setupViewManagers,this);
318  startupTasks()->addTask(f);
319 
320  if ( m_inputFiles.empty()) {
321  f=boost::bind(&CmsShowMainBase::setupConfiguration,this);
322  startupTasks()->addTask(f);
323  f=boost::bind(&CmsShowMain::setupDataHandling,this);
324  startupTasks()->addTask(f);
325  }
326  else {
327  f=boost::bind(&CmsShowMain::setupDataHandling,this);
328  startupTasks()->addTask(f);
329  f=boost::bind(&CmsShowMainBase::setupConfiguration,this);
330  startupTasks()->addTask(f);
331  }
332 
333  if (vm.count(kLoopOpt))
334  setPlayLoop();
335 
336  if (eveMode) {
337  f = boost::bind(&CmsShowMainBase::setupDebugSupport,this);
338  startupTasks()->addTask(f);
339  }
340  if(vm.count(kChainCommandOpt)) {
341  f = boost::bind(&CmsShowNavigator::setMaxNumberOfFilesToChain, m_navigator.get(), vm[kChainCommandOpt].as<unsigned int>());
342  startupTasks()->addTask(f);
343  }
344  if (vm.count(kPlayOpt)) {
345  f = boost::bind(&CmsShowMainBase::setupAutoLoad, this, vm[kPlayOpt].as<float>());
346  startupTasks()->addTask(f);
347  }
348 
349  if(vm.count(kLiveCommandOpt))
350  {
351  f = boost::bind(&CmsShowMain::setLiveMode, this);
352  startupTasks()->addTask(f);
353  }
354 
355  if(vm.count(kFieldCommandOpt))
356  {
357  m_context->getField()->setSource(FWMagField::kUser);
358  m_context->getField()->setUserField(vm[kFieldCommandOpt].as<double>());
359  }
360  if(vm.count(kAutoSaveAllViews)) {
361  std::string type = "png";
362  if(vm.count(kAutoSaveType)) {
363  type = vm[kAutoSaveType].as<std::string>();
364  if (type != "png" && type != "jpg")
365  {
366  fwLog(fwlog::kError) << "Specified auto-save type not supported. Quitting.\n";
367  exit(1);
368  }
369  }
371  fmt += "%u_%u_%llu_%s.";
372  fmt += type;
374  }
375  if (vm.count(kAutoSaveHeight)) {
377  }
378  if(vm.count(kNoVersionCheck)) {
379  m_noVersionCheck=true;
380  }
381  if(vm.count(kEnableFPE)) {
382  gSystem->SetFPEMask();
383  }
384 
385  if (vm.count(kPortCommandOpt)) {
386  f=boost::bind(&CmsShowMain::connectSocket, this);
387  startupTasks()->addTask(f);
388  }
389 
391 }
static const char *const kPlayCommandOpt
Definition: CmsShowMain.cc:84
static const char *const kNoVersionCheck
Definition: CmsShowMain.cc:108
type
Definition: HCALResponse.h:21
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
const double w
Definition: UKUtility.cc:23
FWGUIManager * guiManager()
FWColorManager * colorManager()
static const char *const kZeroWinOffsets
Definition: CmsShowMain.cc:107
void setupSocket(unsigned int)
Definition: CmsShowMain.cc:693
static const char *const kFieldCommandOpt
Definition: CmsShowMain.cc:101
void setAutoSaveAllViewsHeight(int x)
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:633
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:106
std::vector< std::string > m_inputFiles
Definition: CmsShowMain.h:118
void setLiveMode()
Definition: CmsShowMain.cc:833
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 kAutoSaveType
Definition: CmsShowMain.cc:104
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
FWConfigurationManager * configurationManager()
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
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:706
static const char *const kHelpOpt
Definition: CmsShowMain.cc:93
static const char *const kLoopCommandOpt
Definition: CmsShowMain.cc:86
static const char *const kAutoSaveHeight
Definition: CmsShowMain.cc:105
void setConfigFilename(const std::string &f)
CmsShowMain::~CmsShowMain ( )
virtual

Definition at line 397 of file CmsShowMain.cc.

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

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

Member Function Documentation

void CmsShowMain::appendData ( )

Definition at line 510 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().

511 {
512  const char* kRootType[] = {"ROOT files","*.root", 0, 0};
513  TGFileInfo fi;
514  fi.fFileTypes = kRootType;
515  /* this is how things used to be done:
516  fi.fIniDir = ".";
517  this is bad because the destructor calls delete[] on fIniDir.
518  */
519  fi.fIniDir = new char[128];
520  strncpy(fi.fIniDir, ".", 127);
521  guiManager()->updateStatus("waiting for data file ...");
522  new TGFileDialog(gClient->GetDefaultRoot(), guiManager()->getMainFrame(), kFDOpen, &fi);
523  guiManager()->updateStatus("loading file ...");
524  if (fi.fFilename) {
525  m_navigator->appendFile(fi.fFilename, false, false);
526  m_loadedAnyInputFile = true;
527  checkPosition();
528  draw();
529  guiManager()->titleChanged(m_navigator->frameTitle());
530  }
531  guiManager()->clearStatus();
532 }
bool m_loadedAnyInputFile
Definition: CmsShowMain.h:119
virtual void checkPosition()
Definition: CmsShowMain.cc:612
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 565 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().

566 {
568 
569  // case when start with no input file
571  {
572  if (m_monitor.get())
574  return;
575  }
576 
577  bool reachedEnd = (forward() && m_navigator->isLastEvent()) || (!forward() && m_navigator->isFirstEvent());
578 
579  if (loop() && reachedEnd)
580  {
581  forward() ? m_navigator->firstEvent() : m_navigator->lastEvent();
582  draw();
583  }
584  else if (!reachedEnd)
585  {
586  forward() ? m_navigator->nextEvent() : m_navigator->previousEvent();
587  draw();
588  }
589 
590  // stop loop in case no loop or monitor mode
591  if (reachedEnd && (loop() || m_monitor.get()) == kFALSE)
592  {
593  if (forward() && m_navigator->isLastEvent())
594  {
596  checkPosition();
597  }
598 
599  if ((!forward()) && m_navigator->isFirstEvent())
600  {
602  checkPosition();
603  }
604  }
605  else
607 }
bool m_loadedAnyInputFile
Definition: CmsShowMain.h:119
virtual void checkPosition()
Definition: CmsShowMain.cc:612
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 855 of file CmsShowMain.cc.

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

Referenced by setLiveMode().

856 {
857  m_liveTimer->TurnOff();
858 
859 #if defined(R__LINUX)
860  TGX11 *x11 = dynamic_cast<TGX11*>(gVirtualX);
861  if (x11) {
862  XAnyEvent *ev = (XAnyEvent*) x11->GetNativeEvent();
863  // printf("serial %d \n",(int)ev->serial );
864 
865  if ( !isPlaying() && m_lastXEventSerial == ev->serial )
867  m_lastXEventSerial = ev->serial;
868  }
869 #endif
870  m_liveTimer->SetTime((Long_t)(m_liveTimeout));
871  m_liveTimer->Reset();
872  m_liveTimer->TurnOn();
873 }
FWGUIManager * guiManager()
bool ev
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 612 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().

613 {
614  if ((m_monitor.get() || loop() ) && isPlaying())
615  return;
616 
618 
619  if (m_navigator->isFirstEvent())
621 
622  if (m_navigator->isLastEvent())
623  {
624  guiManager()->disableNext();
625  // force enable play events action in --port mode
626  if (m_monitor.get() && !guiManager()->playEventsAction()->isEnabled())
628  }
629 }
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 706 of file CmsShowMain.cc.

References m_monitor.

Referenced by CmsShowMain().

707 {
708  m_monitor->Connect("Ready(TSocket*)","CmsShowMain",this,"notified(TSocket*)");
709 
710 }
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 427 of file CmsShowMain.cc.

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

Referenced by DieTimer::Notify().

428 {
429  // pre terminate eve
430  m_context->deleteEveElements();
432 
433  // sleep at least 150 ms
434  // windows in ROOT GUI are destroyed in 150 ms timeout after
435  gSystem->Sleep(151);
436  gSystem->ProcessEvents();
437  gSystem->ExitLoop();
438 }
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 475 of file CmsShowMain.cc.

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

476 {
478  guiManager()->titleChanged(m_navigator->frameTitle());
480 }
const fwlite::Event * getCurrentEvent() const
Definition: CmsShowMain.cc:457
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 465 of file CmsShowMain.cc.

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

Referenced by setupDataHandling().

466 {
467  m_openFile = file;
468  if (file)
469  guiManager()->titleChanged(m_navigator->frameTitle());
470 
472 }
const fwlite::Event * getCurrentEvent() const
Definition: CmsShowMain.cc:457
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 805 of file CmsShowMain.cc.

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

Referenced by setupDataHandling().

806 {
807  if (m_navigator->getFilterState() == CmsShowNavigator::kWithdrawn )
809  else
810  m_navigator->toggleFilterEnable();
811 }
FWGUIManager * guiManager()
std::auto_ptr< CmsShowNavigator > m_navigator
Definition: CmsShowMain.h:114
void showEventFilterGUI()
const fwlite::Event * CmsShowMain::getCurrentEvent ( ) const

Definition at line 457 of file CmsShowMain.cc.

References m_navigator.

Referenced by eventChangedImp(), and fileChangedSlot().

458 {
459  if (m_navigator.get())
460  return static_cast<const fwlite::Event*>(m_navigator->getCurrentEvent());
461  return 0;
462 }
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 794 of file CmsShowMain.cc.

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

Referenced by setupDataHandling().

795 {
797  if (m_navigator->filesNeedUpdate() == false)
798  {
799  guiManager()->setFilterButtonText(m_navigator->filterStatusMessage());
800  checkPosition();
801  }
802 }
virtual void checkPosition()
Definition: CmsShowMain.cc:612
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 713 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().

714 {
715  TServerSocket* server = dynamic_cast<TServerSocket*> (iSocket);
716  if (server)
717  {
718  TSocket* connection = server->Accept();
719  if (connection)
720  {
721  m_monitor->Add(connection);
722  std::stringstream s;
723  s << "received connection from "<<iSocket->GetInetAddress().GetHostName();
724  guiManager()->updateStatus(s.str().c_str());
725  }
726  }
727  else
728  {
729  char buffer[4096];
730  memset(buffer,0,sizeof(buffer));
731  if (iSocket->RecvRaw(buffer, sizeof(buffer)) <= 0)
732  {
733  m_monitor->Remove(iSocket);
734  //std::stringstream s;
735  //s << "closing connection to "<<iSocket->GetInetAddress().GetHostName();
736  //m_guiManager->updateStatus(s.str().c_str());
737  delete iSocket;
738  return;
739  }
740  std::string fileName(buffer);
741  std::string::size_type lastNonSpace = fileName.find_last_not_of(" \n\t");
742  if (lastNonSpace != std::string::npos)
743  {
744  fileName.erase(lastNonSpace+1);
745  }
746 
747  std::stringstream s;
748  s <<"New file notified '"<<fileName<<"'";
749  guiManager()->updateStatus(s.str().c_str());
750 
751  bool appended = m_navigator->appendFile(fileName, true, m_live);
752 
753  if (appended)
754  {
755  if (m_live && isPlaying() && forward())
756  m_navigator->activateNewFileOnNextEvent();
757  else if (!isPlaying())
758  checkPosition();
759 
760  // bootstrap case: --port and no input file
762  {
763  m_loadedAnyInputFile = true;
764  m_navigator->firstEvent();
765  if (!isPlaying())
766  draw();
767  }
768 
769  std::stringstream sr;
770  sr <<"New file registered '"<<fileName<<"'";
771  guiManager()->updateStatus(sr.str().c_str());
772  }
773  else
774  {
775  std::stringstream sr;
776  sr <<"New file NOT registered '"<<fileName<<"'";
777  guiManager()->updateStatus(sr.str().c_str());
778  }
779  }
780 }
bool m_loadedAnyInputFile
Definition: CmsShowMain.h:119
virtual void checkPosition()
Definition: CmsShowMain.cc:612
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 486 of file CmsShowMain.cc.

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

Referenced by setupDataHandling().

487 {
488  const char* kRootType[] = {"ROOT files","*.root", 0, 0};
489  TGFileInfo fi;
490  fi.fFileTypes = kRootType;
491  /* this is how things used to be done:
492  fi.fIniDir = ".";
493  this is bad because the destructor calls delete[] on fIniDir.
494  */
495  fi.fIniDir = new char[128];
496  strncpy(fi.fIniDir, ".", 127);
497  guiManager()->updateStatus("waiting for data file ...");
498  new TGFileDialog(gClient->GetDefaultRoot(), guiManager()->getMainFrame(), kFDOpen, &fi);
499  guiManager()->updateStatus("loading file ...");
500  if (fi.fFilename) {
501  m_navigator->openFile(fi.fFilename);
502  m_loadedAnyInputFile = true;
503  m_navigator->firstEvent();
504  checkPosition();
505  draw();
506  }
507  guiManager()->clearStatus();
508 }
bool m_loadedAnyInputFile
Definition: CmsShowMain.h:119
virtual void checkPosition()
Definition: CmsShowMain.cc:612
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 535 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().

536 {
537  if (m_searchFiles.get() == 0) {
538  m_searchFiles = std::auto_ptr<CmsShowSearchFiles>(new CmsShowSearchFiles("",
539  "Open Remote Data Files",
540  guiManager()->getMainFrame(),
541  500, 400));
542  m_searchFiles->CenterOnParent(kTRUE,TGTransientFrame::kBottomRight);
543  }
544  std::string chosenFile = m_searchFiles->chooseFileFromURL();
545  if(!chosenFile.empty()) {
546  guiManager()->updateStatus("loading file ...");
547  if(m_navigator->openFile(chosenFile.c_str())) {
548  m_loadedAnyInputFile = true;
549  m_navigator->firstEvent();
550  checkPosition();
551  draw();
552  guiManager()->clearStatus();
553  } else {
554  guiManager()->updateStatus("failed to load data file");
555  }
556  }
557 }
bool m_loadedAnyInputFile
Definition: CmsShowMain.h:119
virtual void checkPosition()
Definition: CmsShowMain.cc:612
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 821 of file CmsShowMain.cc.

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

Referenced by setupDataHandling().

822 {
823  // called only filter is changed
824  guiManager()->clearStatus();
825  if (doDraw) draw();
826  checkPosition();
827  guiManager()->setFilterButtonText(m_navigator->filterStatusMessage());
828 }
virtual void checkPosition()
Definition: CmsShowMain.cc:612
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 814 of file CmsShowMain.cc.

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

815 {
816  // called only if filter has changed
817  guiManager()->updateStatus("Filtering events");
818 }
FWGUIManager * guiManager()
void updateStatus(const char *status)
void CmsShowMain::quit ( )
virtual

Implements CmsShowMainBase.

Definition at line 422 of file CmsShowMain.cc.

423 {
424  new DieTimer(this);
425 }
void CmsShowMain::reachedBeginning ( )
private
void CmsShowMain::reachedEnd ( )
private

Referenced by autoLoadNewEvent().

void CmsShowMain::resetInitialization ( )

Definition at line 482 of file CmsShowMain.cc.

482  {
483  //printf("Need to reset\n");
484 }
void CmsShowMain::setLiveMode ( )
private

Definition at line 833 of file CmsShowMain.cc.

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

Referenced by CmsShowMain().

834 {
835  m_live = true;
836  m_liveTimer.reset(new SignalTimer());
837  m_liveTimer->timeout_.connect(boost::bind(&CmsShowMain::checkLiveMode,this));
838 
839  Window_t rootw, childw;
840  Int_t root_x, root_y, win_x, win_y;
841  UInt_t mask;
842  gVirtualX->QueryPointer(gClient->GetDefaultRoot()->GetId(),
843  rootw, childw,
844  root_x, root_y,
845  win_x, win_y,
846  mask);
847 
848 
849  m_liveTimer->SetTime(m_liveTimeout);
850  m_liveTimer->Reset();
851  m_liveTimer->TurnOn();
852 }
void checkLiveMode()
Definition: CmsShowMain.cc:855
std::auto_ptr< SignalTimer > m_liveTimer
Definition: CmsShowMain.h:126
int m_liveTimeout
Definition: CmsShowMain.h:127
void CmsShowMain::setupDataHandling ( )
private

Definition at line 633 of file CmsShowMain.cc.

References CSGAction::activated, appendData(), checkPosition(), CmsShowMainBase::configurationManager(), CmsShowMainBase::draw(), fileChangedSlot(), filterButtonClicked(), FWGUIManager::filterButtonClicked_, alignmentValidation::fname, FWGUIManager::getAction(), FWConfigurationManager::getIgnore(), 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().

634 {
635  guiManager()->updateStatus("Setting up data handling...");
636 
637 
638  // navigator filtering ->
639  m_navigator->fileChanged_.connect(boost::bind(&CmsShowMain::fileChangedSlot, this, _1));
640  m_navigator->editFiltersExternally_.connect(boost::bind(&FWGUIManager::updateEventFilterEnable, guiManager(), _1));
641  m_navigator->filterStateChanged_.connect(boost::bind(&CmsShowMain::navigatorChangedFilterState, this, _1));
642  m_navigator->postFiltering_.connect(boost::bind(&CmsShowMain::postFiltering, this, _1));
643 
644  // navigator fitlering <-
647 
648  // Data handling. File related and therefore not in the base class.
649  if (guiManager()->getAction(cmsshow::sOpenData) != 0)
650  guiManager()->getAction(cmsshow::sOpenData)->activated.connect(sigc::mem_fun(*this, &CmsShowMain::openData));
651  if (guiManager()->getAction(cmsshow::sAppendData) != 0)
652  guiManager()->getAction(cmsshow::sAppendData)->activated.connect(sigc::mem_fun(*this, &CmsShowMain::appendData));
653  if (guiManager()->getAction(cmsshow::sSearchFiles) != 0)
655 
656  setupActions();
657  // init data from CmsShowNavigator configuration, can do this with signals since there were not connected yet
658  guiManager()->setFilterButtonIcon(m_navigator->getFilterState());
659 
660  for (unsigned int ii = 0; ii < m_inputFiles.size(); ++ii)
661  {
662  const std::string& fname = m_inputFiles[ii];
663  if (fname.empty())
664  continue;
665  guiManager()->updateStatus("loading data file ...");
666  if (!m_navigator->appendFile(fname, false, false))
667  {
668  guiManager()->updateStatus("failed to load data file");
669  }
670  else
671  {
672  m_loadedAnyInputFile = true;
673 
674  }
675  }
676 
678  {
679  m_navigator->firstEvent();
680  checkPosition();
681  draw();
682  }
683  else if (m_monitor.get() == 0 && (configurationManager()->getIgnore() == false) )
684  {
685  if (m_inputFiles.empty())
686  openDataViaURL();
687  else
688  openData();
689  }
690 }
void fileChangedSlot(const TFile *file)
Definition: CmsShowMain.cc:465
void navigatorChangedFilterState(int)
Definition: CmsShowMain.cc:794
void openData()
Definition: CmsShowMain.cc:486
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:612
FWGUIManager * guiManager()
void appendData()
Definition: CmsShowMain.cc:510
void setFilterButtonIcon(int)
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:805
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:821
CSGAction * getAction(const std::string name)
void updateEventFilterEnable(bool)
std::auto_ptr< CmsShowNavigator > m_navigator
Definition: CmsShowMain.h:114
string fname
main script
FWConfigurationManager * configurationManager()
void openDataViaURL()
Definition: CmsShowMain.cc:535
const std::string sSearchFiles
Definition: ActionsList.cc:14
void CmsShowMain::setupSocket ( unsigned int  iSocket)
private

Definition at line 693 of file CmsShowMain.cc.

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

Referenced by CmsShowMain().

694 {
695  m_monitor = std::auto_ptr<TMonitor>(new TMonitor);
696  TServerSocket* server = new TServerSocket(iSocket,kTRUE);
697  if (server->GetErrorCode())
698  {
699  fwLog(fwlog::kError) << "CmsShowMain::setupSocket, can't create socket on port "<< iSocket << "." << std::endl;
700  exit(0);
701  }
702  m_monitor->Add(server);
703 }
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 783 of file CmsShowMain.cc.

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

784 {
786  if (m_live)
787  m_navigator->resetNewFileOnNextEvent();
788  setIsPlaying(false);
790  checkPosition();
791 }
virtual void checkPosition()
Definition: CmsShowMain.cc:612
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().