Beispiel #1
0
def stoprun():
    global running
    if (running): 
        logger.info("Stopping run...")
        rpi.on()
        time.sleep(0.1)
        events[0].set()
        events[1].set()
        events[2].set()
        global hisparcPipe
        global gp1Pipe
        global gp2Pipe
        hisparcPipe.send("stop")
        gp1Pipe.send("stop")
        gp2Pipe.send("stop")
        running=False
Beispiel #2
0
def stoprun():
    global running
    if (running):
        logger.info("Stopping run...")
        rpi.on()
        time.sleep(0.1)
        events[0].set()
        events[1].set()
        events[2].set()
        global hisparcPipe
        global gp1Pipe
        global gp2Pipe
        hisparcPipe.send("stop")
        gp1Pipe.send("stop")
        gp2Pipe.send("stop")
        running = False
Beispiel #3
0
        logger.addHandler(ch2)
        logger.info("Starting "+prefix)
        events = [Event() for i in range(0,4)]
        #logger.info("Caen info:")
        #logger.info("           VMON  IMON    V0     V1    I0    I1    RUP   RDW TRIP  STATUS RAMP")
        #ser = serial.Serial("/dev/ttyUSB0", 9600, timeout=1)
        #ser.write("2")
        #process(ser.read(2048))
        #ser.write("a")
        #process(ser.read(2048))
        #ser.write("p")
        #process(ser.read(2048))
        #ser.write("p")
        #process(ser.read(2048))
        #ser.write("2") 
        rpi.on()
        time.sleep(0.1)
        events[0].set()
        events[1].set()
        events[2].set()
        events[3].set()
       # hisparcPipe,b = Pipe()
       # hisparcProcess = Process(target=ptrsparc,args=(b,events[0],[events[1],events[2]],events[3],prefix+"_calo.root"))
       # hisparcProcess.start()
        hisparc = ptrsparc()
        hisparc.filename=prefix+"_calo.root"
        hisparcPipe = hisparc.pipeEnd
        hisparc.start()

        gp1 = ptrrelaxd()
        gp1.filename=prefix+"_1.root"
Beispiel #4
0
        logger.addHandler(ch2)
        logger.info("Starting " + prefix)
        events = [Event() for i in range(0, 4)]
        #logger.info("Caen info:")
        #logger.info("           VMON  IMON    V0     V1    I0    I1    RUP   RDW TRIP  STATUS RAMP")
        #ser = serial.Serial("/dev/ttyUSB0", 9600, timeout=1)
        #ser.write("2")
        #process(ser.read(2048))
        #ser.write("a")
        #process(ser.read(2048))
        #ser.write("p")
        #process(ser.read(2048))
        #ser.write("p")
        #process(ser.read(2048))
        #ser.write("2")
        rpi.on()
        time.sleep(0.1)
        events[0].set()
        events[1].set()
        events[2].set()
        events[3].set()
        # hisparcPipe,b = Pipe()
        # hisparcProcess = Process(target=ptrsparc,args=(b,events[0],[events[1],events[2]],events[3],prefix+"_calo.root"))
        # hisparcProcess.start()
        hisparc = ptrsparc()
        hisparc.filename = prefix + "_calo.root"
        hisparcPipe = hisparc.pipeEnd
        hisparc.start()

        gp1 = ptrrelaxd()
        gp1.filename = prefix + "_1.root"