From 020a2fa9578751ed0771e999b829fc1e3d9e2500 Mon Sep 17 00:00:00 2001 From: Christopher Dilks Date: Wed, 17 Jan 2024 15:15:55 -0500 Subject: [PATCH] fix: remove unnecessary things from test algorithms --- bind/python/iguana-example-00-basic.py | 7 ++++--- src/iguana/algorithms/clas12/EventBuilderFilter.cc | 7 ------- src/iguana/algorithms/clas12/EventBuilderFilter.h | 4 +--- src/iguana/algorithms/example/ExampleAlgorithm.cc | 4 ++-- src/iguana/algorithms/example/ExampleAlgorithm.h | 4 ++-- 5 files changed, 9 insertions(+), 17 deletions(-) diff --git a/bind/python/iguana-example-00-basic.py b/bind/python/iguana-example-00-basic.py index f5aecdfad..a0ac992d8 100755 --- a/bind/python/iguana-example-00-basic.py +++ b/bind/python/iguana-example-00-basic.py @@ -20,10 +20,11 @@ seq.Add('clas12::LorentzTransformer') seq.PrintSequence() -seq.SetOption('clas12::EventBuilderFilter', 'log', 'trace') +seq.SetOption('clas12::EventBuilderFilter', 'log', 'debug') +seq.SetOption('clas12::LorentzTransformer', 'log', 'debug') + seq.SetOption('clas12::EventBuilderFilter', 'pids', [11, 211, -211]) -seq.SetOption('clas12::EventBuilderFilter', 'testInt', 7) -seq.SetOption('clas12::EventBuilderFilter', 'testFloat', 42.3) +seq.SetOption('clas12::LorentzTransformer', 'frame', 'mirror') def prettyPrint(message, bank): print(f'{"="*30} {message} {"="*30}') diff --git a/src/iguana/algorithms/clas12/EventBuilderFilter.cc b/src/iguana/algorithms/clas12/EventBuilderFilter.cc index 77f188967..be7af3da6 100644 --- a/src/iguana/algorithms/clas12/EventBuilderFilter.cc +++ b/src/iguana/algorithms/clas12/EventBuilderFilter.cc @@ -8,12 +8,9 @@ namespace iguana::clas12 { // define options, their default values, and cache them CacheOptionToSet("pids", {11, 211}, o_pids); - CacheOption("testInt", 8, o_testInt); // TODO: remove - CacheOption("testFloat", 7.0, o_testFloat); // TODO: remove // cache expected bank indices CacheBankIndex(banks, "REC::Particle", b_particle); - CacheBankIndex(banks, "REC::Calorimeter", b_calo); // TODO: remove } @@ -22,7 +19,6 @@ namespace iguana::clas12 { // get the banks auto& particleBank = GetBank(banks, b_particle, "REC::Particle"); - // auto& caloBank = GetBank(banks, b_calo, "REC::Calorimeter"); // TODO: remove // dump the bank ShowBank(particleBank, Logger::Header("INPUT PARTICLES")); @@ -47,9 +43,6 @@ namespace iguana::clas12 { void EventBuilderFilter::Stop() { - m_log->Info("test info"); - m_log->Warn("test warn"); - m_log->Error("test error"); } } diff --git a/src/iguana/algorithms/clas12/EventBuilderFilter.h b/src/iguana/algorithms/clas12/EventBuilderFilter.h index 11b8f9955..9abe577d0 100644 --- a/src/iguana/algorithms/clas12/EventBuilderFilter.h +++ b/src/iguana/algorithms/clas12/EventBuilderFilter.h @@ -23,12 +23,10 @@ namespace iguana::clas12 { private: /// `hipo::banklist` index for the particle bank - hipo::banklist::size_type b_particle, b_calo; // TODO: remove calorimeter + hipo::banklist::size_type b_particle; /// Configuration options std::set o_pids; - int o_testInt; // TODO: remove - double o_testFloat; // TODO: remove }; diff --git a/src/iguana/algorithms/example/ExampleAlgorithm.cc b/src/iguana/algorithms/example/ExampleAlgorithm.cc index 2fe511f88..fc90a1e50 100644 --- a/src/iguana/algorithms/example/ExampleAlgorithm.cc +++ b/src/iguana/algorithms/example/ExampleAlgorithm.cc @@ -28,8 +28,8 @@ namespace iguana::example { //# - this function "caches" the option values into the `o_*` members, to //# avoid looking them up in the `Algorithm::Run` method //############################################################################ - CacheOption("testInt", 8, o_testInt); - CacheOption("testFloat", 7.0, o_testFloat); + CacheOption("exampleInt", 8, o_exampleInt); + CacheOption("exampleFloat", 7.0, o_exampleFloat); //############################################################################ //# cache expected bank indices //# - here we make sure that parameter `banks` includes the banks that are diff --git a/src/iguana/algorithms/example/ExampleAlgorithm.h b/src/iguana/algorithms/example/ExampleAlgorithm.h index 279b75b84..a4124729e 100644 --- a/src/iguana/algorithms/example/ExampleAlgorithm.h +++ b/src/iguana/algorithms/example/ExampleAlgorithm.h @@ -97,9 +97,9 @@ namespace iguana::example { //# - convention: they should start with `o_` //############################################################################ /// Example integer configuration option - int o_testInt; + int o_exampleInt; /// Example float configuration option - double o_testFloat; + double o_exampleFloat; };