@@ -777,20 +777,20 @@ std::pair<double, double> CTPRunScalers::getRateGivenT(double timestamp, int cla
777777 };
778778 if (nextindex == 0 ) {
779779 // orbit is out of bounds
780- if (qc == 0 ) {
780+ if (qc == 0 ) {
781781 LOG (info) << " query timestamp " << (long )timestamp << " before first record; Just returning the global rate" ;
782782 return std::make_pair (/* global mean rate*/ calcRate (0 , mScalerRecordO2 .size () - 1 ), /* current rate */ -1 );
783783 } else {
784784 LOG (info) << " query timestamp " << (long )timestamp << " before first record; Returning the first rate" ;
785- return std::make_pair (/* global mean rate*/ calcRate (0 , mScalerRecordO2 .size () - 1 ), /* first rate */ calcRate (0 ,1 ) );
785+ return std::make_pair (/* global mean rate*/ calcRate (0 , mScalerRecordO2 .size () - 1 ), /* first rate */ calcRate (0 , 1 ) );
786786 }
787- } else if (nextindex == mScalerRecordO2 .size ()){
788- if (qc == 0 ) {
787+ } else if (nextindex == mScalerRecordO2 .size ()) {
788+ if (qc == 0 ) {
789789 LOG (info) << " query timestamp " << (long )timestamp << " after last record; Just returning the global rate" ;
790790 return std::make_pair (/* global mean rate*/ calcRate (0 , mScalerRecordO2 .size () - 1 ), /* current rate */ -1 );
791791 } else {
792792 LOG (info) << " query timestamp " << (long )timestamp << " after last record; Returning the last rate" ;
793- return std::make_pair (/* global mean rate*/ calcRate (0 , mScalerRecordO2 .size () - 1 ), /* last rate */ calcRate (mScalerRecordO2 .size () - 2 , mScalerRecordO2 .size () - 1 ) );
793+ return std::make_pair (/* global mean rate*/ calcRate (0 , mScalerRecordO2 .size () - 1 ), /* last rate */ calcRate (mScalerRecordO2 .size () - 2 , mScalerRecordO2 .size () - 1 ));
794794 }
795795 } else {
796796 return std::make_pair (/* global mean rate*/ calcRate (0 , mScalerRecordO2 .size () - 1 ), /* current rate */ calcRate (nextindex - 1 , nextindex));
0 commit comments