LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
helper_macros.h File Reference

Go to the source code of this file.

Macros

#define ART_DETAIL_STRINGIZED_VALUE(value)   #value
 
#define ART_DETAIL_STRINGIZED_TYPE(svc)   ART_DETAIL_STRINGIZED_VALUE(svc)
 
#define DEFINE_ART_SH_L_G_SCOPE_M_INTERFACE
 
#define DEFINE_ART_SH_LEGACY_SCOPE_M_INTERFACE   DEFINE_ART_SH_L_G_SCOPE_M_INTERFACE
 
#define DEFINE_ART_SH_GLOBAL_SCOPE_M_INTERFACE   DEFINE_ART_SH_L_G_SCOPE_M_INTERFACE
 
#define DEFINE_ART_SH_PER_SCHEDULE_SCOPE_M_INTERFACE
 
#define DEFINE_ART_SH_SCOPE_M_INTERFACE(scopeArg)    DEFINE_ART_SH_##scopeArg##_SCOPE_M_INTERFACE
 
#define DEFINE_ART_SH_L_G_SCOPE_R_INTERFACE
 
#define DEFINE_ART_SH_LEGACY_SCOPE_R_INTERFACE   DEFINE_ART_SH_L_G_SCOPE_R_INTERFACE
 
#define DEFINE_ART_SH_GLOBAL_SCOPE_R_INTERFACE   DEFINE_ART_SH_L_G_SCOPE_R_INTERFACE
 
#define DEFINE_ART_SH_PER_SCHEDULE_SCOPE_R_INTERFACE
 
#define DEFINE_ART_SH_SCOPE_R_INTERFACE(scopeArg)    DEFINE_ART_SH_##scopeArg##_SCOPE_R_INTERFACE
 
#define DEFINE_ART_SERVICE_TYPEID(svc)    art::TypeID get_typeid() const override { return TypeID{typeid(svc)}; }
 
#define DEFINE_ART_SERVICE_SCOPE(scopeArg)
 
#define DEFINE_ART_L_G_SERVICE_RETRIEVER(svc, scopeArg)
 
#define DEFINE_ART_LEGACY_SERVICE_RETRIEVER(svc)    DEFINE_ART_L_G_SERVICE_RETRIEVER(svc, LEGACY)
 
#define DEFINE_ART_GLOBAL_SERVICE_RETRIEVER(svc)    DEFINE_ART_L_G_SERVICE_RETRIEVER(svc, GLOBAL)
 
#define DEFINE_ART_PER_SCHEDULE_SERVICE_RETRIEVER(svc)
 
#define DEFINE_ART_L_G_SERVICE_MAKER(svc, scopeArg)
 
#define DEFINE_ART_LEGACY_SERVICE_MAKER(svc)    DEFINE_ART_L_G_SERVICE_MAKER(svc, LEGACY)
 
#define DEFINE_ART_GLOBAL_SERVICE_MAKER(svc)    DEFINE_ART_L_G_SERVICE_MAKER(svc, GLOBAL)
 
#define DEFINE_ART_PER_SCHEDULE_SERVICE_MAKER(svc)
 
#define DEFINE_ART_SERVICE_HELPER_CREATE(svc)
 
#define DECLARE_ART_SERVICE_DETAIL(svc, scopeArg)
 
#define DECLARE_ART_SERVICE_INTERFACE_DETAIL(iface, scopeArg)
 
#define DECLARE_ART_SERVICE_INTERFACE_IMPL_DETAIL(svc, iface, scopeArg)
 
#define DECLARE_ART_SYSTEM_SERVICE_DETAIL(svc, scopeArg)
 
#define DEFINE_ART_SH_CREATE(svc)   DEFINE_ART_SH_CREATE_DETAIL(svc, service)
 
#define DEFINE_ART_SIH_CREATE(svc)   DEFINE_ART_SH_CREATE_DETAIL(svc, iface)
 
#define DEFINE_ART_SH_CREATE_DETAIL(svc, type)
 

Macro Definition Documentation

#define ART_DETAIL_STRINGIZED_TYPE (   svc)    ART_DETAIL_STRINGIZED_VALUE(svc)

Definition at line 22 of file helper_macros.h.

#define ART_DETAIL_STRINGIZED_VALUE (   value)    #value

Definition at line 21 of file helper_macros.h.

