@@ -167,18 +167,16 @@ auto CCDBFetcherHelper::populateCacheWith(std::shared_ptr<CCDBFetcherHelper> con
167167 DataTakingContext& dtc,
168168 DataAllocator& allocator) -> std::vector<CCDBFetcherHelper::Response>
169169{
170- int objCnt = -1 ;
171170 // We use the timeslice, so that we hook into the same interval as the rest of the
172171 // callback.
173172 static bool isOnline = isOnlineRun (dtc);
174173
175174 auto sid = _o2_signpost_id_t {(int64_t )timingInfo.timeslice };
176175 O2_SIGNPOST_START (ccdb, sid, " populateCacheWith" , " Starting to populate cache with CCDB objects" );
177176 std::vector<Response> responses;
178- for (auto & op : ops) {
177+ for (auto const & op : ops) {
179178 int64_t timestampToUse = op.timestamp ;
180179 O2_SIGNPOST_EVENT_EMIT (ccdb, sid, " populateCacheWith" , " Fetching object for route %{public}s" , DataSpecUtils::describe (op.spec ).data ());
181- objCnt++;
182180 auto concrete = DataSpecUtils::asConcreteDataMatcher (op.spec );
183181 Output output{concrete.origin , concrete.description , concrete.subSpec };
184182 auto && v = allocator.makeVector <char >(output);
@@ -198,7 +196,7 @@ auto CCDBFetcherHelper::populateCacheWith(std::shared_ptr<CCDBFetcherHelper> con
198196 concrete.origin .as <std::string>(), concrete.description .as <std::string>(), int (concrete.subSpec ));
199197 }
200198 }
201- for (auto m : op.metadata ) {
199+ for (auto const & m : op.metadata ) {
202200 O2_SIGNPOST_EVENT_EMIT (ccdb, sid, " populateCacheWith" , " Adding metadata %{public}s: %{public}s to the request" , m.key .data (), m.value .data ());
203201 metadata[m.key ] = m.value ;
204202 }
@@ -215,7 +213,7 @@ auto CCDBFetcherHelper::populateCacheWith(std::shared_ptr<CCDBFetcherHelper> con
215213 uint64_t cachePopulatedAt = url2uuid->second .cachePopulatedAt ;
216214 // If timestamp is before the time the element was cached or after the claimed validity, we need to check validity, again
217215 // when online.
218- bool cacheExpired = (validUntil <= timestampToUse) || (op.timestamp < cachePopulatedAt);
216+ bool cacheExpired = (validUntil <= ( uint64_t ) timestampToUse) || (( uint64_t ) op.timestamp < cachePopulatedAt);
219217 if (isOnline || cacheExpired) {
220218 if (!helper->useTFSlice ) {
221219 checkValidity = chRate > 0 ? (std::abs (int (timingInfo.tfCounter - url2uuid->second .lastCheckedTF )) >= chRate) : (timingInfo.tfCounter % -chRate) == 0 ;
0 commit comments