@@ -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
0 commit comments