diff --git a/Detectors/CTP/workflowScalers/src/RunManager.cxx b/Detectors/CTP/workflowScalers/src/RunManager.cxx index 054505aea7ba6..778677bec2ec9 100644 --- a/Detectors/CTP/workflowScalers/src/RunManager.cxx +++ b/Detectors/CTP/workflowScalers/src/RunManager.cxx @@ -216,14 +216,14 @@ int CTPRunManager::addScalers(uint32_t irun, std::time_t time, bool start) } scalrec.intRecord.bc = 0; mActiveRuns[irun]->scalers.addScalerRacordRaw(scalrec); - LOG(info) << "Adding scalers for orbit:" << scalrec.intRecord.orbit; + LOG(debug) << "Adding scalers for orbit:" << scalrec.intRecord.orbit; // scalrec.printStream(std::cout); // printCounters(); return 0; } int CTPRunManager::processMessage(std::string& topic, const std::string& message) { - LOG(info) << "Processing message with topic:" << topic; + LOG(debug) << "Processing message with topic:" << topic; std::string firstcounters; if (topic.find("clear") != std::string::npos) { mRunsLoaded.clear(); @@ -283,7 +283,7 @@ int CTPRunManager::processMessage(std::string& topic, const std::string& message // get config size_t irun = message.find("run"); if (irun == std::string::npos) { - LOG(warning) << "run keyword not found in SOX"; + LOG(debug) << "run keyword not found in SOX"; irun = message.size(); } LOG(info) << "SOX received, Run keyword position:" << irun; @@ -319,22 +319,22 @@ int CTPRunManager::processMessage(std::string& topic, const std::string& message } double timeStamp = std::stold(tokens.at(0)); std::time_t tt = timeStamp; - LOG(info) << "Processing scalers, all good, time:" << tokens.at(0) << " " << std::asctime(std::localtime(&tt)); + LOG(debug) << "Processing scalers, all good, time:" << tokens.at(0) << " " << std::asctime(std::localtime(&tt)); for (uint32_t i = 1; i < tokens.size(); i++) { mCounters[i - 1] = std::stoull(tokens.at(i)); if (i < (NRUNS + 1)) { - std::cout << mCounters[i - 1] << " "; + // std::cout << mCounters[i - 1] << " "; } } - std::cout << std::endl; - LOG(info) << "Counter size:" << tokens.size(); + // std::cout << std::endl; + LOG(debug) << "Counter size:" << tokens.size(); // for (uint32_t i = 0; i < NRUNS; i++) { if ((mCounters[i] == 0) && (mActiveRunNumbers[i] == 0)) { // not active } else if ((mCounters[i] != 0) && (mActiveRunNumbers[i] == mCounters[i])) { // active , do scalers - LOG(info) << "Run continue:" << mCounters[i]; + LOG(debug) << "Run continue:" << mCounters[i]; addScalers(i, tt); // LOG(info) << " QC period:" << mActiveRunNumbers[i] << " " << mActiveRuns[i]->qcwpcount << " " << mQCWritePeriod; if (mActiveRuns[i]->qcwpcount > mQCWritePeriod) { @@ -367,7 +367,7 @@ int CTPRunManager::processMessage(std::string& topic, const std::string& message } } mEOX = 0; - printActiveRuns(); + // printActiveRuns(); return 0; } void CTPRunManager::printActiveRuns() const diff --git a/Detectors/CTP/workflowScalers/src/ctp-proxy.cxx b/Detectors/CTP/workflowScalers/src/ctp-proxy.cxx index f8f8ad3c95fbb..391d1b5ccf58b 100644 --- a/Detectors/CTP/workflowScalers/src/ctp-proxy.cxx +++ b/Detectors/CTP/workflowScalers/src/ctp-proxy.cxx @@ -56,6 +56,7 @@ InjectorFunction dcs2dpl(std::string& ccdbhost, std::string& bkhost, std::string runMgr->setCtpCfgDir(ctpcfgdir); runMgr->init(); // runMgr->setClient(client); + static int nprint = 0; return [runMgr](TimingInfo&, ServiceRegistryRef const& services, fair::mq::Parts& parts, ChannelRetriever channelRetriever, size_t newTimesliceId, bool& stop) -> bool { // FIXME: Why isn't this function using the timeslice index? // make sure just 2 messages received @@ -66,7 +67,15 @@ InjectorFunction dcs2dpl(std::string& ccdbhost, std::string& bkhost, std::string std::string messageHeader{static_cast(parts.At(0)->GetData()), parts.At(0)->GetSize()}; size_t dataSize = parts.At(1)->GetSize(); std::string messageData{static_cast(parts.At(1)->GetData()), parts.At(1)->GetSize()}; - LOG(info) << "received message " << messageHeader << " of size " << dataSize << " # parts:" << parts.Size(); // << " Payload:" << messageData; + nprint++; + int nlimit = 60; + int nrange = 8; + if (nprint > nlimit && nprint < (nlimit + nrange + 1)) { + LOG(info) << "received message " << messageHeader << " of size " << dataSize << " # parts:" << parts.Size(); // << " Payload:" << messageData; + if (nprint == (nlimit + nrange)) { + nprint = 0; + } + } runMgr->processMessage(messageHeader, messageData); return true; }; diff --git a/Detectors/CTP/workflowScalers/src/ctpCCDBManager.cxx b/Detectors/CTP/workflowScalers/src/ctpCCDBManager.cxx index 77d3f03bbbde2..2c634ddd2565d 100644 --- a/Detectors/CTP/workflowScalers/src/ctpCCDBManager.cxx +++ b/Detectors/CTP/workflowScalers/src/ctpCCDBManager.cxx @@ -28,7 +28,7 @@ int ctpCCDBManager::saveRunScalersToCCDB(CTPRunScalers& scalers, long timeStart, { // data base if (mCCDBHost == "none") { - LOG(info) << "Scalers not written to CCDB none"; + LOG(debug) << "Scalers not written to CCDB none"; return 0; } // CTPActiveRun* run = mActiveRuns[i]; @@ -56,7 +56,7 @@ int ctpCCDBManager::saveRunScalersToQCDB(CTPRunScalers& scalers, long timeStart, { // data base if (mQCDBHost == "none") { - LOG(info) << "Scalers not written to QCDB none"; + LOG(debug) << "Scalers not written to QCDB none"; return 0; } // CTPActiveRun* run = mActiveRuns[i];q