SECI  1
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events
BeamLogger.cs
Go to the documentation of this file.
1 using System;
2 using System.Collections.Generic;
3 using System.Text;
4 using Seci.Definitions;
5 
6 namespace Seci.Standard
7 {
11  public static class BeamLogger
12  {
13  private static String _filePath;
14 
15  public static String FilePath { get { return _filePath; } }
16 
20  public static void InitialiseBeamlogger()
21  {
22  _filePath = Status.BeamLoggerVI;
23 
24  //Load VI
25  LabView.LabViewApp.LoadVI(_filePath, true);
26 
27  //Start it running
28  LabView.LabViewApp.StartVI(_filePath);
29  }
30 
35  public static String GetShutterStatus()
36  {
37  try
38  {
39  return LabView.LabViewApp.GetValue(_filePath, "Main Shutter")[0];
40  }
41  catch
42  {
43  return "UNKNOWN";
44  }
45  }
46 
51  public static String GetKickerStatus()
52  {
53  try
54  {
55  return LabView.LabViewApp.GetValue(_filePath, "Muon Kicker")[0];
56  }
57  catch
58  {
59  return "UNKNOWN";
60  }
61  }
62 
67  public static String GetBeamCurrent()
68  {
69  if (Seci.Definitions.Status.IsTS2Instrument)
70  {
71  try
72  {
73  return LabView.LabViewApp.GetValue(_filePath, "TS2 Beam Current")[0];
74  }
75  catch
76  {
77  return "UNKNOWN";
78  }
79  }
80  else
81  {
82  try
83  {
84  return LabView.LabViewApp.GetValue(_filePath, "TS1 Beam Current")[0];
85  }
86  catch
87  {
88  return "UNKNOWN";
89  }
90  }
91  }
92 
93  public static String GetTs1MethaneTemp()
94  {
95  try
96  {
97  return LabView.LabViewApp.GetValue(_filePath, "Methane Temperature")[0];
98  }
99  catch
100  {
101  return "UNKNOWN";
102  }
103  }
104 
108  public static void ShowVi()
109  {
110  LabView.LabViewApp.ShowVI(_filePath);
111  }
112 
116  public static void HideVi()
117  {
118  LabView.LabViewApp.HideVI(_filePath);
119  }
120  }
121 }
static String GetBeamCurrent()
Get the appropriate beam current.
Definition: BeamLogger.cs:67
static String GetKickerStatus()
Get the status of the muon kicker.
Definition: BeamLogger.cs:51
static String _filePath
Definition: BeamLogger.cs:13
static void ShowVi()
Method for showing the VI.
Definition: BeamLogger.cs:108
This class is a wrapper for the beam logger VI that is a default part of SECI.
Definition: BeamLogger.cs:11
static String GetTs1MethaneTemp()
Definition: BeamLogger.cs:93
static void HideVi()
Method for hiding the VI.
Definition: BeamLogger.cs:116
static String GetShutterStatus()
Get the status of the shutter.
Definition: BeamLogger.cs:35
static void InitialiseBeamlogger()
Method for initialising the beam-logger.
Definition: BeamLogger.cs:20