CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_0/src/Fireworks/FWInterface/interface/FWFFLooper.h

Go to the documentation of this file.
00001 #ifndef Fireworks_Core_FWFFLooper_h
00002 #define Fireworks_Core_FWFFLooper_h
00003 
00004 #include "Fireworks/Core/interface/CmsShowMainBase.h"
00005 #include "Fireworks/FWInterface/interface/FWFFHelper.h"
00006 #include "FWCore/Framework/interface/EDLooperBase.h"
00007 #include "DataFormats/Provenance/interface/EventID.h"
00008 #include "FWCore/ServiceRegistry/interface/Service.h"
00009 #include <string>
00010 #include <Rtypes.h>
00011 #include <memory>
00012 
00013 namespace edm
00014 {
00015    class ParameterSet;
00016    class ActivityRegistry;
00017    class Run;
00018    class Event;
00019    class EventSetup;
00020    class ProcessingController;
00021    class ModuleChanger;
00022    class ParameterSet;
00023 }
00024 
00025 class FWFFNavigator;
00026 class FWFFMetadataManager;
00027 class FWPathsPopup;
00028 
00029 namespace fireworks
00030 {
00031    class Context;
00032 }
00033 
00034 class TEveManager;
00035 class TEveElement;
00036 class TEveMagField;
00037 class TEveTrackPropagator;
00038 class TRint;
00039 class TGWindow;
00040 
00041 class FWFFLooper : public CmsShowMainBase, public edm::EDLooperBase
00042 {
00043 public:
00044    FWFFLooper(const edm::ParameterSet&);
00045    virtual ~FWFFLooper();
00046 
00047    // ---------- const member functions ---------------------
00048 
00049    // ---------- static member functions --------------------
00050 
00051    // ---------- member functions ---------------------------
00052 
00053    virtual void attachTo(edm::ActivityRegistry &);
00054    void postBeginJob();
00055    void postEndJob();
00056 
00057    virtual void beginRun(const edm::Run&, const edm::EventSetup&);
00058 
00059    void display(const std::string& info="");
00060 
00061    TEveMagField* getMagField();
00062    void          setupFieldForPropagator(TEveTrackPropagator* prop);
00063 
00064    virtual void checkPosition();
00065    virtual void stopPlaying();
00066    virtual void autoLoadNewEvent();
00067 
00068    void showPathsGUI(const TGWindow *p);
00069 
00070    void quit();
00071 
00072    virtual void startingNewLoop(unsigned int);
00073    virtual edm::EDLooperBase::Status endOfLoop(const edm::EventSetup&, unsigned int);
00074    virtual edm::EDLooperBase::Status duringLoop(const edm::Event&, const edm::EventSetup&, edm::ProcessingController&); 
00075    void requestChanges(const std::string &, const edm::ParameterSet &);
00076 private:
00077    FWFFLooper(const FWFFLooper&);                  // stop default
00078    const FWFFLooper& operator=(const FWFFLooper&); // stop default
00079 
00080    void loadDefaultGeometryFile( void );
00081    
00082    edm::Service<FWFFHelper>            m_appHelper;
00083    std::auto_ptr<FWFFNavigator>        m_navigator;
00084    std::auto_ptr<FWFFMetadataManager>  m_metadataManager;
00085    std::auto_ptr<fireworks::Context>   m_context;
00086 
00087    TEveManager  *m_EveManager;
00088    TRint        *m_Rint;
00089 
00090    TEveMagField *m_MagField;
00091    
00092    bool          m_AllowStep;
00093    bool          m_ShowEvent;
00094    bool          m_firstTime;
00095    FWPathsPopup  *m_pathsGUI;
00096    
00097    typedef std::map<std::string, edm::ParameterSet> ModuleChanges;
00098    ModuleChanges m_scheduledChanges;
00099    edm::EventID  m_nextEventId;
00100    bool          m_autoReload;
00101    bool          m_isFirstEvent;
00102    bool          m_isLastEvent;
00103 };
00104 
00105 #endif