FairShip
Loading...
Searching...
No Matches
pyFairModule.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-3.0-or-later
2// SPDX-FileCopyrightText: Copyright CERN for the benefit of the SHiP
3// Collaboration
4
5#ifndef MUONSHIELDOPTIMIZATION_PYFAIRMODULE_H_
6#define MUONSHIELDOPTIMIZATION_PYFAIRMODULE_H_
7
8struct _object;
9typedef _object PyObject;
10#include <stdexcept>
11#include <string>
12#include <vector>
13
14#include "FairModule.h"
15void call_python_method(PyObject* self, const char* method);
16
17class pyFairModule : public FairModule {
18 public:
19 explicit pyFairModule(PyObject* self) : fSelf(self) {}
20 ~pyFairModule() override = default;
21 void ConstructGeometry() override {
22 call_python_method(fSelf, "ConstructGeometry");
23 }
24
29 static std::vector<std::string> SensitiveVolumeNames(
30 const std::string& module = "");
31
32 private:
34};
35
36#endif // MUONSHIELDOPTIMIZATION_PYFAIRMODULE_H_
static std::vector< std::string > SensitiveVolumeNames(const std::string &module="")
~pyFairModule() override=default
void ConstructGeometry() override
pyFairModule(PyObject *self)
PyObject * fSelf
void call_python_method(PyObject *self, const char *method)
_object PyObject
Definition pyFairModule.h:9