34 if (
time > Boundary_time_High ||
time < Boundary_time_Low) {
38 std::cerr<<
"this should not happen. check your code that matters with VData"<<std::endl;
45 std::vector<Time_t>::iterator
iter = std::upper_bound(timeVector.begin(), timeVector.end(),
time);
46 int index2 =
iter - timeVector.begin();
47 Time_t time2 = timeVector[index2], time1 = timeVector[index2 - 1];
49 VDataItem &voltage2 = VdataVector[index2], &voltage1 = VdataVector[index2 - 1];
50 for (
size_t i = 0; i < voltage.
size(); i++) {
51 voltage[i] = voltage1[i] + ((double)(
time - time1)) / (time2 - time1) * (voltage2[i] - voltage1[i]);
57 1871.65, 1988.291667, 2016.875, 2017.791667, 2044.25, 2029.25, 2016.75, 1986.5, 2111, 2199,
58 2187.5, 2226, 2214.75, 2233, 2216, 2222.75, 2199.5, 2217.75, 2189.25, 2142.75,
59 2119.5, 2192.25, 2209.5, 2218, 2201, 2211.25, 2227, 2226, 2186.25, 2201.5,
60 2217, 2211.5, 2177, 2191.25, 2192.25, 2135.75, 2133.25, 2200.75, 2218.75, 2204.25,
61 2137.5, 2139.75, 2059.5,
void push_back_sorted(Time_t time_HV_SLOWCTRL, const VDataItem &data)
add a entry to our cache. the entry has to be pushed back in ascending order, with no gap....