CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FWFFNavigator.h
Go to the documentation of this file.
1 #ifndef Fireworks_FWInterface_FWFFNavigator_h
2 #define Fireworks_FWInterface_FWFFNavigator_h
3 
6 
7 namespace edm
8 {
9  class EventBase;
10 }
11 
13 {
14 public:
21  };
22 
24  : FWNavigatorBase(main),
25  m_currentEvent(0),
27  {}
28  // Discard configuration for the time being.
29  virtual void addTo(FWConfiguration&) const {}
30  virtual void setFrom(const FWConfiguration&) {}
31 
32  virtual void nextEvent();
33  virtual void previousEvent();
34  // nextSelectedEvent and nextEvent are the same thing
35  // for full framework, since there is no filtering.
36  virtual bool nextSelectedEvent() { nextEvent(); return true; }
37  virtual bool previousSelectedEvent() { previousEvent(); return true; }
38 
39  // FIXME: for the time being there is no way to go to
40  // first / last event.
41  virtual void firstEvent();
42  virtual void lastEvent();
43  // FIXME: does not do anything for the time being.
45  // Notice that we have no way to tell whether the current one
46  // is the last event in a stream.
47  virtual bool isLastEvent() {return false;}
48  virtual bool isFirstEvent() {return m_currentEvent->id() == m_firstEventID; }
49  // FIXME: we need to change the API of the baseclass first.
50  virtual const edm::EventBase* getCurrentEvent() const { return m_currentEvent; }
51  // The number of selected events is always the total number of event.
52  virtual int getNSelectedEvents() { return getNTotalEvents(); }
53  // FIXME: I guess there is no way to tell how many events
54  // we have.
55  virtual int getNTotalEvents() { return 0; }
56 
57  // Use to set the event from the framework.
58  void setCurrentEvent(const edm::Event *);
62 private:
66 };
67 
68 #endif
virtual void nextEvent()
Definition: FWFFNavigator.cc:5
virtual void addTo(FWConfiguration &) const
Definition: FWFFNavigator.h:29
enum FWFFNavigatorState m_currentTransition
Definition: FWFFNavigator.h:65
virtual bool nextSelectedEvent()
Definition: FWFFNavigator.h:36
unsigned long long EventNumber_t
virtual bool previousSelectedEvent()
Definition: FWFFNavigator.h:37
void resetTransition()
Definition: FWFFNavigator.h:61
unsigned int LuminosityBlockNumber_t
int main(int argc, char **argv)
virtual bool isFirstEvent()
Definition: FWFFNavigator.h:48
virtual int getNTotalEvents()
Definition: FWFFNavigator.h:55
virtual int getNSelectedEvents()
Definition: FWFFNavigator.h:52
const edm::EventID & getFirstEventID()
virtual void goToRunEvent(edm::RunNumber_t, edm::LuminosityBlockNumber_t, edm::EventNumber_t)
Definition: FWFFNavigator.h:44
enum FWFFNavigatorState currentTransition()
Definition: FWFFNavigator.h:60
FWFFNavigator(CmsShowMainBase &main)
Definition: FWFFNavigator.h:23
virtual void setFrom(const FWConfiguration &)
Definition: FWFFNavigator.h:30
edm::EventID m_firstEventID
Definition: FWFFNavigator.h:64
const edm::Event * m_currentEvent
Definition: FWFFNavigator.h:63
virtual void previousEvent()
edm::EventID id() const
Definition: EventBase.h:56
virtual const edm::EventBase * getCurrentEvent() const
Definition: FWFFNavigator.h:50
virtual void lastEvent()
unsigned int RunNumber_t
virtual bool isLastEvent()
Definition: FWFFNavigator.h:47
virtual void firstEvent()
void setCurrentEvent(const edm::Event *)