24 until=(TileCalibTools.MAXRUN, TileCalibTools.MAXLBK)):
27 folderTclas = TileCalibTools.getTilePrefix(
True,
True)+
"TIME/CHANNELOFFSET/LAS"
31 default = cppyy.gbl.std.vector(
'float')()
37 tclasWriter = TileCalibTools.TileBlobWriter(db,folderTclas,
'Flt')
38 tclasWriter.setComment(os.getlogin(),fileTclas)
39 parserTclas = TileCalibTools.TileASCIIParser(fileTclas,
"Tclas")
40 defTclas = cppyy.gbl.std.vector(
'std::vector<float>')()
41 defTclas.push_back(default)
42 defTclas.push_back(default)
46 flt = tclasWriter.zeroBlob(ros,mod)
47 flt = tclasWriter.getDrawer(0, 0)
48 flt.init(defTclas,1,0)
50 for ros
in range(1,5):
53 tclasWriter.zeroBlob(ros,mod)
55 tclas = parserTclas.getData(ros,mod,chn)
57 log.warning(
"%i/%2i/%2i/x: No value found in file", ros,mod,chn)
60 calibDrawer = tclasWriter.getDrawer(ros,mod)
61 if not calibDrawer.getNObjs():
62 log.info(
"Initializing drawer %i/%2i\t%i", ros,mod,calibDrawer.getNObjs())
63 calibDrawer.init(defTclas,48,0)
66 val =
float(tclas[adc])
67 log.debug(
"%i/%2i/%2i/%i: tclas = %f", ros,mod,chn,adc, val)
68 calibDrawer.setData(chn,adc,0,val)
71 tclasWriter.setComment(os.getlogin(),
"Timing update for all partitions")
72 tclasWriter.register(since, until, folderTag)