23 until=(TileCalibTools.MAXRUN, TileCalibTools.MAXLBK)):
26 folder = TileCalibTools.getTilePrefix(
False)+
"MUID"
29 default = cppyy.gbl.std.vector(
'float')()
31 default.push_back(150.)
32 default.push_back(5000.)
33 defVec = cppyy.gbl.std.vector(
'std::vector<float>')()
34 defVec.push_back(default)
35 defVec.push_back(default)
40 writer = TileCalibTools.TileBlobWriter(db,folder,
'Flt',
False)
41 writer.setComment(os.getlogin(),
"Arantxa's values, april 2009.")
42 parser = TileCalibTools.TileASCIIParser(file,
"TileMuId")
45 util = cppyy.gbl.TileCalibUtils()
46 for ros
in range(util.max_ros()):
47 for drawer
in range(util.getMaxDrawer(ros)):
48 writer.zeroBlob(ros,drawer)
49 calibDrawer = writer.getDrawer(0,0)
50 calibDrawer.init(defVec,1,1)
53 for ros
in range(1,5):
56 writer.zeroBlob(ros,mod)
59 values = parser.getData(ros,mod,chn)
61 log.warning(
"%i/%2i/%2i/x: No value found in file", ros,mod,chn)
64 calibDrawer = writer.getDrawer(ros,mod)
65 if not calibDrawer.getNObjs():
66 log.info(
"Initializing drawer %i/%2i\t%i", ros,mod,calibDrawer.getNObjs())
67 calibDrawer.init(defVec,48,1)
70 line =
"%i/%2i/%2i/%i: " % (ros,mod,chn,adc)
72 value =
float(values[i])
73 calibDrawer.setData(chn,adc,i,value)
74 line +=
"%f " % (value,)
79 writer.register(since, until,
"")