LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
NavState.cxx
Go to the documentation of this file.
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
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.
static int TargetRun()
Definition: NavState.cxx:47
static int gsTargetEvent
Definition: NavState.cxx:16
static int gsNavState
Definition: NavState.cxx:14
static void SetTarget(int run, int event)
Definition: NavState.cxx:39
static int Which()
Definition: NavState.cxx:20
Event finding and building.
static int gsTargetRun
Definition: NavState.cxx:15