LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
lar::standalone Namespace Reference

Utilities for use in an environment without art. More...

Functions

fhicl::ParameterSet ParseConfiguration (std::string configPath, cet::filepath_maker &lookupPolicy)
 Parses a FHiCL configuration file. More...
 
fhicl::ParameterSet ParseConfiguration (std::string configPath)
 Parses a FHiCL configuration file. More...
 
void SetupMessageFacility (fhicl::ParameterSet const &pset, std::string applName="standalone")
 Sets up the message facility service. More...
 
std::unique_ptr< geo::GeometryCoreSetupGeometryWithChannelMapping (fhicl::ParameterSet const &pset, std::shared_ptr< geo::ChannelMapAlg > channelMap)
 Initializes a LArSoft geometry object. More...
 
template<typename ChannelMapClass , typename... Args>
std::unique_ptr< geo::GeometryCoreSetupGeometry (fhicl::ParameterSet const &pset, Args &&...args)
 Initializes a LArSoft geometry object. More...
 

Detailed Description

Utilities for use in an environment without art.

Function Documentation

fhicl::ParameterSet lar::standalone::ParseConfiguration ( std::string  configPath,
cet::filepath_maker &  lookupPolicy 
)
inline

Parses a FHiCL configuration file.

Parameters
configPaththe path to the configuration file to be parsed
lookupPolicyclass performing the proper lookup for FHiCL files
Returns
a parameter set containing the whole configuration from the file

Some lookup policies are provided in cetlib (see cetlib/filepath_maker.h file).

Definition at line 107 of file StandaloneBasicSetup.h.

References fhicl::make_ParameterSet().

Referenced by ParseConfiguration().

108 {
109  fhicl::ParameterSet pset;
110  fhicl::make_ParameterSet(configPath, lookupPolicy, pset);
111  return pset;
112 } // ParseConfiguration(string, filepath_maker)
void make_ParameterSet(intermediate_table const &tbl, ParameterSet &ps)
fhicl::ParameterSet lar::standalone::ParseConfiguration ( std::string  configPath)
inline

Parses a FHiCL configuration file.

Parameters
configPaththe path to the configuration file to be parsed
Returns
a parameter set containing the whole configuration from the file

The lookup policy for finding the FHiCL files is such that:

  • configPath must be readily available: no special lookup is performed
  • FHiCL files included (directly or indirectly) by configPath are searched for in the path list specified in the environment variable FHICL_FILE_PATH

Definition at line 117 of file StandaloneBasicSetup.h.

References ParseConfiguration(), and SetupMessageFacility().

118 {
119  cet::filepath_lookup_after1 policy("FHICL_FILE_PATH");
120  return ParseConfiguration(configPath, policy);
121 } // ParseConfiguration(string)
fhicl::ParameterSet ParseConfiguration(std::string configPath)
Parses a FHiCL configuration file.
void lar::standalone::SetupMessageFacility ( fhicl::ParameterSet const &  pset,
std::string  applName = "standalone" 
)
inline

Sets up the message facility service.

Parameters
psetglobal configuration parameter set
applName(default: "standalone") name of running the application

The configuration is read from the path services.message (as for the standard art behaviour). Any configuration working in art is expected to work here as well.

Technical details:

Definition at line 126 of file StandaloneBasicSetup.h.

References fhicl::ParameterSet::get(), mf::SetApplicationName(), mf::SetContextIteration(), mf::SetContextSinglet(), and mf::StartMessageFacility().

Referenced by testing::BasicTesterEnvironment< ConfigurationClass >::DefaultParameters(), ParseConfiguration(), testing::BasicTesterEnvironment< ConfigurationClass >::Setup(), and testing::BasicTesterEnvironment< ConfigurationClass >::SetupMessageFacility().

127 {
128  mf::StartMessageFacility(pset.get<fhicl::ParameterSet>("services.message"));
129  mf::SetApplicationName(applName);
130  mf::SetContextSinglet("main");
132 } // lar::standalone::SetupMessageFacility()
void SetContextIteration(string const &val)
void StartMessageFacility(fhicl::ParameterSet const &pset, string const &applicationName)
void SetContextSinglet(string const &val)
void SetApplicationName(string const &applicationName)