#define DECLARE_ART_SERVICE_DETAIL (   svc,
  scopeArg 
)
Value:
namespace art { \
namespace detail { \
template <> \
struct ServiceHelper<svc> : public ServiceImplHelper, \
DEFINE_ART_SH_SCOPE_M_INTERFACE(scopeArg), \
DEFINE_ART_SH_SCOPE_R_INTERFACE(scopeArg) { \
DEFINE_ART_SERVICE_TYPEID(svc) \
DEFINE_ART_SERVICE_SCOPE(scopeArg) \
bool \
is_interface_impl() const override \
{ \
return false; \
} \
DEFINE_ART_##scopeArg##_SERVICE_MAKER(svc) DEFINE_ART_##scopeArg \
##_SERVICE_RETRIEVER(svc) \
}; \
} \
}
HLT enums.
bool override

Definition at line 153 of file helper_macros.h.

#define DECLARE_ART_SERVICE_INTERFACE_DETAIL (   iface,
  scopeArg 
)
Value:
namespace art { \
namespace detail { \
template <> \
struct ServiceHelper<iface> \
: public ServiceInterfaceHelper, \
DEFINE_ART_SH_SCOPE_R_INTERFACE(scopeArg) { \
DEFINE_ART_SERVICE_TYPEID(iface) \
DEFINE_ART_SERVICE_SCOPE(scopeArg) \
DEFINE_ART_##scopeArg##_SERVICE_RETRIEVER(iface) \
}; \
} \
}
HLT enums.

Definition at line 174 of file helper_macros.h.

#define DECLARE_ART_SERVICE_INTERFACE_IMPL_DETAIL (   svc,
  iface,
  scopeArg 
)

Definition at line 189 of file helper_macros.h.

#define DECLARE_ART_SYSTEM_SERVICE_DETAIL (   svc,
  scopeArg 
)
Value:
namespace art { \
namespace detail { \
template <> \
struct ServiceHelper<svc> : public ServiceImplHelper, \
DEFINE_ART_SH_SCOPE_R_INTERFACE(scopeArg) { \
DEFINE_ART_SERVICE_TYPEID(svc) \
DEFINE_ART_SERVICE_SCOPE(scopeArg) \
bool \
is_interface_impl() const override \
{ \
return false; \
} \
DEFINE_ART_##scopeArg##_SERVICE_RETRIEVER(svc) \
}; \
} \
}
HLT enums.
bool override

Definition at line 225 of file helper_macros.h.

#define DEFINE_ART_GLOBAL_SERVICE_MAKER (   svc)    DEFINE_ART_L_G_SERVICE_MAKER(svc, GLOBAL)

Definition at line 126 of file helper_macros.h.

#define DEFINE_ART_GLOBAL_SERVICE_RETRIEVER (   svc)    DEFINE_ART_L_G_SERVICE_RETRIEVER(svc, GLOBAL)

Definition at line 95 of file helper_macros.h.

#define DEFINE_ART_L_G_SERVICE_MAKER (   svc,
  scopeArg 
)
Value:
std::unique_ptr<ServiceWrapperBase> make(fhicl::ParameterSet const& cfg, \
ActivityRegistry& reg) \
const final override \
{ \
return std::make_unique<ServiceWrapper<svc, ServiceScope::scopeArg>>(cfg, \
reg); \
}

Definition at line 112 of file helper_macros.h.

#define DEFINE_ART_L_G_SERVICE_RETRIEVER (   svc,
  scopeArg 
)
Value:
void* retrieve(std::shared_ptr<ServiceWrapperBase>& swb) \
const final override \
{ \
return &dynamic_cast<ServiceWrapper<svc, ServiceScope::scopeArg>*>( \
swb.get()) \
->get(); \
}

Definition at line 81 of file helper_macros.h.

#define DEFINE_ART_LEGACY_SERVICE_MAKER (   svc)    DEFINE_ART_L_G_SERVICE_MAKER(svc, LEGACY)

Definition at line 122 of file helper_macros.h.

#define DEFINE_ART_LEGACY_SERVICE_RETRIEVER (   svc)    DEFINE_ART_L_G_SERVICE_RETRIEVER(svc, LEGACY)

Definition at line 91 of file helper_macros.h.

#define DEFINE_ART_PER_SCHEDULE_SERVICE_MAKER (   svc)
Value:
std::unique_ptr<ServiceWrapperBase> make( \
fhicl::ParameterSet const& cfg, ActivityRegistry& reg, size_t nSchedules) \
const final override \
{ \
return std::make_unique<ServiceWrapper<svc, ServiceScope::PER_SCHEDULE>>( \
cfg, reg, nSchedules); \
}

