24 until=(TileCalibTools.MAXRUN, TileCalibTools.MAXLBK)):
27 folder = TileCalibTools.getTilePrefix(
True,
True)+
"INTEGRATOR"
39 dv.append(( 2.814, 0.023, -1, -1, 80, -1, -1, -1))
40 dv.append(( 26.010, 0.230, -1, -1, 80, -1, -1, -1))
41 dv.append(( 28.810, 0.240, -1, -1, 80, -1, -1, -1))
42 dv.append(( 54.810, 0.480, -1, -1, 70, -1, -1, -1))
43 dv.append(( 75.790, 0.677, -1, -1, 70, -1, -1, -1))
44 dv.append((101.800, 0.900, -1, -1, 70, -1, -1, -1))
50 defVec = cppyy.gbl.std.vector(
'std::vector<float>')()
52 for i
in range(ngain):
53 defaultGain = cppyy.gbl.std.vector(
'float')()
55 defaultGain.push_back(v)
56 defVec.push_back(defaultGain)
61 writer = TileCalibTools.TileBlobWriter(db,folder,
'Flt')
62 writer.setComment(os.getlogin(),
"Jalal's values with non-zero defaults, 2008-12-05")
63 parser = TileCalibTools.TileASCIIParser(fileInt,
"IntGain")
65 util = cppyy.gbl.TileCalibUtils()
66 for ros
in range(util.max_ros()):
67 for drawer
in range(util.getMaxDrawer(ros)):
68 writer.zeroBlob(ros,drawer)
69 calibDrawer = writer.getDrawer(0,0)
70 calibDrawer.init(defVec,1,1)
72 for ros
in range(1,5):
75 writer.zeroBlob(ros,mod)
77 values = parser.getData(ros,mod,chn)
79 log.warning(
"%i/%2i/%2i/x: No value found in file", ros,mod,chn)
82 calibDrawer = writer.getDrawer(ros,mod)
83 if not calibDrawer.getNObjs():
84 log.info(
"Initializing drawer %i/%2i\t%i", ros,mod,calibDrawer.getNObjs())
85 calibDrawer.init(defVec,48,1)
88 for adc
in range(ngain):
89 line =
"%i/%2i/%2i/%i: " % (ros,mod,chn,adc)
90 for v
in range(nperg):
91 value =
float(values[adc*nperg+v])
92 calibDrawer.setData(chn,adc,v,value)
93 line +=
"%f " % (value,)
98 writer.register(since, until, folderTag)