diff --git a/DataFormats/Detectors/FIT/common/src/DataFormatsFITLinkDef.h b/DataFormats/Detectors/FIT/common/src/DataFormatsFITLinkDef.h index 32360d6d13ca9..8c74527a2080a 100644 --- a/DataFormats/Detectors/FIT/common/src/DataFormatsFITLinkDef.h +++ b/DataFormats/Detectors/FIT/common/src/DataFormatsFITLinkDef.h @@ -29,4 +29,6 @@ // TODO AM: Set this here when unused class warning is solved. // #pragma link C++ class std::unordered_map < o2::dcs::DataPointIdentifier, o2::fit::DCSDPValues> + ; +#pragma link C++ class std::unordered_map < std::string, o2::fit::DCSDPValues> + ; + #endif diff --git a/Detectors/FIT/common/dcsmonitoring/include/FITDCSMonitoring/FITDCSDataReader.h b/Detectors/FIT/common/dcsmonitoring/include/FITDCSMonitoring/FITDCSDataReader.h index 3a793466fc8a5..bc6c440861db0 100644 --- a/Detectors/FIT/common/dcsmonitoring/include/FITDCSMonitoring/FITDCSDataReader.h +++ b/Detectors/FIT/common/dcsmonitoring/include/FITDCSMonitoring/FITDCSDataReader.h @@ -52,7 +52,7 @@ class FITDCSDataReader uint64_t processFlags(uint64_t flag, const char* pid); void updateCcdbObjectInfo(); - const std::unordered_map& getDpData() const; + const std::unordered_map& getDpData() const; void resetDpData(); const std::string& getCcdbPath() const; void setCcdbPath(const std::string& ccdbPath); @@ -68,7 +68,7 @@ class FITDCSDataReader void setVerboseMode(bool verboseMode = true); private: - std::unordered_map mDpData; // the object that will go to the CCDB + std::unordered_map mDpData; // the object that will go to the CCDB std::unordered_map mPids; // contains all PIDs for the processor, the bool // will be true if the DP was processed at least once std::unordered_map mDpsMap; // this is the map that will hold the DPs diff --git a/Detectors/FIT/common/dcsmonitoring/src/FITDCSDataReader.cxx b/Detectors/FIT/common/dcsmonitoring/src/FITDCSDataReader.cxx index ea32114e46c33..b5ed991237126 100644 --- a/Detectors/FIT/common/dcsmonitoring/src/FITDCSDataReader.cxx +++ b/Detectors/FIT/common/dcsmonitoring/src/FITDCSDataReader.cxx @@ -38,7 +38,7 @@ void FITDCSDataReader::init(const std::vector& pids) // Fill the array of sub-detector specific DPIDs that will be processed for (const auto& it : pids) { mPids[it] = false; - mDpData[it].makeEmpty(); + mDpData[it.get_alias()].makeEmpty(); } } @@ -85,6 +85,7 @@ int FITDCSDataReader::processDP(const DPCOM& dpcom) { // Processing a single DP const auto& dpid = dpcom.id; + const auto& dpAlias = dpid.get_alias(); const auto& type = dpid.get_type(); const auto& val = dpcom.data; @@ -99,12 +100,12 @@ int FITDCSDataReader::processDP(const DPCOM& dpcom) auto flags = val.get_flags(); if (processFlags(flags, dpid.get_alias()) == 0) { // Store all DP values - if (mDpData[dpid].values.empty() || val.get_epoch_time() > mDpData[dpid].values.back().first) { + if (mDpData[dpAlias].values.empty() || val.get_epoch_time() > mDpData[dpAlias].values.back().first) { dpValueConverter.raw_data = val.payload_pt1; if (type == DPVAL_DOUBLE) { - mDpData[dpid].add(val.get_epoch_time(), lround(dpValueConverter.double_value * 1000)); // store as nA + mDpData[dpAlias].add(val.get_epoch_time(), lround(dpValueConverter.double_value * 1000)); // store as nA } else if (type == DPVAL_UINT) { - mDpData[dpid].add(val.get_epoch_time(), dpValueConverter.uint_value); + mDpData[dpAlias].add(val.get_epoch_time(), dpValueConverter.uint_value); } } } @@ -176,7 +177,7 @@ void FITDCSDataReader::updateCcdbObjectInfo() // if (dp.second.values.empty()) { // continue; // } - LOG(info) << "PID = " << dp.first.get_alias(); + LOG(info) << "DP = " << dp.first; dp.second.print(); } } @@ -187,7 +188,7 @@ void FITDCSDataReader::updateCcdbObjectInfo() return; } -const std::unordered_map& FITDCSDataReader::getDpData() const { return mDpData; } +const std::unordered_map& FITDCSDataReader::getDpData() const { return mDpData; } void FITDCSDataReader::resetDpData() {