CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_9_patch3/src/Fireworks/Core/src/CmsShowMain.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #ifndef Fireworks_Core_CmsShowMain_h
00003 #define Fireworks_Core_CmsShowMain_h
00004 //
00005 // Package:     Core
00006 // Class  :     CmsShowMain
00007 //
00016 //
00017 // Original Author:
00018 //         Created:  Mon Dec  3 08:34:30 PST 2007
00019 // $Id: CmsShowMain.h,v 1.58 2011/11/10 04:40:17 amraktad Exp $
00020 //
00021 
00022 #include "Fireworks/Core/interface/CmsShowMainBase.h"
00023 // user include files
00024 #include "Fireworks/Core/interface/FWGeometry.h"
00025 
00026 // system include files
00027 #include <vector>
00028 #include <string>
00029 #include <memory>
00030 #include <boost/shared_ptr.hpp>
00031 #include "Rtypes.h"
00032 
00033 
00034 // forward declarations
00035 class TGPictureButton;
00036 class TGComboBox;
00037 class TGTextButton;
00038 class TGTextEntry;
00039 class FWEventItemsManager;
00040 class FWViewManagerManager;
00041 class FWModelChangeManager;
00042 class FWColorManager;
00043 class FWSelectionManager;
00044 class FWGUIManager;
00045 class FWEventItem;
00046 class FWPhysicsObjectDesc;
00047 class FWConfigurationManager;
00048 class FWLiteJobMetadataManager;
00049 class TTimer;
00050 class TMonitor;
00051 class TSocket;
00052 class CmsShowNavigator;
00053 class CmsShowTaskExecutor;
00054 class CSGAction;
00055 class CmsShowSearchFiles;
00056 
00057 namespace fwlite {
00058    class Event;
00059 }
00060 
00061 class CmsShowMain : public CmsShowMainBase
00062 {
00063 public:
00064    CmsShowMain(int argc, char *argv[]);
00065    virtual ~CmsShowMain();
00066    void resetInitialization();
00067    void openData();
00068    void appendData();
00069    void openDataViaURL();
00070    virtual void quit();
00071    void doExit();
00072 
00073    //  void writeConfigurationFile(const std::string& iFileName) const;
00074    // ---------- static member functions --------------------
00075    
00076    // ---------- member functions ---------------------------
00077    //  int draw(const fwlite::Event& );
00078 
00079    void notified(TSocket*);
00080    const fwlite::Event* getCurrentEvent() const;
00081    const fireworks::Context* context() const { return m_context.get(); };
00082    bool getVersionCheck() const { return !m_noVersionCheck; }
00083 
00084    void fileChangedSlot(const TFile *file);
00085 
00086 protected:
00087    virtual void eventChangedImp();
00088 
00089 private:
00090    CmsShowMain(const CmsShowMain&); // stop default
00091    const CmsShowMain& operator=(const CmsShowMain&); // stop default
00092 
00093    void loadGeometry();
00094    void setupDataHandling();
00095    void setupSocket(unsigned int);
00096    void connectSocket();
00097 
00098    virtual void autoLoadNewEvent();
00099    virtual void checkPosition();
00100    virtual void stopPlaying();
00101 
00102    void reachedEnd();
00103    void reachedBeginning();
00104 
00105    // Filtering bits.
00106    void navigatorChangedFilterState(int);
00107    void filterButtonClicked();
00108    void preFiltering();
00109    void postFiltering();
00110 
00111    void setLiveMode();
00112    void checkLiveMode();
00113 
00114    // ---------- member data --------------------------------
00115    std::auto_ptr<CmsShowNavigator>           m_navigator;
00116    std::auto_ptr<FWLiteJobMetadataManager>   m_metadataManager;
00117    std::auto_ptr<fireworks::Context>         m_context;
00118 
00119    std::vector<std::string> m_inputFiles;
00120    bool                     m_loadedAnyInputFile;
00121    const TFile             *m_openFile;
00122 
00123    std::auto_ptr<CmsShowSearchFiles>  m_searchFiles;
00124 
00125    // live options
00126    bool                         m_live;
00127    std::auto_ptr<SignalTimer>   m_liveTimer;
00128    int                          m_liveTimeout;
00129    UInt_t                       m_lastXEventSerial;
00130 
00131    bool                         m_noVersionCheck;
00132 
00133    std::auto_ptr<TMonitor> m_monitor;
00134 };
00135 
00136 #endif