Definition at line 130 of file helper_macros.h.

#define DEFINE_ART_PER_SCHEDULE_SERVICE_RETRIEVER (   svc)
Value:
void* retrieve(std::shared_ptr<ServiceWrapperBase>& swb, \
ScheduleID const sID) const final override \
{ \
return &dynamic_cast<ServiceWrapper<svc, ServiceScope::PER_SCHEDULE>*>( \
swb.get()) \
->get(sID); \
}

Definition at line 99 of file helper_macros.h.

#define DEFINE_ART_SERVICE_HELPER_CREATE (   svc)
Value:
static std::unique_ptr<art::detail::ServiceHelperBase> createHelper() \
{ \
return std::make_unique<art::detail::ServiceHelper<svc>>(); \
}

Definition at line 140 of file helper_macros.h.

#define DEFINE_ART_SERVICE_SCOPE (   scopeArg)
Value:
ServiceScope scope() const override { return ServiceScope::scopeArg; } \
static constexpr ServiceScope scope_val[[gnu::unused]]{ \
ServiceScope::scopeArg};
ServiceScope
Definition: ServiceScope.h:5

Definition at line 72 of file helper_macros.h.

#define DEFINE_ART_SERVICE_TYPEID (   svc)    art::TypeID get_typeid() const override { return TypeID{typeid(svc)}; }

Definition at line 65 of file helper_macros.h.

#define DEFINE_ART_SH_CREATE (   svc)    DEFINE_ART_SH_CREATE_DETAIL(svc, service)

Definition at line 245 of file helper_macros.h.

#define DEFINE_ART_SH_CREATE_DETAIL (   svc,
  type 
)
Value:
EXTERN_C_FUNC_DECLARE_START \
std::unique_ptr<art::detail::ServiceHelperBase> create_##type##_helper() \
{ \
return std::make_unique<art::detail::ServiceHelper<svc>>(); \
} \
EXTERN_C_FUNC_DECLARE_END

Definition at line 249 of file helper_macros.h.

#define DEFINE_ART_SH_GLOBAL_SCOPE_M_INTERFACE   DEFINE_ART_SH_L_G_SCOPE_M_INTERFACE

Definition at line 35 of file helper_macros.h.

#define DEFINE_ART_SH_GLOBAL_SCOPE_R_INTERFACE   DEFINE_ART_SH_L_G_SCOPE_R_INTERFACE

Definition at line 53 of file helper_macros.h.

#define DEFINE_ART_SH_L_G_SCOPE_M_INTERFACE
Value:
public \
ServiceLGMHelper

Definition at line 28 of file helper_macros.h.

#define DEFINE_ART_SH_L_G_SCOPE_R_INTERFACE
Value:
public \
ServiceLGRHelper

Definition at line 46 of file helper_macros.h.

#define DEFINE_ART_SH_LEGACY_SCOPE_M_INTERFACE   DEFINE_ART_SH_L_G_SCOPE_M_INTERFACE

Definition at line 32 of file helper_macros.h.

#define DEFINE_ART_SH_LEGACY_SCOPE_R_INTERFACE   DEFINE_ART_SH_L_G_SCOPE_R_INTERFACE

Definition at line 50 of file helper_macros.h.

#define DEFINE_ART_SH_PER_SCHEDULE_SCOPE_M_INTERFACE
Value:
public \
ServicePSMHelper

Definition at line 38 of file helper_macros.h.

#define DEFINE_ART_SH_PER_SCHEDULE_SCOPE_R_INTERFACE
Value:
public \
ServicePSRHelper

Definition at line 56 of file helper_macros.h.

#define DEFINE_ART_SH_SCOPE_M_INTERFACE (   scopeArg)    DEFINE_ART_SH_##scopeArg##_SCOPE_M_INTERFACE

Definition at line 42 of file helper_macros.h.

#define DEFINE_ART_SH_SCOPE_R_INTERFACE (   scopeArg)    DEFINE_ART_SH_##scopeArg##_SCOPE_R_INTERFACE

Definition at line 60 of file helper_macros.h.

#define DEFINE_ART_SIH_CREATE (   svc)    DEFINE_ART_SH_CREATE_DETAIL(svc, iface)

Definition at line 247 of file helper_macros.h.