@@ -63,19 +63,20 @@ int MFTDCSProcessor::process(const gsl::span<const DPCOM> dps)
6363 mStartTFset = true ;
6464 }
6565
66- std::unordered_map<DPID , DPVAL > mapin;
67- for (auto & it : dps) {
68- mapin[it.id ] = it.data ;
69- }
70- for (auto & it : mPids ) {
71- const auto & el = mapin.find (it.first );
72- if (el == mapin.end ()) {
73- LOG (debug) << " DP " << it.first << " not found in map" ;
74- } else {
75- LOG (debug) << " DP " << it.first << " found in map" ;
66+ if (false ) { // RS: why do we need to lose CPU on this dummy check?
67+ std::unordered_map<DPID , DPVAL > mapin;
68+ for (auto & it : dps) {
69+ mapin[it.id ] = it.data ;
70+ }
71+ for (auto & it : mPids ) {
72+ const auto & el = mapin.find (it.first );
73+ if (el == mapin.end ()) {
74+ LOG (debug) << " DP " << it.first << " not found in map" ;
75+ } else {
76+ LOG (debug) << " DP " << it.first << " found in map" ;
77+ }
7678 }
7779 }
78-
7980 // now we process all DPs, one by one
8081 for (const auto & it : dps) {
8182 // we process only the DPs defined in the configuration
@@ -91,7 +92,6 @@ int MFTDCSProcessor::process(const gsl::span<const DPCOM> dps)
9192 processDP(new_it);
9293 */
9394 processDP (it);
94-
9595 mPids [it.id ] = true ;
9696 }
9797
@@ -156,11 +156,12 @@ void MFTDCSProcessor::updateDPsCCDB()
156156 double double_value;
157157 } converter0, converter1;
158158
159- for (const auto & it : mPids ) {
159+ for (auto & it : mPids ) {
160160 const auto & type = it.first .get_type ();
161161 if (type == o2::dcs::DPVAL_DOUBLE ) {
162162 auto & mftdcs = mMFTDCS [it.first ];
163- if (it.second == true ) { // we processed the DP at least 1x
163+ if (it.second ) { // we processed the DP at least 1x
164+ it.second = false ; // once the point was used, reset it
164165 auto & dpvect = mDpsdoublesmap [it.first ];
165166 mftdcs.firstValue .first = dpvect[0 ].get_epoch_time ();
166167 converter0.raw_data = dpvect[0 ].payload_pt1 ;
0 commit comments