Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Modules/CTP/include/CTP/RawDataQcTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class CTPRawDataReaderTask final : public TaskInterface
int mIndexMBclass = -1; // index for the MB ctp class, which is used as scaling for the ratios
bool mConsistCheck = 0;
bool mReadCTPconfigInMonitorData = 0;
const o2::ctp::CTPConfiguration* mCTPconfig = nullptr;
bool mCTPconfigFound = false; // the config is copied out on the first timeframe that has one
std::string mMBclassName;
std::array<uint64_t, o2::ctp::CTP_NCLASSES> mClassErrorsA;
bool mPerformConsistencyCheck = false;
Expand Down
15 changes: 9 additions & 6 deletions Modules/CTP/src/RawDataQcTask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -304,20 +304,23 @@ void CTPRawDataReaderTask::monitorData(o2::framework::ProcessingContext& ctx)
std::vector<o2::ctp::CTPDigit> outputDigits;

if (mReadCTPconfigInMonitorData) {
if (mCTPconfig == nullptr) {
mCTPconfig = ctx.inputs().get<o2::ctp::CTPConfiguration*>("ctp-config").get();
// mCTPconfig = ctpConfigPtr.get();
if (mCTPconfig != nullptr) {
if (!mCTPconfigFound) {
// Not kept beyond this scope: the object belongs to the framework's CCDB
// cache and may be replaced on the next validity period. Everything we
// need is copied out below.
auto ctpConfig = ctx.inputs().get<o2::ctp::CTPConfiguration*>("ctp-config");
if (ctpConfig != nullptr) {
mCTPconfigFound = true;
ILOG(Info, Support) << "CTP config found" << ENDM;
std::vector<o2::ctp::CTPClass> ctpcls = mCTPconfig->getCTPClasses();
std::vector<o2::ctp::CTPClass> ctpcls = ctpConfig->getCTPClasses();
for (size_t i = 0; i < ctpcls.size(); i++) {
classNames[i] = ctpcls[i].name.c_str();
if (ctpcls[i].name.find(mMBclassName) != std::string::npos) {
mIndexMBclass = ctpcls[i].getIndex() + 1;
break;
}
}
mDecoder.setCTPConfig(*mCTPconfig);
mDecoder.setCTPConfig(*ctpConfig);
}
}
for (int i = 0; i < nclasses; i++) {
Expand Down
Loading