CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_1/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 "FWCore/Framework/interface/ESWatcher.h"
00010 #include "Fireworks/Geometry/interface/DisplayGeomRecord.h"
00011 #include <string>
00012 #include <Rtypes.h>
00013 #include <memory>
00014 
00015 namespace edm
00016 {
00017    class ParameterSet;
00018    class ActivityRegistry;
00019    class Run;
00020    class Event;
00021    class EventSetup;
00022    class ProcessingController;
00023    class ModuleChanger;
00024    class ParameterSet;
00025    class LuminosityBlockPrincipal;
00026 }
00027 
00028 class FWFFNavigator;
00029 class FWFFMetadataManager;
00030 class FWPathsPopup;
00031 
00032 namespace fireworks
00033 {
00034    class Context;
00035 }
00036 
00037 class TEveManager;
00038 class TEveElement;
00039 class TEveMagField;
00040 class TEveTrackPropagator;
00041 class TRint;
00042 class TGWindow;
00043 
00044 class FWFFLooper : public CmsShowMainBase, public edm::EDLooperBase
00045 {
00046 public:
00047    FWFFLooper(const edm::ParameterSet&);
00048    virtual ~FWFFLooper();
00049 
00050    // ---------- const member functions ---------------------
00051 
00052    // ---------- static member functions --------------------
00053 
00054    // ---------- member functions ---------------------------
00055 
00056    virtual void attachTo(edm::ActivityRegistry &);
00057    void postBeginJob();
00058    void postEndJob();
00059 
00060    virtual void beginRun(const edm::Run&, const edm::EventSetup&);
00061    virtual void doBeginLuminosityBlock(edm::LuminosityBlockPrincipal&,edm::EventSetup const&);
00062    virtual void doEndLuminosityBlock(edm::LuminosityBlockPrincipal&, edm::EventSetup const&);
00063 
00064    void display(const std::string& info="");
00065 
00066    TEveMagField* getMagField();
00067    void          setupFieldForPropagator(TEveTrackPropagator* prop);
00068 
00069    virtual void checkPosition();
00070    virtual void stopPlaying();
00071    virtual void autoLoadNewEvent();
00072 
00073    void showPathsGUI(const TGWindow *p);
00074 
00075    void quit();
00076 
00077    virtual void startingNewLoop(unsigned int);
00078    virtual edm::EDLooperBase::Status endOfLoop(const edm::EventSetup&, unsigned int);
00079    virtual edm::EDLooperBase::Status duringLoop(const edm::Event&, const edm::EventSetup&, edm::ProcessingController&); 
00080    void requestChanges(const std::string &, const edm::ParameterSet &);
00081 
00082    void remakeGeometry(const DisplayGeomRecord& dgRec);
00083 
00084 private:
00085    FWFFLooper(const FWFFLooper&);                  // stop default
00086    const FWFFLooper& operator=(const FWFFLooper&); // stop default
00087 
00088    void loadDefaultGeometryFile( void );
00089 
00090    edm::Service<FWFFHelper>            m_appHelper;
00091    std::auto_ptr<FWFFNavigator>        m_navigator;
00092    std::auto_ptr<FWFFMetadataManager>  m_metadataManager;
00093    std::auto_ptr<fireworks::Context>   m_context;
00094 
00095    TEveManager  *m_EveManager;
00096    TRint        *m_Rint;
00097 
00098    TEveMagField *m_MagField;
00099    
00100    bool          m_AllowStep;
00101    bool          m_ShowEvent;
00102    bool          m_firstTime;
00103    FWPathsPopup  *m_pathsGUI;
00104    
00105    typedef std::map<std::string, edm::ParameterSet> ModuleChanges;
00106    ModuleChanges m_scheduledChanges;
00107    edm::EventID  m_nextEventId;
00108    bool          m_autoReload;
00109    bool          m_isFirstEvent;
00110    bool          m_isLastEvent;
00111 
00112    edm::ESWatcher<DisplayGeomRecord> m_geomWatcher;
00113 };
00114 
00115 #endif