Skip to content

Commit

Permalink
Fix semicolons in pybindings
Browse files Browse the repository at this point in the history
  • Loading branch information
austinschneider committed Oct 16, 2024
1 parent 25c4c7e commit f74be46
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions projects/injection/private/pybindings/injection.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -39,28 +39,32 @@ PYBIND11_MODULE(injection,m) {

class_<Process, std::shared_ptr<Process>>(m, "Process")
.def_property("primary_type", &Process::GetPrimaryType, &Process::SetPrimaryType)
.def_property("interactions", &Process::GetInteractions, &Process::SetInteractions);
.def_property("interactions", &Process::GetInteractions, &Process::SetInteractions)
;

class_<PhysicalProcess, std::shared_ptr<PhysicalProcess>, Process>(m, "PhysicalProcess")
.def(init<>())
.def(init<siren::dataclasses::ParticleType, std::shared_ptr<siren::interactions::InteractionCollection>>())
.def_property("primary_type", &Process::GetPrimaryType, &Process::SetPrimaryType)
.def_property("interactions", &Process::GetInteractions, &Process::SetInteractions)
.def_property("distributions", &PhysicalProcess::GetPhysicalDistributions, &PhysicalProcess::SetPhysicalDistributions)
;

class_<PrimaryInjectionProcess, std::shared_ptr<PrimaryInjectionProcess>, Process>(m, "PrimaryInjectionProcess")
.def(init<>())
.def(init<siren::dataclasses::ParticleType, std::shared_ptr<siren::interactions::InteractionCollection>>())
.def_property("primary_type", &Process::GetPrimaryType, &Process::SetPrimaryType)
.def_property("interactions", &Process::GetInteractions, &Process::SetInteractions)
.def_property("distributions", &PrimaryInjectionProcess::GetPrimaryInjectionDistributions, &PrimaryInjectionProcess::SetPrimaryInjectionDistributions)
;

class_<SecondaryInjectionProcess, std::shared_ptr<SecondaryInjectionProcess>, Process>(m, "SecondaryInjectionProcess")
.def(init<>())
.def(init<siren::dataclasses::ParticleType, std::shared_ptr<siren::interactions::InteractionCollection>>())
.def_property("secondary_type", &SecondaryInjectionProcess::GetSecondaryType, &SecondaryInjectionProcess::SetSecondaryType)
.def_property("interactions", &Process::GetInteractions, &Process::SetInteractions)
.def_property("distributions", &SecondaryInjectionProcess::GetSecondaryInjectionDistributions, &SecondaryInjectionProcess::SetSecondaryInjectionDistributions)
;

// Injection

Expand Down Expand Up @@ -118,15 +122,17 @@ PYBIND11_MODULE(injection,m) {
.def("NormalizedPositionProbability",&PrimaryProcessWeighter::NormalizedPositionProbability)
.def("PhysicalProbability",&PrimaryProcessWeighter::PhysicalProbability)
.def("GenerationProbability",&PrimaryProcessWeighter::GenerationProbability)
.def("EventWeight",&PrimaryProcessWeighter::EventWeight);
.def("EventWeight",&PrimaryProcessWeighter::EventWeight)
;

class_<SecondaryProcessWeighter, std::shared_ptr<SecondaryProcessWeighter>>(m, "SecondaryProcessWeighter")
.def(init<std::shared_ptr<PhysicalProcess>, std::shared_ptr<SecondaryInjectionProcess>, std::shared_ptr<siren::detector::DetectorModel>>())
.def("InteractionProbability",&SecondaryProcessWeighter::InteractionProbability)
.def("NormalizedPositionProbability",&SecondaryProcessWeighter::NormalizedPositionProbability)
.def("PhysicalProbability",&SecondaryProcessWeighter::PhysicalProbability)
.def("GenerationProbability",&SecondaryProcessWeighter::GenerationProbability)
.def("EventWeight",&SecondaryProcessWeighter::EventWeight);
.def("EventWeight",&SecondaryProcessWeighter::EventWeight)
;

class_<Weighter, std::shared_ptr<Weighter>>(m, "Weighter")
.def(init<std::vector<std::shared_ptr<Injector>>, std::shared_ptr<siren::detector::DetectorModel>, std::shared_ptr<PhysicalProcess>, std::vector<std::shared_ptr<PhysicalProcess>>>())
Expand Down

0 comments on commit f74be46

Please sign in to comment.