CMS 3D CMS Logo

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:
20  kLastEvent
21  };
22 
24  : FWNavigatorBase(main),
25  m_currentEvent(nullptr),
26  m_currentTransition(kNoTransition)
27  {}
28  // Discard configuration for the time being.
29  void addTo(FWConfiguration&) const override {}
30  void setFrom(const FWConfiguration&) override {}
31 
32  void nextEvent() override;
33  void previousEvent() override;
34  // nextSelectedEvent and nextEvent are the same thing
35  // for full framework, since there is no filtering.
36  bool nextSelectedEvent() override { nextEvent(); return true; }
37  bool previousSelectedEvent() override { previousEvent(); return true; }
38 
39  // FIXME: for the time being there is no way to go to
40  // first / last event.
41  void firstEvent() override;
42  void lastEvent() override;
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  bool isLastEvent() override {return false;}
48  bool isFirstEvent() override {return m_currentEvent->id() == m_firstEventID; }
49  // FIXME: we need to change the API of the baseclass first.
50  const edm::EventBase* getCurrentEvent() const override { return m_currentEvent; }
51  // The number of selected events is always the total number of event.
52  int getNSelectedEvents() override { return getNTotalEvents(); }
53  // FIXME: I guess there is no way to tell how many events
54  // we have.
55  int getNTotalEvents() override { return 0; }
56 
57  // Use to set the event from the framework.
58  void setCurrentEvent(const edm::Event *);
59  const edm::EventID &getFirstEventID();
60  enum FWFFNavigatorState currentTransition() { return m_currentTransition; }
61  void resetTransition() { m_currentTransition = kNoTransition; }
62 private:
65  enum FWFFNavigatorState m_currentTransition;
66 };
67 
68 #endif
void setFrom(const FWConfiguration &) override
Definition: FWFFNavigator.h:30
int getNTotalEvents() override
Definition: FWFFNavigator.h:55
#define nullptr
void addTo(FWConfiguration &) const override
Definition: FWFFNavigator.h:29
unsigned long long EventNumber_t
const edm::EventBase * getCurrentEvent() const override
Definition: FWFFNavigator.h:50
bool isLastEvent() override
Definition: FWFFNavigator.h:47
void resetTransition()
Definition: FWFFNavigator.h:61
unsigned int LuminosityBlockNumber_t
bool isFirstEvent() override
Definition: FWFFNavigator.h:48
int getNSelectedEvents() override
Definition: FWFFNavigator.h:52
bool nextSelectedEvent() override
Definition: FWFFNavigator.h:36
void goToRunEvent(edm::RunNumber_t, edm::LuminosityBlockNumber_t, edm::EventNumber_t) override
Definition: FWFFNavigator.h:44
FWFFNavigator(CmsShowMainBase &main)
Definition: FWFFNavigator.h:23
edm::EventID m_firstEventID
Definition: FWFFNavigator.h:64
const edm::Event * m_currentEvent
Definition: FWFFNavigator.h:63
HLT enums.
bool previousSelectedEvent() override
Definition: FWFFNavigator.h:37
Definition: main.py:1
unsigned int RunNumber_t