Belle II Software  release-08-01-10
GeometryModule.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 
9 #pragma once
10 
11 #include <framework/core/Module.h>
12 #include <framework/database/DBObjPtr.h>
13 #include <geometry/dbobjects/GeoConfiguration.h>
14 
15 namespace Belle2 {
24  class GeometryModule: public Module {
25  public:
31  void initialize() override;
33  void terminate() override;
34  protected:
36  std::string m_geometryPath;
40  std::vector<std::string> m_components;
42  std::vector<std::string> m_excluded;
44  std::vector<std::string> m_additional;
46  bool m_assignRegions {false};
50  bool m_ignoreIfPresent{false};
52  bool m_useDB{true};
54  std::vector<int> m_payloadIov{0, 0, -1, -1};
60  };
62 } //Belle2 namespace
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
Module to facilitate Geometry creation.
std::string m_geometryPath
Path for the geometry in the parameter space.
std::vector< std::string > m_components
Components to be created, if empty all components will be created.
void initialize() override
Create geometry.
bool m_assignRegions
Whether or not a region should be assigned to all volumes created by a given creator.
void terminate() override
Clean up the geometry.
std::vector< std::string > m_additional
Components to be added in addition to the default ones.
std::vector< int > m_payloadIov
Payload iov when creating a geometry configuration.
DBObjPtr< GeoConfiguration > * m_geometryConfig
Database object pointing to the geometry configuration in case we load the geometry from database.
bool m_createGeometryPayload
If true we need to create a payload.
std::vector< std::string > m_excluded
Components to excluded from creation.
GeometryModule()
Constructor.
int m_geometryType
Type of the geometry to be built.
~GeometryModule()
Destructor.
bool m_useDB
Whether or not to build the geometry from the database.
bool m_ignoreIfPresent
Whether or not this module will raise an error if the geometry is already present.
Base class for Modules.
Definition: Module.h:72
Abstract base class for different kinds of events.