Skip to content

Commit f9d9200

Browse files
committed
fix access to non-existent methods for certain concrete actors
1 parent a8e1409 commit f9d9200

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

Framework/include/QualityControl/Actor.h

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ class Actor
127127

128128
void initServices(framework::InitContext& ictx)
129129
{
130-
// fixme: this still forces non-detector-specific actors to have the function
131130
std::string detectorName;
132131
if constexpr (traits::sDetectorSpecific) {
133132
detectorName = std::string{concreteActor().getDetectorName()};
@@ -203,9 +202,17 @@ class Actor
203202
impl::startMonitoring(*mMonitoring, mActivity.mId);
204203
}
205204
if constexpr (requiresService<Service::Bookkeeping>()) {
206-
// todo not sure if these are constexpr, check
207-
auto actorName = runsUserCode<traits>() ? concreteActor().getUserCodeName() : traits::sActorTypeKebabCase;
208-
auto detectorName = traits::sDetectorSpecific ? concreteActor().getDetectorName() : "";
205+
std::string actorName;
206+
if constexpr (runsUserCode<traits>()) {
207+
actorName = concreteActor().getUserCodeName();
208+
} else {
209+
actorName = traits::sActorTypeKebabCase;
210+
}
211+
212+
std::string detectorName;
213+
if constexpr (traits::sDetectorSpecific) {
214+
detectorName = concreteActor().getDetectorName();
215+
}
209216

210217
// todo: get args
211218
impl::startBookkeeping(mActivity.mId, actorName, detectorName, traits::sDplProcessType, "");
@@ -272,7 +279,6 @@ class Actor
272279
const ServicesConfig mServicesConfig;
273280

274281
std::shared_ptr<monitoring::Monitoring> mMonitoring;
275-
276282
};
277283

278284

Framework/include/QualityControl/DataProcessorAdapter.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ struct DataProcessorAdapter
4444
case Criticality::UserDefined:
4545
if (!actor.isCritical()) {
4646
dataProcessor.labels.emplace_back( "expendable" );
47+
} else {
48+
// that's the default in DPL
4749
}
4850
break;
4951
}

0 commit comments

Comments
 (0)