CMS 3D CMS Logo

CmsShowMain.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 #ifndef Fireworks_Core_CmsShowMain_h
3 #define Fireworks_Core_CmsShowMain_h
4 //
5 // Package: Core
6 // Class : CmsShowMain
7 //
16 //
17 // Original Author:
18 // Created: Mon Dec 3 08:34:30 PST 2007
19 //
20 
22 // user include files
24 
25 // system include files
26 #include <vector>
27 #include <string>
28 #include <memory>
29 #include "Rtypes.h"
30 
31 
32 // forward declarations
33 class TGPictureButton;
34 class TGComboBox;
35 class TGTextButton;
36 class TGTextEntry;
40 class FWColorManager;
41 class FWSelectionManager;
42 class FWGUIManager;
43 class FWEventItem;
47 class TTimer;
48 class TMonitor;
49 class TSocket;
50 class CmsShowNavigator;
52 class CSGAction;
53 class CmsShowSearchFiles;
54 
55 namespace fwlite {
56  class Event;
57 }
58 
60 {
61 public:
62  CmsShowMain(int argc, char *argv[]);
63  ~CmsShowMain() override;
64  void resetInitialization();
65  void openData();
66  void appendData();
67  void openDataViaURL();
68  void quit() override;
69  void doExit();
70 
71  // void writeConfigurationFile(const std::string& iFileName) const;
72  // ---------- static member functions --------------------
73 
74  // ---------- member functions ---------------------------
75  // int draw(const fwlite::Event& );
76 
77  void notified(TSocket*);
78  const fwlite::Event* getCurrentEvent() const;
79  const fireworks::Context* context() const { return m_context.get(); };
80  bool getVersionCheck() const { return !m_noVersionCheck; }
81 
82  void fileChangedSlot(const TFile *file);
83 
84 protected:
85  void eventChangedImp() override;
86 
87 private:
88  CmsShowMain(const CmsShowMain&); // stop default
89  const CmsShowMain& operator=(const CmsShowMain&); // stop default
90 
91  void loadGeometry();
92  void setupDataHandling();
93  void setupSocket(unsigned int);
94  void connectSocket();
95  void setLoadedAnyInputFileAfterStartup();
96 
97  void autoLoadNewEvent() override;
98  void checkPosition() override;
99  void stopPlaying() override;
100  void checkKeyBindingsOnPLayEventsStateChanged() override;
101 
102  void reachedEnd();
103  void reachedBeginning();
104 
105  // Filtering bits.
106  void navigatorChangedFilterState(int);
107  void filterButtonClicked();
108  void preFiltering();
109  void postFiltering(bool);
110 
111  void setLiveMode();
112  void checkLiveMode();
113 
114  // ---------- member data --------------------------------
115  std::unique_ptr<CmsShowNavigator> m_navigator;
116  std::unique_ptr<FWLiteJobMetadataManager> m_metadataManager;
117  std::unique_ptr<fireworks::Context> m_context;
118 
119  std::vector<std::string> m_inputFiles;
121  const TFile *m_openFile;
122 
123  std::unique_ptr<CmsShowSearchFiles> m_searchFiles;
124 
125  // live options
126  bool m_live;
127  std::unique_ptr<SignalTimer> m_liveTimer;
130 
132 
133  std::unique_ptr<TMonitor> m_monitor;
134 };
135 
136 #endif
bool m_loadedAnyInputFile
Definition: CmsShowMain.h:120
std::unique_ptr< CmsShowSearchFiles > m_searchFiles
Definition: CmsShowMain.h:123
std::unique_ptr< TMonitor > m_monitor
Definition: CmsShowMain.h:133
UInt_t m_lastXEventSerial
Definition: CmsShowMain.h:129
std::unique_ptr< CmsShowNavigator > m_navigator
Definition: CmsShowMain.h:115
std::unique_ptr< fireworks::Context > m_context
Definition: CmsShowMain.h:117
std::unique_ptr< FWLiteJobMetadataManager > m_metadataManager
Definition: CmsShowMain.h:116
std::unique_ptr< SignalTimer > m_liveTimer
Definition: CmsShowMain.h:127
std::vector< std::string > m_inputFiles
Definition: CmsShowMain.h:119
bool getVersionCheck() const
Definition: CmsShowMain.h:80
const TFile * m_openFile
Definition: CmsShowMain.h:121
bool m_noVersionCheck
Definition: CmsShowMain.h:131
int m_liveTimeout
Definition: CmsShowMain.h:128
const fireworks::Context * context() const
Definition: CmsShowMain.h:79