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 // forward declarations
32 class TGPictureButton;
33 class TGComboBox;
34 class TGTextButton;
35 class TGTextEntry;
39 class FWColorManager;
40 class FWSelectionManager;
41 class FWGUIManager;
42 class FWEventItem;
46 class TTimer;
47 class TMonitor;
48 class TSocket;
49 class CmsShowNavigator;
51 class CSGAction;
52 class CmsShowSearchFiles;
53 
54 namespace fwlite {
55  class Event;
56 }
57 
58 class CmsShowMain : public CmsShowMainBase {
59 public:
60  CmsShowMain(int argc, char* argv[]);
61  ~CmsShowMain() override;
62  void resetInitialization();
63  void openData();
64  void appendData();
65  void openDataViaURL();
66  void quit() override;
67  void doExit();
68 
69  // void writeConfigurationFile(const std::string& iFileName) const;
70  // ---------- static member functions --------------------
71 
72  // ---------- member functions ---------------------------
73  // int draw(const fwlite::Event& );
74 
75  void notified(TSocket*);
76  const fwlite::Event* getCurrentEvent() const;
77  const fireworks::Context* context() const { return m_context.get(); };
78  bool getVersionCheck() const { return !m_noVersionCheck; }
79  bool getGlobalTagCheck() const { return m_globalTagCheck; }
80 
81  void fileChangedSlot(const TFile* file);
82 
83 protected:
84  void eventChangedImp() override;
85 
86 private:
87  CmsShowMain(const CmsShowMain&); // stop default
88  const CmsShowMain& operator=(const CmsShowMain&); // stop default
89 
90  void loadGeometry();
91  void setupDataHandling();
92  void setupSocket(unsigned int);
93  void connectSocket();
95 
96  void autoLoadNewEvent() override;
97  void checkPosition() override;
98  void stopPlaying() override;
100 
101  void reachedEnd();
102  void reachedBeginning();
103 
104  // Filtering bits.
105  void navigatorChangedFilterState(int);
106  void filterButtonClicked();
107  void preFiltering();
108  void postFiltering(bool);
109 
110  void setLiveMode();
111  void checkLiveMode();
112 
113  // ---------- member data --------------------------------
114  std::unique_ptr<CmsShowNavigator> m_navigator;
115  std::unique_ptr<FWLiteJobMetadataManager> m_metadataManager;
116  std::unique_ptr<fireworks::Context> m_context;
117 
118  std::vector<std::string> m_inputFiles;
120  const TFile* m_openFile;
121 
122  std::unique_ptr<CmsShowSearchFiles> m_searchFiles;
123 
124  // live options
125  bool m_live;
126  std::unique_ptr<SignalTimer> m_liveTimer;
129 
132 
133  std::unique_ptr<TMonitor> m_monitor;
134 };
135 
136 #endif
void fileChangedSlot(const TFile *file)
Definition: CmsShowMain.cc:495
void navigatorChangedFilterState(int)
Definition: CmsShowMain.cc:810
void openData()
Definition: CmsShowMain.cc:520
void setLoadedAnyInputFileAfterStartup()
Definition: CmsShowMain.cc:715
void checkPosition() override
Definition: CmsShowMain.cc:630
bool m_loadedAnyInputFile
Definition: CmsShowMain.h:119
const CmsShowMain & operator=(const CmsShowMain &)
void eventChangedImp() override
Definition: CmsShowMain.cc:510
void resetInitialization()
Definition: CmsShowMain.cc:516
void appendData()
Definition: CmsShowMain.cc:544
void preFiltering()
Definition: CmsShowMain.cc:825
void setupSocket(unsigned int)
Definition: CmsShowMain.cc:723
void checkLiveMode()
Definition: CmsShowMain.cc:856
std::unique_ptr< CmsShowSearchFiles > m_searchFiles
Definition: CmsShowMain.h:122
void checkKeyBindingsOnPLayEventsStateChanged() override
Definition: CmsShowMain.cc:793
void stopPlaying() override
Definition: CmsShowMain.cc:801
void setupDataHandling()
Definition: CmsShowMain.cc:648
CmsShowMain(int argc, char *argv[])
Definition: CmsShowMain.cc:127
void filterButtonClicked()
Definition: CmsShowMain.cc:818
~CmsShowMain() override
Definition: CmsShowMain.cc:439
std::unique_ptr< TMonitor > m_monitor
Definition: CmsShowMain.h:133
UInt_t m_lastXEventSerial
Definition: CmsShowMain.h:128
std::unique_ptr< CmsShowNavigator > m_navigator
Definition: CmsShowMain.h:114
std::unique_ptr< fireworks::Context > m_context
Definition: CmsShowMain.h:116
std::unique_ptr< FWLiteJobMetadataManager > m_metadataManager
Definition: CmsShowMain.h:115
void reachedBeginning()
bool getVersionCheck() const
Definition: CmsShowMain.h:78
std::unique_ptr< SignalTimer > m_liveTimer
Definition: CmsShowMain.h:126
std::vector< std::string > m_inputFiles
Definition: CmsShowMain.h:118
void setLiveMode()
Definition: CmsShowMain.cc:841
void autoLoadNewEvent() override
Definition: CmsShowMain.cc:593
void postFiltering(bool)
Definition: CmsShowMain.cc:830
bool m_globalTagCheck
Definition: CmsShowMain.h:131
bool getGlobalTagCheck() const
Definition: CmsShowMain.h:79
const TFile * m_openFile
Definition: CmsShowMain.h:120
void loadGeometry()
bool m_noVersionCheck
Definition: CmsShowMain.h:130
const fwlite::Event * getCurrentEvent() const
Definition: CmsShowMain.cc:489
void doExit()
Definition: CmsShowMain.cc:461
int m_liveTimeout
Definition: CmsShowMain.h:127
void quit() override
Definition: CmsShowMain.cc:459
void notified(TSocket *)
Definition: CmsShowMain.cc:735
void connectSocket()
Definition: CmsShowMain.cc:733
void openDataViaURL()
Definition: CmsShowMain.cc:567
void reachedEnd()
const fireworks::Context * context() const
Definition: CmsShowMain.h:77