Belle II Software development
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
15namespace Belle2 {
21 class GeometryModule: public Module {
22 public:
28 void initialize() override;
30 void terminate() override;
31 protected:
33 std::string m_geometryPath;
37 std::vector<std::string> m_components;
39 std::vector<std::string> m_excluded;
41 std::vector<std::string> m_additional;
43 bool m_assignRegions {false};
47 bool m_ignoreIfPresent{false};
49 bool m_useDB{true};
51 std::vector<int> m_payloadIov{0, 0, -1, -1};
57 };
59} //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.