Skip to content

Commit 27ff576

Browse files
authored
FIT PostProc: bugfix for incorrect types in dynamic cast (#1716)
1 parent 2cc2512 commit 27ff576

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

Modules/FIT/FDD/src/PostProcTask.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ void PostProcTask::update(Trigger t, framework::ServiceRegistryRef)
234234
ILOG(Error) << "MO \"ChannelDataBits\" NOT retrieved!!!" << ENDM;
235235
}
236236
auto moStatChannelID = mDatabase->retrieveMO(mPathDigitQcTask, "StatChannelID", t.timestamp, t.activity);
237-
auto hStatChannelID = moStatChannelID ? dynamic_cast<TH2F*>(moStatChannelID->getObject()) : nullptr;
237+
auto hStatChannelID = moStatChannelID ? dynamic_cast<TH1F*>(moStatChannelID->getObject()) : nullptr;
238238
if (!hStatChannelID) {
239239
ILOG(Error) << "MO \"StatChannelID\" NOT retrieved!!!" << ENDM;
240240
}
@@ -306,13 +306,13 @@ void PostProcTask::update(Trigger t, framework::ServiceRegistryRef)
306306
}
307307

308308
auto mo3 = mDatabase->retrieveMO(mPathDigitQcTask, "AmpPerChannel", t.timestamp, t.activity);
309-
auto hAmpPerChannel = mo3 ? dynamic_cast<TH2D*>(mo3->getObject()) : nullptr;
309+
auto hAmpPerChannel = mo3 ? dynamic_cast<TH2F*>(mo3->getObject()) : nullptr;
310310
if (!hAmpPerChannel) {
311311
ILOG(Error) << "MO \"AmpPerChannel\" NOT retrieved!!!"
312312
<< ENDM;
313313
}
314314
auto mo4 = mDatabase->retrieveMO(mPathDigitQcTask, "TimePerChannel", t.timestamp, t.activity);
315-
auto hTimePerChannel = mo4 ? dynamic_cast<TH2D*>(mo4->getObject()) : nullptr;
315+
auto hTimePerChannel = mo4 ? dynamic_cast<TH2F*>(mo4->getObject()) : nullptr;
316316
if (!hTimePerChannel) {
317317
ILOG(Error) << "MO \"TimePerChannel\" NOT retrieved!!!"
318318
<< ENDM;

Modules/FIT/FT0/src/PostProcTask.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ void PostProcTask::update(Trigger t, framework::ServiceRegistryRef)
234234
ILOG(Error) << "MO \"ChannelDataBits\" NOT retrieved!!!" << ENDM;
235235
}
236236
auto moStatChannelID = mDatabase->retrieveMO(mPathDigitQcTask, "StatChannelID", t.timestamp, t.activity);
237-
auto hStatChannelID = moStatChannelID ? dynamic_cast<TH2F*>(moStatChannelID->getObject()) : nullptr;
237+
auto hStatChannelID = moStatChannelID ? dynamic_cast<TH1F*>(moStatChannelID->getObject()) : nullptr;
238238
if (!hStatChannelID) {
239239
ILOG(Error) << "MO \"StatChannelID\" NOT retrieved!!!" << ENDM;
240240
}
@@ -306,13 +306,13 @@ void PostProcTask::update(Trigger t, framework::ServiceRegistryRef)
306306
}
307307

308308
auto mo3 = mDatabase->retrieveMO(mPathDigitQcTask, "AmpPerChannel", t.timestamp, t.activity);
309-
auto hAmpPerChannel = mo3 ? dynamic_cast<TH2D*>(mo3->getObject()) : nullptr;
309+
auto hAmpPerChannel = mo3 ? dynamic_cast<TH2F*>(mo3->getObject()) : nullptr;
310310
if (!hAmpPerChannel) {
311311
ILOG(Error) << "MO \"AmpPerChannel\" NOT retrieved!!!"
312312
<< ENDM;
313313
}
314314
auto mo4 = mDatabase->retrieveMO(mPathDigitQcTask, "TimePerChannel", t.timestamp, t.activity);
315-
auto hTimePerChannel = mo4 ? dynamic_cast<TH2D*>(mo4->getObject()) : nullptr;
315+
auto hTimePerChannel = mo4 ? dynamic_cast<TH2F*>(mo4->getObject()) : nullptr;
316316
if (!hTimePerChannel) {
317317
ILOG(Error) << "MO \"TimePerChannel\" NOT retrieved!!!"
318318
<< ENDM;

Modules/FIT/FV0/src/PostProcTask.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ void PostProcTask::update(Trigger t, framework::ServiceRegistryRef)
234234
ILOG(Error) << "MO \"ChannelDataBits\" NOT retrieved!!!" << ENDM;
235235
}
236236
auto moStatChannelID = mDatabase->retrieveMO(mPathDigitQcTask, "StatChannelID", t.timestamp, t.activity);
237-
auto hStatChannelID = moStatChannelID ? dynamic_cast<TH2F*>(moStatChannelID->getObject()) : nullptr;
237+
auto hStatChannelID = moStatChannelID ? dynamic_cast<TH1F*>(moStatChannelID->getObject()) : nullptr;
238238
if (!hStatChannelID) {
239239
ILOG(Error) << "MO \"StatChannelID\" NOT retrieved!!!" << ENDM;
240240
}
@@ -306,13 +306,13 @@ void PostProcTask::update(Trigger t, framework::ServiceRegistryRef)
306306
}
307307

308308
auto mo3 = mDatabase->retrieveMO(mPathDigitQcTask, "AmpPerChannel", t.timestamp, t.activity);
309-
auto hAmpPerChannel = mo3 ? dynamic_cast<TH2D*>(mo3->getObject()) : nullptr;
309+
auto hAmpPerChannel = mo3 ? dynamic_cast<TH2F*>(mo3->getObject()) : nullptr;
310310
if (!hAmpPerChannel) {
311311
ILOG(Error) << "MO \"AmpPerChannel\" NOT retrieved!!!"
312312
<< ENDM;
313313
}
314314
auto mo4 = mDatabase->retrieveMO(mPathDigitQcTask, "TimePerChannel", t.timestamp, t.activity);
315-
auto hTimePerChannel = mo4 ? dynamic_cast<TH2D*>(mo4->getObject()) : nullptr;
315+
auto hTimePerChannel = mo4 ? dynamic_cast<TH2F*>(mo4->getObject()) : nullptr;
316316
if (!hTimePerChannel) {
317317
ILOG(Error) << "MO \"TimePerChannel\" NOT retrieved!!!"
318318
<< ENDM;

0 commit comments

Comments
 (0)