Static Public Member Functions | List of all members
testing::SimpleEnvironmentSetupClass < detinfo::DetectorPropertiesStandard, TestEnv > Struct Template Reference

Environment setup helper for DetectorPropertiesStandard. More...

#include <DetectorPropertiesStandardTestHelpers.h>

Static Public Member Functions

static detinfo::DetectorPropertiesStandardsetup (TestEnv &env)
 

Detailed Description

template<typename TestEnv>
struct testing::SimpleEnvironmentSetupClass < detinfo::DetectorPropertiesStandard, TestEnv >

Environment setup helper for DetectorPropertiesStandard.

Template Parameters
TestEnvtype of environment to set up
See also
simpleEnvironmentSetup()

A service provider is set up in the environment, associated with the types detinfo::DetectorPropertiesStandard and detinfo::DetectorProperties. Its configuration is read from "services.DetectorPropertiesService".

The environment is expected to expose an interface equivalent to the one of testing::TesterEnvironment.

This class specialisation enables the support of SimpleProviderSetup() methods of testing::TesterEnvironment. It should be possible to set up a testing environment by calling:

env.SimpleProviderSetup<detinfo::DetectorPropertiesStandard>();

The provider will be available from any of these two calls:

env.Provider<detinfo::DetectorPropertiesStandard>();
env.Provider<detinfo::DetectorProperties>();
Note
This function assumes there is a DetectorPropertiesService service configuration available in the environment, and that the service providers geo::GeometryCore, detinfo::GArProperties and detinfo::DetectorClocks are configured and available.

Definition at line 139 of file DetectorPropertiesStandardTestHelpers.h.

Member Function Documentation

template<typename TestEnv >
static detinfo::DetectorPropertiesStandard* testing::SimpleEnvironmentSetupClass < detinfo::DetectorPropertiesStandard, TestEnv >::setup ( TestEnv &  env)
inlinestatic

Definition at line 142 of file DetectorPropertiesStandardTestHelpers.h.

143  {
144  return env.template SetupProviderFor
146  (
147  env.ServiceParameters("DetectorPropertiesService"),
148  env.template ProviderPackFor<detinfo::DetectorPropertiesStandard>()
149  );
150  } // setup()

The documentation for this struct was generated from the following file: