Functions | Variables
g4zmq Namespace Reference

Functions

def connect (endpoint="tcp://127.0.0.1:5555")
 
def ping ()
 
def debug (dflag)
 
def apply (command)
 
def execute (command)
 
def pwd ()
 
def cwd ()
 
def cd (dir="")
 
def lc (target="")
 
def ls (target="")
 
def help (target="")
 
def history ()
 
def beamOn (nevent)
 
def getvalue (target="")
 
def exit ()
 

Variables

 charset
 
 context
 
 socket
 

Function Documentation

def g4zmq.apply (   command)

Definition at line 38 of file g4zmq.py.

References print.

Referenced by PandAna.reco_validation.prod5_pid_validation.ApplySlcCutsPngDF(), beamOn(), execute(), garching_flux_to_genie_root.main(), genie::flux::GDk2NuFlux.SetApplyWindowTiltWeight(), and genie::flux::GNuMIFlux.SetApplyWindowTiltWeight().

38 def apply(command) :
39  cmd_str= command.encode(charset)
40  socket.send(cmd_str)
41  output = socket.recv()
42  print(output.decode(charset))
43 
def apply(command)
Definition: g4zmq.py:38
bool print
def g4zmq.beamOn (   nevent)

Definition at line 89 of file g4zmq.py.

References apply(), and submit_syst.str.

89 def beamOn(nevent) :
90  cmd = "/run/beamOn " + str(nevent)
91  apply(cmd)
92 
def apply(command)
Definition: g4zmq.py:38
def beamOn(nevent)
Definition: g4zmq.py:89
def g4zmq.cd (   dir = "")

Definition at line 57 of file g4zmq.py.

References print.

57 def cd(dir="") :
58  cmd = "cd " + dir
59  socket.send(cmd.encode(charset))
60  output = socket.recv()
61  print(output.decode(charset))
62 
def cd(dir="")
Definition: g4zmq.py:57
bool print
def g4zmq.connect (   endpoint = "tcp://127.0.0.1:5555")
def g4zmq.cwd ( )

Definition at line 52 of file g4zmq.py.

References print.

Referenced by syst_table_fit_new().

52 def cwd() :
53  socket.send(b"cwd")
54  output = socket.recv()
55  print(output.decode(charset))
56 
def cwd()
Definition: g4zmq.py:52
bool print
def g4zmq.debug (   dflag)

Definition at line 30 of file g4zmq.py.

References print.

30 def debug(dflag) :
31  if dflag :
32  socket.send(b"@@debug")
33  else :
34  socket.send(b"@@nodebug")
35  output = socket.recv()
36  print(output.decode(charset))
37 
bool print
def debug(dflag)
Definition: g4zmq.py:30
def g4zmq.execute (   command)

Definition at line 44 of file g4zmq.py.

References apply().

Referenced by cet::SimultaneousFunctionSpawner.SimultaneousFunctionSpawner().

44 def execute(command) :
45  apply(command)
46 
def apply(command)
Definition: g4zmq.py:38
def execute(command)
Definition: g4zmq.py:44
def g4zmq.exit ( )

Definition at line 99 of file g4zmq.py.

References print.

99 def exit() :
100  socket.send(b"exit")
101  output = socket.recv()
102  print(output.decode(charset))
103 
104 # ===============================================================
def exit()
Definition: g4zmq.py:99
bool print
def g4zmq.getvalue (   target = "")

Definition at line 93 of file g4zmq.py.

References print.

93 def getvalue(target="") :
94  cmd = "?" + target
95  socket.send(cmd.encode(charset))
96  output = socket.recv()
97  print(output.decode(charset))
98 
bool print
def getvalue(target="")
Definition: g4zmq.py:93
def g4zmq.help (   target = "")

Definition at line 75 of file g4zmq.py.

References print.

75 def help(target="") :
76  if ( target == "" ) :
77  raise SyntaxWarning("*** no command specified.")
78  else :
79  cmd = "help " + target
80  socket.send(cmd.encode(charset))
81  output = socket.recv()
82  print(output.decode(charset))
83 
bool print
def help(target="")
Definition: g4zmq.py:75
def g4zmq.history ( )

Definition at line 84 of file g4zmq.py.

References print.

Referenced by convert().

84 def history() :
85  socket.send(b"history")
86  output = socket.recv()
87  print(output.decode(charset))
88 
def history()
Definition: g4zmq.py:84
bool print
def g4zmq.lc (   target = "")

Definition at line 63 of file g4zmq.py.

References print.

Referenced by cmap::dataprov::CMap.encodeLChan(), evd::GeometryDrawer.GetDCMBoxes(), rsim::ReadoutSim.produce(), and SetDrawOptions().

63 def lc(target="") :
64  cmd = "lc " + target
65  socket.send(cmd.encode(charset))
66  output = socket.recv()
67  print(output.decode(charset))
68 
bool print
def lc(target="")
Definition: g4zmq.py:63
def g4zmq.ls (   target = "")

Definition at line 69 of file g4zmq.py.

References print.

Referenced by lem::UnTranspose.beginRun(), lem::FindLEMMatches.beginRun(), lem::LEM.beginRun(), CreatePlots(), ana::CovMxSurface.DrawSurfacePoint(), lem::FindMatchesTranspose.endRun(), stan::io::stan_csv_reader.read_samples(), and ana::SpectrumHandler.SpectrumHandler().

69 def ls(target="") :
70  cmd = "ls " + target
71  socket.send(cmd.encode(charset))
72  output = socket.recv()
73  print(output.decode(charset))
74 
bool print
def ls(target="")
Definition: g4zmq.py:69
def g4zmq.ping ( )

Definition at line 20 of file g4zmq.py.

Referenced by connect().

20 def ping() :
21  socket.send(b"@@ping")
22  poller = zmq.Poller()
23  poller.register(socket, zmq.POLLIN)
24  if poller.poll(1*1000) :
25  output = socket.recv()
26  print ("@@ G4ZMQ server connected.")
27  else :
28  raise ConnectionError("*** connection timeout")
29 
def ping()
Definition: g4zmq.py:20
def g4zmq.pwd ( )

Definition at line 47 of file g4zmq.py.

References print.

Referenced by nutools::dbi::Table.GetPassword(), nova::dbi::Table.GetPassword(), daq2raw::TestBeamRawInputDriver.readBeamline(), nutools::dbi::Table.Tag(), nova::dbi::Table.Tag(), nutools::dbi::Table.Write(), and nova::dbi::Table.Write().

47 def pwd() :
48  socket.send(b"pwd")
49  output = socket.recv()
50  print(output.decode(charset))
51 
def pwd()
Definition: g4zmq.py:47
bool print

Variable Documentation

g4zmq.charset

Definition at line 10 of file g4zmq.py.

g4zmq.context

Definition at line 11 of file g4zmq.py.

g4zmq.socket

Definition at line 12 of file g4zmq.py.