forked from tstolz/HgSetup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
HgLogger.py
50 lines (41 loc) · 1.05 KB
/
HgLogger.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# -*- coding: utf-8 -*-
"""
Created on Wed Apr 30 14:20:10 2014
@author: universe
"""
import CouchCom
import OrcaCom
class Hglog:
def __init__(self):
self.couch=CouchCom.CouchCom()
self.orca=OrcaCom.orca()
def wavelengthmeter(self, wl):
adoc = {
"type" : "log",
"value" : {"wavelengthmeter, nm" : str(wl)}
}
self.couch.post(adoc)
def triggered(self):
adoc = {
"type" : "log",
"value" : {"triggered": 1}
}
self.couch.post(adoc)
def runstarted(self, runNumber):
adoc = {
"type" : "log",
"value" : {"run started with No": runNumber}
}
self.couch.post(adoc)
def readoutStatus(self, status):
adoc = {
"type" : "log",
"value" : {"readout beam status": status}
}
self.couch.post(adoc)
def pumpStatus(self, status):
adoc = {
"type" : "log",
"value" : {"puming beam status": status}
}
self.couch.post(adoc)