Belle II Software light-2406-ragdoll
CreatorBase.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 <geometry/GeometryManager.h>
12#include <framework/core/FrameworkExceptions.h>
13
14class G4LogicalVolume;
15
16namespace Belle2 {
22 class GearDir;
23 class IntervalOfValidity;
24
25 namespace geometry {
26
29 public:
31 BELLE2_DEFINE_EXCEPTION(DBNotImplemented, "Cannot create geometry from Database.");
35 virtual ~CreatorBase() {}
36
43 virtual void create(const GearDir& content, G4LogicalVolume& topVolume, GeometryTypes type) = 0;
44
51 virtual void createFromDB(const std::string& name, G4LogicalVolume& topVolume, GeometryTypes type);
52
58 virtual void createPayloads(const GearDir& content, const IntervalOfValidity& iov);
59 };
60 }
62} //end of namespace Belle2
GearDir is the basic class used for accessing the parameter store.
Definition: GearDir.h:31
A class that describes the interval of experiments/runs for which an object in the database is valid.
Pure virtual base class for all geometry creators.
Definition: CreatorBase.h:28
virtual ~CreatorBase()
Default Destructor.
Definition: CreatorBase.h:35
virtual void createFromDB(const std::string &name, G4LogicalVolume &topVolume, GeometryTypes type)
Function to create the geometry from the Database.
Definition: CreatorBase.cc:17
virtual void create(const GearDir &content, G4LogicalVolume &topVolume, GeometryTypes type)=0
Function to actually create the geometry, has to be overridden by derived classes.
BELLE2_DEFINE_EXCEPTION(DBNotImplemented, "Cannot create geometry from Database.")
Exception that will be thrown in createFromDB if member is not yet implemented by creator.
virtual void createPayloads(const GearDir &content, const IntervalOfValidity &iov)
Function to create the geometry database.
Definition: CreatorBase.cc:24
CreatorBase()
Default Constructor.
Definition: CreatorBase.h:33
GeometryTypes
Flag indiciating the type of geometry to be used.
Abstract base class for different kinds of events.
Definition: ClusterUtils.h:24