From 992586f3d2a834c9d85dd8dda825e49d958d2b49 Mon Sep 17 00:00:00 2001
From: Abhijit Mathad <abhijit.mathad@cern.ch>
Date: Thu, 24 Feb 2022 09:33:32 +0100
Subject: [PATCH] Rename ConfiguredMCTruthAndBkgCatAlg and ConfiguredFuntuple

---
 .../tupling/option_davinci_configFuntuple.py                | 4 ++--
 .../tupling/option_davinci_tupling_from_collections.py      | 4 ++--
 .../tupling/option_davinci_tupling_from_hlt2.py             | 4 ++--
 .../tupling/option_davinci_tupling_from_spruce_mc.py        | 4 ++--
 Phys/DaVinci/python/DaVinci/algorithms.py                   | 2 +-
 Phys/DaVinci/python/DaVinci/truth_matching.py               | 2 +-
 Phys/DaVinci/tests/config/test_algorithms.py                | 6 +++---
 7 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_configFuntuple.py b/DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_configFuntuple.py
index 4a6421691..026365d6f 100644
--- a/DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_configFuntuple.py
+++ b/DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_configFuntuple.py
@@ -45,7 +45,7 @@ variables = {
 
 
 def main():
-    from DaVinci.algorithms import ConfiguredFuntuple
+    from DaVinci.algorithms import configured_FunTuple
 
     config = {
         "location":
@@ -58,6 +58,6 @@ def main():
     }
 
     tools = []
-    algs = ConfiguredFuntuple({"B0Dspi": config})
+    algs = configured_FunTuple({"B0Dspi": config})
 
     return algs, tools
diff --git a/DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_from_collections.py b/DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_from_collections.py
index e8bc8216b..141f55abf 100644
--- a/DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_from_collections.py
+++ b/DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_from_collections.py
@@ -17,13 +17,13 @@ from FunTuple import FunctorCollection, functorcollections
 from FunTuple import FunTuple_Particles as Funtuple
 from DaVinci.algorithms import add_filter
 from DaVinci import options
-from DaVinci.truth_matching import ConfiguredMCTruthAndBkgCatAlg
+from DaVinci.truth_matching import configured_MCTruthAndBkgCatAlg
 
 d02kpi_data = make_data_with_FetchDataFromFile(
     "/Event/HLT2/Hlt2CharmD0ToKmPipLine/Particles")
 
 #get configured "MCTruthAndBkgCatAlg" algorithm for HLT2 output
-mctruth = ConfiguredMCTruthAndBkgCatAlg(inputs=d02kpi_data)
+mctruth = configured_MCTruthAndBkgCatAlg(inputs=d02kpi_data)
 
 # use functorcollections to add variables, please expand when there's new collections :)
 collections = [
diff --git a/DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_from_hlt2.py b/DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_from_hlt2.py
index 92106e144..cfb4085e7 100644
--- a/DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_from_hlt2.py
+++ b/DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_from_hlt2.py
@@ -18,7 +18,7 @@ from PyConf.application import make_data_with_FetchDataFromFile
 from DaVinci.reco_objects import make_pvs_for
 from DaVinci.algorithms import add_filter
 from DaVinci import options
-from DaVinci.truth_matching import ConfiguredMCTruthAndBkgCatAlg
+from DaVinci.truth_matching import configured_MCTruthAndBkgCatAlg
 
 fields = {
     "D0": "[D0 -> K- pi+]CC",
@@ -74,7 +74,7 @@ def main():
                            "HLT_PASS('Hlt2CharmD0ToKmPipLineDecision')")
 
     #get configured "MCTruthAndBkgCatAlg" algorithm for HLT2 output
-    mctruth = ConfiguredMCTruthAndBkgCatAlg(inputs=d02kpi_data)
+    mctruth = configured_MCTruthAndBkgCatAlg(inputs=d02kpi_data)
     #Add true ID info to each of the fields (branches)
     trueid_bkgcat_info = {
         "TRUEID":
diff --git a/DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_from_spruce_mc.py b/DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_from_spruce_mc.py
index cc22b4640..d03214468 100644
--- a/DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_from_spruce_mc.py
+++ b/DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_from_spruce_mc.py
@@ -12,7 +12,7 @@ from FunTuple import FunctorCollection
 import Functors as F
 from FunTuple import FunTuple_Particles as Funtuple
 from FunTuple.functorcollections import Kinematics
-from DaVinci.truth_matching import ConfiguredMCTruthAndBkgCatAlg
+from DaVinci.truth_matching import configured_MCTruthAndBkgCatAlg
 from DaVinci.algorithms import add_filter
 from PyConf.application import make_data_with_FetchDataFromFile
 
@@ -41,7 +41,7 @@ def main():
                            "HLT_PASS('Spruce_Test_lineDecision')")
 
     #get configured "MCTruthAndBkgCatAlg" algorithm for HLT2 output
-    mctruth = ConfiguredMCTruthAndBkgCatAlg(
+    mctruth = configured_MCTruthAndBkgCatAlg(
         inputs=B_data, root_in_tes="/Event/Spruce/HLT2")
     #Add trueid info to each of the branches
     trueid_bkgcat_info = {
diff --git a/Phys/DaVinci/python/DaVinci/algorithms.py b/Phys/DaVinci/python/DaVinci/algorithms.py
index e9a48cabf..74cc9531b 100644
--- a/Phys/DaVinci/python/DaVinci/algorithms.py
+++ b/Phys/DaVinci/python/DaVinci/algorithms.py
@@ -305,7 +305,7 @@ def get_hlt_reports(options, source=''):
     return dec_reports
 
 
-def ConfiguredFuntuple(config):
+def configured_FunTuple(config):
     """
     Function for the FunTuple configuration and instantiation of the related HDR filter.
 
diff --git a/Phys/DaVinci/python/DaVinci/truth_matching.py b/Phys/DaVinci/python/DaVinci/truth_matching.py
index e1e7fc354..0960056b7 100644
--- a/Phys/DaVinci/python/DaVinci/truth_matching.py
+++ b/Phys/DaVinci/python/DaVinci/truth_matching.py
@@ -17,7 +17,7 @@ from PyConf.Tools import BackgroundCategory, BackgroundCategoryViaRelations
 from PyConf.Tools import P2MCPFromProtoP
 
 
-def ConfiguredMCTruthAndBkgCatAlg(
+def configured_MCTruthAndBkgCatAlg(
         inputs,
         relations_locs=["Relations/ChargedPP2MCP", "Relations/NeutralPP2MCP"],
         root_in_tes="/Event/HLT2",
diff --git a/Phys/DaVinci/tests/config/test_algorithms.py b/Phys/DaVinci/tests/config/test_algorithms.py
index 4e8f0d3fd..f8fa22833 100644
--- a/Phys/DaVinci/tests/config/test_algorithms.py
+++ b/Phys/DaVinci/tests/config/test_algorithms.py
@@ -18,7 +18,7 @@ from DaVinci.optionChecker import DVImportError
 from DaVinci.algorithms import (setup_algorithms, define_fsr_writer,
                                 add_filter, apply_filters_and_unpacking,
                                 setup_user_algorithms, unpack_locations,
-                                ConfiguredFuntuple)
+                                configured_FunTuple)
 
 
 def test_import_main_options():
@@ -253,7 +253,7 @@ def test_apply_filters_and_unpack():
 
 def test_configured_funtuple():
     """
-    Check if the ConfiguredFuntuple provides a correct instance of FunTuple.
+    Check if the configured_FunTuple provides a correct instance of FunTuple.
     """
     from FunTuple.functorcollections import Kinematics
     fields = {'B0': "[B0 -> D_s- pi+]CC"}
@@ -270,6 +270,6 @@ def test_configured_funtuple():
         }
     }
 
-    test_dict = ConfiguredFuntuple(config)
+    test_dict = configured_FunTuple(config)
     assert any("FunTupleBase_Particles/Tuple_TestTuple" in alg.fullname
                for alg in test_dict["TestTuple"])
-- 
GitLab