#!/usr/bin/env python

#@name: script_check.py
#@author: Carolina Bianchini (carolina@slac.stanford.edu)
#@created: 11/8/2016

#@description: This script is use to check that the PVs, and its fields, created by this Vacuum application are matching the ones created from the previous version of the app.

import sys
import os
import os.path
import epics

field1=".OUT"
field2=".INP"

output=""

with open('pvList.txt') as pvList:
    for pv in pvList:
        print pv
	output+= pv
	pv_filed1=pv+field1
        print pv_filed1
	pv_filed2=pv+field2
        print pv_filed2
	pv_filed3=pv+field3
	print pv_filed3

	val1=epics.caget(pv_filed1)
	output+= ",  "+".OUT  " +",  "
	val2=epics.caget(pv_filed2)
	output+= ".INP  " +", \n "


with open('output.txt', 'w') as f:
    for row in output:
        print row
        f.write("%s\n" % str(row))

print "Done!"

