ATLAS Offline Software
Loading...
Searching...
No Matches
createCoolChannelIdFile.py File Reference

Go to the source code of this file.

Namespaces

namespace  createCoolChannelIdFile

Variables

list createCoolChannelIdFile.buffer = []
 createCoolChannelIdFile.re_ai = re.compile("ATLTILLV(\\d{2})(:ELMB/LVCAN.*_)(\\d*)/AI/M5VMB_TEMP2.value")
 createCoolChannelIdFile.re_states = re.compile("ATLTILLV(\\d{2})(:ELMB/LVCAN.*_)(\\d*)/states.ForDAQ_MBHV")
 createCoolChannelIdFile.re_hv = re.compile("ATLTILLV(\\d{2}):Drawer(\\d*).Readings.Monitoring.hvOut1.value")
 createCoolChannelIdFile.re_hvset = re.compile("ATLTILLV(\\d{2}):Drawer(\\d*).Readings.Requests.hvOut1.order")
 createCoolChannelIdFile.re_daq = re.compile("ATLTILSCS:DAQ(.*).state")
dict createCoolChannelIdFile.partitionID
 createCoolChannelIdFile.par = sys.argv
 createCoolChannelIdFile.info = TileDCSDataInfo.TileDCSDataInfo()
 createCoolChannelIdFile.dbstring = info.get_dbstring('ORACLE',int(par[1]) if len(par)>1 and par[1].isdigit() else 2)
 createCoolChannelIdFile.db = ROOT.TSQLServer.Connect( dbstring[0], dbstring[1], dbstring[2])
str createCoolChannelIdFile.statement = "select ELEMENT_NAME, SYS_ID, DP_ID from ATLAS_PVSSTIL.elements"
 createCoolChannelIdFile.stmt = db.Statement(statement)
 createCoolChannelIdFile.element_name = stmt.GetString(0)
 createCoolChannelIdFile.sys_id = stmt.GetString(1)
 createCoolChannelIdFile.dp_id = stmt.GetString(2)
 createCoolChannelIdFile.channel_id = dp_id + ('000'+sys_id)[-3:]
 createCoolChannelIdFile.result_ai = re_ai.search(element_name)
 createCoolChannelIdFile.result_states = re_states.search(element_name)
 createCoolChannelIdFile.result_hv = re_hv.search(element_name)
 createCoolChannelIdFile.result_hvset = re_hvset.search(element_name)
 createCoolChannelIdFile.result_daq = re_daq.search(element_name)
dict createCoolChannelIdFile.partition = partitionID[int(result_ai.groups()[0])]
dict createCoolChannelIdFile.drawer = partition+('00'+result_ai.groups()[2])[-2:]
str createCoolChannelIdFile.oracleId = "ATLTILLV"
 createCoolChannelIdFile.part = result_hv.groups()
 createCoolChannelIdFile.oldname = info.find_data_file("cool_channel_id.dat")
str createCoolChannelIdFile.newname = "cool_channel_id.dat"
 createCoolChannelIdFile.file = open(newname,"w")