31 if (
time > Boundary_time_High ||
time < Boundary_time_Low )
37 std::cerr <<
"this should not happen. check your code that matters with VData"
45 std::vector<Time_t>::iterator
iter =
46 std::upper_bound( timeVector.begin(), timeVector.end(),
time );
47 int index2 =
iter - timeVector.begin();
48 Time_t time2 = timeVector[index2], time1 = timeVector[index2 - 1];
50 VDataItem &voltage2 = VdataVector[index2], &voltage1 = VdataVector[index2 - 1];
51 for (
size_t i = 0; i < voltage.
size(); i++ )
53 voltage[i] = voltage1[i] + ( (double)(
time - time1 ) ) / ( time2 - time1 ) *
54 ( voltage2[i] - voltage1[i] );
60 1871.65, 1988.291667, 2016.875, 2017.791667, 2044.25, 2029.25, 2016.75, 1986.5, 2111,
61 2199, 2187.5, 2226, 2214.75, 2233, 2216, 2222.75, 2199.5, 2217.75,
62 2189.25, 2142.75, 2119.5, 2192.25, 2209.5, 2218, 2201, 2211.25, 2227,
63 2226, 2186.25, 2201.5, 2217, 2211.5, 2177, 2191.25, 2192.25, 2135.75,
64 2133.25, 2200.75, 2218.75, 2204.25, 2137.5, 2139.75, 2059.5,
68 Boundary_time_High = 0;
69 Boundary_time_Low = 0;
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....