NavState.cxx
Go to the documentation of this file.
1 ///
2 /// \file NavState.cxx
3 /// \brief Holds information about what action to take next.
4 /// \version $Id: NavState.cxx,v 1.3 2011-09-01 22:17:55 brebel Exp $
5 /// \author messier@indiana.edu
6 ///
8 
9 #include "TROOT.h"
10 #include "TApplication.h"
11 
12 namespace evdb{
13 
14  static int gsNavState = 0;
15  static int gsTargetRun = 0;
16  static int gsTargetEvent = 0;
17 
18  //......................................................................
19 
20  int NavState::Which() { return gsNavState; }
21 
22  //......................................................................
23 
24  void NavState::Set(int which)
25  {
26  // only allow the state to change if it has not been previously set
27  // to kSEQUENTIAL_ONLY, this should be made more intelligent, ie
28  // if we can only do sequential access because we are using the
29  // socket input source, then we shouldn't be allowed to press the
30  // other buttons
31  if(gsNavState != kSEQUENTIAL_ONLY)
32  gsNavState = which;
33 
34  gROOT->GetApplication()->Terminate();
35  }
36 
37  //......................................................................
38 
39  void NavState::SetTarget(int run, int event)
40  {
41  gsTargetRun = run;
42  gsTargetEvent = event;
43  }
44 
45  //......................................................................
46 
47  int NavState::TargetRun() { return gsTargetRun; }
48 
49  //......................................................................
50 
52 
53 }// namespace
54 ////////////////////////////////////////////////////////////////////////
static void Set(int which)
Definition: NavState.cxx:24
static int TargetEvent()
Definition: NavState.cxx:51
Manage all things related to colors for the event display.
Definition: Display3DPad.h:11
static int TargetRun()
Definition: NavState.cxx:47
static int gsTargetEvent
Definition: NavState.cxx:16
static int gsNavState
Definition: NavState.cxx:14
Definition: run.py:1
static void SetTarget(int run, int event)
Definition: NavState.cxx:39
static int Which()
Definition: NavState.cxx:20
static int gsTargetRun
Definition: NavState.cxx:15