diff --git a/source/digits_hits/pyG4SDManager.cc b/source/digits_hits/pyG4SDManager.cc index b142a38..bc62920 100644 --- a/source/digits_hits/pyG4SDManager.cc +++ b/source/digits_hits/pyG4SDManager.cc @@ -4,6 +4,8 @@ #include #include +#include + #include "typecast.hh" #include "opaques.hh" @@ -22,7 +24,11 @@ void export_G4SDManager(py::module &m) [](G4SDManager &self, py::disown_ptr aSD) { self.AddNewDetector(aSD); }) .def("Activate", &G4SDManager::Activate) +#if G4VERSION_NUMBER >= 1130 + .def("GetCollectionID", py::overload_cast(&G4SDManager::GetCollectionID)) +#else .def("GetCollectionID", py::overload_cast(&G4SDManager::GetCollectionID)) +#endif .def("GetCollectionID", py::overload_cast(&G4SDManager::GetCollectionID)) .def("FindSensitiveDetector", &G4SDManager::FindSensitiveDetector, py::arg("dName"), py::arg("warning") = true, diff --git a/source/event/pyG4PrimaryTransformer.cc b/source/event/pyG4PrimaryTransformer.cc index b76b031..34ef7a1 100644 --- a/source/event/pyG4PrimaryTransformer.cc +++ b/source/event/pyG4PrimaryTransformer.cc @@ -15,6 +15,8 @@ #include #include +#include + #include "typecast.hh" #include "opaques.hh" @@ -51,6 +53,10 @@ void export_G4PrimaryTransformer(py::module &m) .def("GimmePrimaries", &G4PrimaryTransformer::GimmePrimaries, py::arg("anEvent"), py::arg("trackIDCounter") = 0, py::return_value_policy::reference) +#if G4VERSION_NUMBER >= 1130 + .def("SetUnknownParticleDefined", &G4PrimaryTransformer::SetUnknownParticleDefined, py::arg("vl")) +#else .def("SetUnknnownParticleDefined", &G4PrimaryTransformer::SetUnknnownParticleDefined, py::arg("vl")) +#endif .def("SetVerboseLevel", &G4PrimaryTransformer::SetVerboseLevel, py::arg("vl")); } diff --git a/source/geometry/management/pyG4GeometryManager.cc b/source/geometry/management/pyG4GeometryManager.cc index a684091..a2dbcce 100644 --- a/source/geometry/management/pyG4GeometryManager.cc +++ b/source/geometry/management/pyG4GeometryManager.cc @@ -6,6 +6,8 @@ #include #include +#include + #include "typecast.hh" #include "opaques.hh" @@ -21,7 +23,11 @@ void export_G4GeometryManager(py::module &m) py::arg("vol") = static_cast(nullptr)) .def("OpenGeometry", &G4GeometryManager::OpenGeometry, py::arg("vol") = static_cast(nullptr)) +#if G4VERSION_NUMBER >= 1130 + .def("IsGeometryClosed", &G4GeometryManager::IsGeometryClosed) +#else .def_static("IsGeometryClosed", &G4GeometryManager::IsGeometryClosed) +#endif .def("SetWorldMaximumExtent", &G4GeometryManager::SetWorldMaximumExtent, py::arg("worldExtent")) .def_static("GetInstance", &G4GeometryManager::GetInstance, py::return_value_policy::reference) .def_static("GetInstanceIfExist", &G4GeometryManager::GetInstanceIfExist, py::return_value_policy::reference); diff --git a/source/geometry/solids/specific/pyG4GenericTrap.cc b/source/geometry/solids/specific/pyG4GenericTrap.cc index 337a1d3..8591f23 100644 --- a/source/geometry/solids/specific/pyG4GenericTrap.cc +++ b/source/geometry/solids/specific/pyG4GenericTrap.cc @@ -10,6 +10,7 @@ #include #include #include +#include #include "typecast.hh" #include "opaques.hh" diff --git a/source/intercoms/pyG4UIcmdWith3VectorAndUnit.cc b/source/intercoms/pyG4UIcmdWith3VectorAndUnit.cc index 658af6d..f753294 100644 --- a/source/intercoms/pyG4UIcmdWith3VectorAndUnit.cc +++ b/source/intercoms/pyG4UIcmdWith3VectorAndUnit.cc @@ -4,6 +4,8 @@ #include #include +#include + #include "typecast.hh" #include "opaques.hh" @@ -13,7 +15,11 @@ class PyG4UIcmdWith3VectorAndUnit : public G4UIcmdWith3VectorAndUnit { public: using G4UIcmdWith3VectorAndUnit::G4UIcmdWith3VectorAndUnit; +#if G4VERSION_NUMBER >= 1130 + G4int DoIt(const G4String ¶meterList) override +#else G4int DoIt(G4String parameterList) override +#endif { PYBIND11_OVERRIDE(G4int, G4UIcmdWith3VectorAndUnit, DoIt, parameterList); } diff --git a/source/intercoms/pyG4UIcmdWithADoubleAndUnit.cc b/source/intercoms/pyG4UIcmdWithADoubleAndUnit.cc index 1f64bbb..ec3bbdc 100644 --- a/source/intercoms/pyG4UIcmdWithADoubleAndUnit.cc +++ b/source/intercoms/pyG4UIcmdWithADoubleAndUnit.cc @@ -4,6 +4,8 @@ #include #include +#include + #include "typecast.hh" #include "opaques.hh" @@ -13,7 +15,11 @@ class PyG4UIcmdWithADoubleAndUnit : public G4UIcmdWithADoubleAndUnit { public: using G4UIcmdWithADoubleAndUnit::G4UIcmdWithADoubleAndUnit; +#if G4VERSION_NUMBER >= 1130 + G4int DoIt(const G4String ¶meterList) override +#else G4int DoIt(G4String parameterList) override +#endif { PYBIND11_OVERRIDE(G4int, G4UIcmdWithADoubleAndUnit, DoIt, parameterList); } diff --git a/source/intercoms/pyG4UIcommand.cc b/source/intercoms/pyG4UIcommand.cc index de37522..a6ec8d2 100644 --- a/source/intercoms/pyG4UIcommand.cc +++ b/source/intercoms/pyG4UIcommand.cc @@ -16,7 +16,11 @@ class PyG4UIcommand : public G4UIcommand { public: using G4UIcommand::G4UIcommand; +#if G4VERSION_NUMBER >= 1130 + G4int DoIt(const G4String ¶meterList) override { PYBIND11_OVERRIDE(G4int, G4UIcommand, DoIt, parameterList); } +#else G4int DoIt(G4String parameterList) override { PYBIND11_OVERRIDE(G4int, G4UIcommand, DoIt, parameterList); } +#endif void List() override { PYBIND11_OVERRIDE(void, G4UIcommand, List, ); } };