10#include <top/modules/TOPGeometryParInitializer/TOPGeometryParInitializerModule.h>
13#include <top/geometry/TOPGeometryPar.h>
16#include <framework/logging/Logger.h>
17#include <framework/gearbox/GearDir.h>
44 "This class is by default initialized when Geant geometry is created. "
45 "Useful if Geant geometry is not needed. Be carefull when using!");
50 "If true load the Geometry from the database instead of the gearbox",
true);
57 B2WARNING(
"TOPGeometryPar has already been initialized");
65 GearDir detectorDir(
"/Detector");
66 for (
const GearDir& component : detectorDir.
getNodes(
"DetectorComponent")) {
67 if (component.getString(
"@name") ==
"TOP") {
68 gp->Initialize(
GearDir(component,
"Content"));
73 if (not found) B2ERROR(
"Component TOP does not exist or is empty");
GearDir is the basic class used for accessing the parameter store.
void setDescription(const std::string &description)
Sets the description of the module.
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
bool m_useDB
If true load the Geometry from the database instead of gearbox.
static TOPGeometryPar * Instance()
Static method to obtain the pointer to its instance.
std::vector< GearDir > getNodes(const std::string &path="") const
Get vector of GearDirs which point to all the nodes the given path evaluates to.
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
virtual void initialize() override
Initialize the Module.
TOPGeometryParInitializerModule()
Constructor.
Abstract base class for different kinds of events.