66 , until=(TileCalibTools.MAXRUN, TileCalibTools.MAXLBK)):
67
68
69
71
72 util = cppyy.gbl.TileCalibUtils()
73
74 default = cppyy.gbl.std.vector('unsigned int')()
75 for i in range(util.max_drawer() + 1):
76 default.push_back( 0 )
77
78 defVec = cppyy.gbl.std.vector('std::vector<unsigned int>')()
79 defVec.push_back(default)
80
81
82
83
84 writer = TileCalibTools.TileBlobWriter(db, folderPath, 'Bch')
85
86 precisions = [[0 for drawer in range(util.max_drawer())] for ros in range(util.max_ros())]
87 trips = [[0 for drawer in range(util.max_drawer())] for ros in range(util.max_ros())]
88
89 parser = TileCalibTools.TileASCIIParser3(fileTrips, "Trip")
90 dict = parser.getDict()
91 log.info("Updating dictionary from file with %i entries", len(dict))
92 log.info("... filename: %s", fileTrips )
93 for key, trip in list(dict.items()):
94 ros = key[0]
95 mod = key[1]
96 precisions[ros][mod] = len(trip[0]) - 2
97 trips[ros][mod] = float(trip[0])
98
99
100 tripsCalibDrawer = writer.getDrawer(util.trips_ros(), util.trips_drawer())
101 tripsCalibDrawer.init(defVec, util.max_ros(), 1)
102
103 for ros in range(util.max_ros()):
104 denominator = 10**
max(precisions[ros])
105 for mod in range(util.max_drawer()):
106 trip = int(trips[ros][mod] * denominator)
107 tripsCalibDrawer.setData(ros, 0, mod, trip)
108 tripsCalibDrawer.setData(ros, 0, util.max_drawer(), denominator)
109
110
111
112
113 writer.register(since, until, folderTag)
114
115
116
117
118
119
120
static std::string getFullTag(const std::string &folder, const std::string &tag)
Returns the full tag string, composed of camelized folder name and tag part.