Base class for objects initializing a geometry. More...
#include "larcorealg/TestUtils/unit_test_base.h"
#include "larcorealg/Geometry/GeometryCore.h"
#include "larcorealg/Geometry/ChannelMapAlg.h"
#include "fhiclcpp/ParameterSet.h"
#include "messagefacility/MessageLogger/MessageLogger.h"
#include "cetlib/filesystem.h"
#include "cetlib/filepath_maker.h"
#include "cetlib/search_path.h"
#include <iostream>
#include <string>
#include <memory>
#include <map>
Go to the source code of this file.
Classes | |
struct | testing::BasicGeometryEnvironmentConfiguration< CHANNELMAP > |
Class holding a configuration for a test environment. More... | |
class | testing::GeometryTesterEnvironment< ConfigurationClass > |
Environment for a geometry test. More... | |
Namespaces | |
testing | |
LArSoft test utilities. | |
Base class for objects initializing a geometry.
Provides an environment for easy set up of a Geometry-aware test. Keep in mind that, as much as I could push on flexibility, the channel mapping algorithm must be hard-coded and, if using Boost unit test, the configuration file location must be hard coded too (or you can use the provided configuration).
For an example of usage, see larcore/test/Geometry/geometry_iterator_test.cxx
The standard TesterEnvironment<> class can't handle geo::GeometryCore. The reason is twofold: for once, ExptGeoHelperInterface service is not factorized, so we need to choose explicitly the ChannelMapAlg implementation (here this is obtained by a template argument). Another is that GeometryCore both is required and requires ChannelMapAlg to have a complete initialisation. There are ways to overcome the issue at the cost of added complication.
Currently provides:
Definition in file geometry_unit_test_base.h.