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::LArProperties and detinfo::DetectorClocks are configured and available.

Definition at line 131 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 133 of file DetectorPropertiesStandardTestHelpers.h.

134  {
135  auto* detp = env.template SetupProviderFor<detinfo::DetectorProperties,
137  env.ServiceParameters("DetectorPropertiesService"),
138  env.template ProviderPackFor<detinfo::DetectorPropertiesStandard>());
139  return detp;
140  } // setup()

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