diff --git a/Detectors/ITSMFT/ITS/workflow/include/ITSWorkflow/DCSAdaposParserSpec.h b/Detectors/ITSMFT/ITS/workflow/include/ITSWorkflow/DCSAdaposParserSpec.h index cd9be3afc4c95..bcc19ff15b85d 100644 --- a/Detectors/ITSMFT/ITS/workflow/include/ITSWorkflow/DCSAdaposParserSpec.h +++ b/Detectors/ITSMFT/ITS/workflow/include/ITSWorkflow/DCSAdaposParserSpec.h @@ -85,6 +85,10 @@ class ITSDCSAdaposParser : public Task std::string mCcdbFetchUrl = "http://ccdb-test.cern.ch:8080"; o2::ccdb::BasicCCDBManager& mMgr = o2::ccdb::BasicCCDBManager::instance(); long int startTime; + + // to avoid several pushes to CCDB + long int pushTime = 0; + long int lastPushTime = 0; }; // Create a processor spec diff --git a/Detectors/ITSMFT/ITS/workflow/src/DCSAdaposParserSpec.cxx b/Detectors/ITSMFT/ITS/workflow/src/DCSAdaposParserSpec.cxx index 3d14778053529..05bf3cf9b99bb 100644 --- a/Detectors/ITSMFT/ITS/workflow/src/DCSAdaposParserSpec.cxx +++ b/Detectors/ITSMFT/ITS/workflow/src/DCSAdaposParserSpec.cxx @@ -111,7 +111,12 @@ void ITSDCSAdaposParser::process(const gsl::span dps) } if (mapel->second.payload_pt1 + 8 != mCcdbAlpideParam->roFrameLengthInBC) { mStrobeToUpload = mapel->second.payload_pt1; - doStrobeUpload = true; + pushTime = o2::ccdb::getCurrentTimestamp(); + if (pushTime - lastPushTime > 30000) { // push to CCDB only if at least 30s passed from the last push + doStrobeUpload = true; + } else { + doStrobeUpload = false; + } } else { doStrobeUpload = false; } @@ -196,6 +201,9 @@ void ITSDCSAdaposParser::pushToCCDB(ProcessingContext& pc) info.getMetaData(), info.getStartValidityTimestamp(), info.getEndValidityTimestamp()); } + // uptade lastPushTime + lastPushTime = o2::ccdb::getCurrentTimestamp(); + return; }