Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-12-14 11:45:01

0001 // -*- C++ -*-
0002 #ifndef Fireworks_Core_FWNavigatorBase_h
0003 #define Fireworks_Core_FWNavigatorBase_h
0004 //
0005 // Package:     newVersion
0006 // Class  :     CmsShowNavigator
0007 //
0008 
0009 // system include files
0010 #include <string>
0011 #include <sigc++/sigc++.h>
0012 #include <Rtypes.h>
0013 
0014 // user include files
0015 #include "Fireworks/Core/interface/FWConfigurable.h"
0016 
0017 #include "DataFormats/Provenance/interface/EventID.h"
0018 
0019 // forward declarations
0020 class CmsShowMainBase;
0021 
0022 namespace edm {
0023   class EventBase;
0024   class EventID;
0025 }  // namespace edm
0026 
0027 class FWNavigatorBase : public FWConfigurable {
0028 public:
0029   enum EFilterState { kOff, kOn, kWithdrawn };
0030   enum EFilterMode { kOr = 1, kAnd = 2 };
0031 
0032 public:
0033   FWNavigatorBase(const CmsShowMainBase&);
0034   ~FWNavigatorBase() override;
0035 
0036   //configuration management interface
0037   void addTo(FWConfiguration&) const override = 0;
0038   void setFrom(const FWConfiguration&) override = 0;
0039 
0040   virtual void nextEvent() = 0;
0041   virtual void previousEvent() = 0;
0042   virtual bool nextSelectedEvent() = 0;
0043   virtual bool previousSelectedEvent() = 0;
0044   virtual void firstEvent() = 0;
0045   virtual void lastEvent() = 0;
0046   // FIXME -- should be Long64_t.
0047   virtual void goToRunEvent(edm::RunNumber_t, edm::LuminosityBlockNumber_t, edm::EventNumber_t) = 0;
0048 
0049   virtual bool isLastEvent() = 0;
0050   virtual bool isFirstEvent() = 0;
0051 
0052   virtual const edm::EventBase* getCurrentEvent() const = 0;
0053   virtual int getNSelectedEvents() = 0;
0054   virtual int getNTotalEvents() = 0;
0055 
0056   sigc::signal<void()> newEvent_;
0057 
0058   FWNavigatorBase(const FWNavigatorBase&) = delete;                   // stop default
0059   const FWNavigatorBase& operator=(const FWNavigatorBase&) = delete;  // stop default
0060 
0061 private:
0062   // ---------- member data --------------------------------
0063   // entry is an event index nubmer which runs from 0 to
0064   // #events or #selected_events depending on if we filter
0065   // events or not
0066   const CmsShowMainBase& m_main;
0067 };
0068 
0069 #endif