diff --git a/DaVinciExamples/python/DaVinciExamples/debugging/example-PrintDecayTree.py b/DaVinciExamples/python/DaVinciExamples/debugging/example-PrintDecayTree.py
index 7b9d4f011294d7d99bd554751c3424e85ad09727..f5f079a0bb8bea25e10fcda86e07473be517e408 100644
--- a/DaVinciExamples/python/DaVinciExamples/debugging/example-PrintDecayTree.py
+++ b/DaVinciExamples/python/DaVinciExamples/debugging/example-PrintDecayTree.py
@@ -28,7 +28,6 @@ options.set_input_and_conds_from_testfiledb("Upgrade_Bd2KstarMuMu")
 options.evt_max = 100
 options.print_freq = 1
 options.msg_svc_format = "% F%40W%S%7W%R%T %0W%M"
-options.process = 'Spruce'
 
 jpsis = make_std_loose_jpsi2mumu()
 
diff --git a/DaVinciExamples/python/DaVinciExamples/tupling/example-tupling-AllFunctors.py b/DaVinciExamples/python/DaVinciExamples/tupling/example-tupling-AllFunctors.py
index fcdce27adf831f9d0eb787f42752c52b46545ed3..be20124479e95f0fb07e863cab0aed23b30c7018 100644
--- a/DaVinciExamples/python/DaVinciExamples/tupling/example-tupling-AllFunctors.py
+++ b/DaVinciExamples/python/DaVinciExamples/tupling/example-tupling-AllFunctors.py
@@ -12,7 +12,7 @@
 Example of a DaVinci job filling all available functors. This is obviously a stress test and not realistic.
 
  This example is meant to be run with
-    $ ./run davinci run-mc --inputfiledb Spruce_all_lines_dst Phys/DaVinci/options/DaVinciDB-Example.yaml --joboptfile DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_from_spruce.yaml --user_algorithms  DaVinciExamples/python/DaVinciExamples/tupling/example-tupling-AllFunctors:alg_config --evt_max 100 |& cat | tee log
+    $ ./run davinci --inputfiledb Spruce_all_lines_dst Phys/DaVinci/options/DaVinciDB-Example.yaml --joboptfile DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_from_spruce.yaml --user_algorithms  DaVinciExamples/python/DaVinciExamples/tupling/example-tupling-AllFunctors:alg_config --evt_max 100 |& cat | tee log
 """
 __author__ = "P. Koppenburg"
 __date__ = "2021-11-23"
diff --git a/DaVinciExamples/python/DaVinciExamples/tupling/example-tupling-DTF-filtered.yaml b/DaVinciExamples/python/DaVinciExamples/tupling/example-tupling-DTF-filtered.yaml
index be2a9426b04820d07335fefd4488ea6bde935ade..f2db4c9a404998aae4ed75e88ec29ae586d3dd35 100644
--- a/DaVinciExamples/python/DaVinciExamples/tupling/example-tupling-DTF-filtered.yaml
+++ b/DaVinciExamples/python/DaVinciExamples/tupling/example-tupling-DTF-filtered.yaml
@@ -13,4 +13,3 @@ annsvc_config: 'root://eoslhcb.cern.ch//eos/lhcb/wg/dpa/wp3/tests/spruce_all_lin
 evt_max: 10
 histo_file: 'DV-example-tupling-DTF-his-filtered.root'
 ntuple_file: 'DV-example-tupling-DTF-ntp-filtered.root'
-process: 'Spruce'
diff --git a/DaVinciExamples/python/DaVinciExamples/tupling/example-tupling-DTF-run-mc.py b/DaVinciExamples/python/DaVinciExamples/tupling/example-tupling-DTF-run-mc.py
index 2c45b7af62f04236fc57ce1ef3ed3b1c1faa703a..a4a004115cec912ca5d48ea543963689cebfc1c4 100644
--- a/DaVinciExamples/python/DaVinciExamples/tupling/example-tupling-DTF-run-mc.py
+++ b/DaVinciExamples/python/DaVinciExamples/tupling/example-tupling-DTF-run-mc.py
@@ -15,7 +15,7 @@ Example of a typical DaVinci job:
  - runs DecayTreeFitterAlg and stores some output
 
  This example is meant to be run with
-    $ ./run davinci run-mc --inputfiledb Upgrade_Bd2KstarMuMu_ldst Phys/DaVinci/options/DaVinciDB-Example.yaml --joboptfile DaVinciExamples/python/DaVinciExamples/tupling/example-tupling-DTF-run-mc.yaml --user_algorithms DaVinciExamples/python/DaVinciExamples/tupling/example-tupling-DTF-run-mc:main --evt_max -1 |& cat | tee log
+    $ ./run davinci --inputfiledb Upgrade_Bd2KstarMuMu_ldst Phys/DaVinci/options/DaVinciDB-Example.yaml --joboptfile DaVinciExamples/python/DaVinciExamples/tupling/example-tupling-DTF-run-mc.yaml --user_algorithms DaVinciExamples/python/DaVinciExamples/tupling/example-tupling-DTF-run-mc:main --evt_max -1 |& cat | tee log
 
 """
 
diff --git a/DaVinciExamples/python/DaVinciExamples/tupling/example-tupling-DTF-run-mc.yaml b/DaVinciExamples/python/DaVinciExamples/tupling/example-tupling-DTF-run-mc.yaml
index 91273a557f262971e19e8c7bc4d5904907d7506c..9cb56ee07f8932b1f3cf832296b407583f7cb183 100644
--- a/DaVinciExamples/python/DaVinciExamples/tupling/example-tupling-DTF-run-mc.yaml
+++ b/DaVinciExamples/python/DaVinciExamples/tupling/example-tupling-DTF-run-mc.yaml
@@ -13,6 +13,5 @@ enable_unpack: False
 evt_max: 10
 histo_file: 'DV-example-tupling-DTF-his.root'
 input_raw_format: 4.3
-lumi: False
 ntuple_file: 'DV-example-tupling-DTF-ntp.root'
 process: 'Turbo'
diff --git a/DaVinciExamples/python/DaVinciExamples/tupling/example-tupling-advanced-run-mc.py b/DaVinciExamples/python/DaVinciExamples/tupling/example-tupling-advanced-run-mc.py
index 5c92a6675292f5931936fe4173cfbff16e971ce5..4a2d3a2b383528b989db450565054fd0fb75bfe3 100644
--- a/DaVinciExamples/python/DaVinciExamples/tupling/example-tupling-advanced-run-mc.py
+++ b/DaVinciExamples/python/DaVinciExamples/tupling/example-tupling-advanced-run-mc.py
@@ -14,7 +14,7 @@ Example of a typical DaVinci job:
  - tuple of the selected candidates
 
  This example is meant to be run with
-    $ ./run davinci run-mc --inputfiledb Upgrade_Bd2KstarMuMu_ldst ./DaVinciExamples/test/options/DaVinciDB-Example.yaml --user_algorithms example-tupling-advanced-run-mc:main
+    $ ./run davinci --inputfiledb Upgrade_Bd2KstarMuMu_ldst ./DaVinciExamples/test/options/DaVinciDB-Example.yaml --user_algorithms example-tupling-advanced-run-mc:main
 """
 
 __author__ = "Davide Fazzini, Abhijit Mathad"
@@ -111,7 +111,6 @@ def main():
     options.ntuple_file = 'DV-example-tupling-advanced-ntp.root'
     options.histo_file = 'DV-example-tupling-advanced-his.root'
     options.input_raw_format = 4.3
-    options.lumi = False
     options.enable_unpack = False
 
     tools = []
diff --git a/DaVinciExamples/python/DaVinciExamples/tupling/example-tupling-basic-run-mc.py b/DaVinciExamples/python/DaVinciExamples/tupling/example-tupling-basic-run-mc.py
index a67b5cfcf966cc64bc68240fbe647ee646b08e65..6d69a913edd8e615230475fe791e7a826929e8b3 100644
--- a/DaVinciExamples/python/DaVinciExamples/tupling/example-tupling-basic-run-mc.py
+++ b/DaVinciExamples/python/DaVinciExamples/tupling/example-tupling-basic-run-mc.py
@@ -14,7 +14,7 @@ Example of a typical DaVinci job:
  - tuple of the selected candidates
 
  This example is meant to be run with
-    $ ./run davinci run-mc --simplejob --inputfiledb Upgrade_Bd2KstarMuMu --joboptfile example-tupling-basic.yaml --user_algorithms example-tupling-basic-run-mc:main
+    $ ./run davinci --simplejob --inputfiledb Upgrade_Bd2KstarMuMu --joboptfile example-tupling-basic.yaml --user_algorithms example-tupling-basic-run-mc:main
 """
 
 __author__ = "Maurizio Martinelli, Abhijit Mathad"
diff --git a/DaVinciExamples/python/DaVinciExamples/tupling/example-tupling-basic-run-mc.yaml b/DaVinciExamples/python/DaVinciExamples/tupling/example-tupling-basic-run-mc.yaml
index 07f4a4071ac07c0eec0bafa8922e7c1b0a935a16..6963a2417212cc1f30da933f1819f29a272acce0 100644
--- a/DaVinciExamples/python/DaVinciExamples/tupling/example-tupling-basic-run-mc.yaml
+++ b/DaVinciExamples/python/DaVinciExamples/tupling/example-tupling-basic-run-mc.yaml
@@ -13,6 +13,5 @@ enable_unpack: False
 evt_max: 10
 histo_file: 'DV-example-tupling-basic-his-run-mc.root'
 input_raw_format: 4.3
-lumi: False
 ntuple_file: 'DV-example-tupling-basic-ntp-run-mc.root'
 process: 'Turbo'
diff --git a/DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_from_collections.yaml b/DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_from_collections.yaml
index d549724914b41761dbb84873a0ecad3c97ff730b..711bdd1501524e9c43d9b16c572fd03113ff78c0 100644
--- a/DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_from_collections.yaml
+++ b/DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_from_collections.yaml
@@ -10,12 +10,7 @@
 ###############################################################################
 
 annsvc_config: 'root://eoslhcb.cern.ch//eos/lhcb/wg/dpa/wp3/NovemberFEST/hlt2_D0_Kpi_10evts_newPacking.tck.json'
-evt_max: -1
 histo_file: 'tuple_D0_Kpi_10evts_collections.root'
-input_raw_format: 0.3
-lumi: false
 ntuple_file: 'tuple_D0_Kpi_10evts_collections.root'
 print_freq: 1
-skip_events: 0
 process: 'Hlt2'
-stream: 'default'
\ No newline at end of file
diff --git a/DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_from_hlt2.yaml b/DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_from_hlt2.yaml
index 66c620cfc7080ef41f280fd794c3d549d1b2c924..4a51b2b7c457c7e61be9fef2ec4845f8667e4354 100644
--- a/DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_from_hlt2.yaml
+++ b/DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_from_hlt2.yaml
@@ -10,10 +10,7 @@
 ###############################################################################
 
 annsvc_config: 'root://eoslhcb.cern.ch//eos/lhcb/wg/dpa/wp3/NovemberFEST/hlt2_D0_Kpi_10evts_newPacking.tck.json'
-evt_max: -1
 histo_file: 'tuple_D0_Kpi_10evts_fromHlt2.root'
-lumi: false
 ntuple_file: 'tuple_D0_Kpi_10evts_fromHlt2.root'
 print_freq: 1
 process: 'Hlt2'
-stream: 'default'
\ No newline at end of file
diff --git a/DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_from_hlt2_gaudirun.py b/DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_from_hlt2_gaudirun.py
index 2db3f0ab0ea21745bbfd89a692c6b0192136689e..c35bee677faad1179a407a3e0faa0b7d350cd8ab 100644
--- a/DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_from_hlt2_gaudirun.py
+++ b/DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_from_hlt2_gaudirun.py
@@ -67,11 +67,8 @@ def main():
 
 options.ntuple_file = "tuple_D0_Kpi_10evts_gaudirun.root"
 options.annsvc_config = "root://eoslhcb.cern.ch//eos/lhcb/wg/dpa/wp3/NovemberFEST/hlt2_D0_Kpi_10evts_newPacking.tck.json"
-options.process = 'Hlt2'
-options.input_raw_format = 0.3
 options.user_algorithms = "$DAVINCIEXAMPLESROOT/python/DaVinciExamples/tupling/option_davinci_tupling_from_hlt2_gaudirun:main"
 options.write_fsr = False
-options.enable_unpack = True
 fileDB_key = "FEST_November_2021_dst_newPacking"
 fileDB_path = "$DAVINCIROOT/options/DaVinciDB-Example.yaml"
 
diff --git a/DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_from_spruce.yaml b/DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_from_spruce.yaml
index 9182bce43f3666b078eb862073664c9bb5aaa8ea..26329f14b80a740e1e94d512aae320ebe63337a8 100644
--- a/DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_from_spruce.yaml
+++ b/DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_from_spruce.yaml
@@ -10,12 +10,6 @@
 ###############################################################################
 
 annsvc_config: 'root://eoslhcb.cern.ch//eos/lhcb/wg/dpa/wp3/tests/spruce_all_lines_realtime_newPacking.tck.json'
-evt_max: -1
 histo_file: 'sprucing_histos.root'
-input_raw_format: 0.3
-lumi: false
 ntuple_file: 'sprucing_tuple.root'
-print_freq: 1
-skip_events: 0
-process: 'Spruce'
-stream: 'default'
\ No newline at end of file
+print_freq: 1
\ No newline at end of file
diff --git a/DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_from_spruce_mc.yaml b/DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_from_spruce_mc.yaml
index bc4fe130987a436f789f5496b93f131df2593ea0..fd4ebf990174d28f473611c63cd49543ab996721 100644
--- a/DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_from_spruce_mc.yaml
+++ b/DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_from_spruce_mc.yaml
@@ -10,12 +10,6 @@
 ###############################################################################
 
 annsvc_config: 'root://eoslhcb.cern.ch//eos/lhcb/wg/dpa/wp3/tests/spruce_example_realtime_dstinput.tck.json'
-evt_max: -1
 histo_file: 'sprucing_mc_histos.root'
-input_raw_format: 0.3
-lumi: false
 ntuple_file: 'sprucing_mc_tuple.root'
-print_freq: 1
-skip_events: 0
-process: 'Spruce'
-stream: 'default'
\ No newline at end of file
+print_freq: 1
\ No newline at end of file
diff --git a/DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_from_xgen.py b/DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_from_xgen.py
index b24c9f342fa83bca23b1c389490e101a0eb4eed7..c62ba4f6bd11298893fa674e7df44a2dbd8f3034 100644
--- a/DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_from_xgen.py
+++ b/DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_from_xgen.py
@@ -12,7 +12,7 @@
 Read and process a .xgen file with the new DaVinci configuration.
 
 This is run as 
-./run davinci run-mc --user_algorithms DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_from_xgen:main
+./run davinci --user_algorithms DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_from_xgen:main
 
 To test with another xgen file, copy the options above, edit the list of files below (can be local files) and make sure you adapt the database tags. 
 Then specify the decay descriptors.
diff --git a/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_configFuntuple.qmt b/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_configFuntuple.qmt
index fbfb35697b2c8568d97bfb17d7a503b12bf16128..ae2ed020a73e907594205dd06d7e4126c1b256d4 100644
--- a/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_configFuntuple.qmt
+++ b/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_configFuntuple.qmt
@@ -29,7 +29,6 @@
   <argument name="program"><text>davinci</text></argument>
   <argument name="timeout"><integer>1000</integer></argument>
   <argument name="args"><set>
-  <text>run-mc</text>
   <text>--inputfiledb</text>
   <text>Spruce_all_lines_dst</text>
   <text>$DAVINCIROOT/options/DaVinciDB-Example.yaml</text>
diff --git a/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_All.qmt b/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_All.qmt
index b6e8c6e9d949c3b12171dbfb46f50372c38158ca..80a9a0224484b3b1ca59c8ae975e5a9237c48834 100755
--- a/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_All.qmt
+++ b/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_All.qmt
@@ -25,7 +25,6 @@
   <argument name="program"><text>davinci</text></argument>
   <argument name="timeout"><integer>1000</integer></argument>
   <argument name="args"><set>
-  <text>run-mc</text>
   <text>--inputfiledb</text>
   <text>Spruce_all_lines_dst</text>
   <text>$DAVINCIROOT/options/DaVinciDB-Example.yaml</text>
diff --git a/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_DTF.qmt b/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_DTF.qmt
index 41d45881c81d717434a64b7e06fe499461b4ca07..4b59cd2c592a919f71de7a69bea5bce034eb4dab 100755
--- a/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_DTF.qmt
+++ b/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_DTF.qmt
@@ -27,7 +27,6 @@
 <extension class="GaudiTest.GaudiExeTest" kind="test">
   <argument name="program"><text>davinci</text></argument>
   <argument name="args"><set>
-  <text>run-mc</text>
   <text>--inputfiledb</text>
   <text>Upgrade_Bd2KstarMuMu_ldst</text>
   <text>$DAVINCIROOT/options/DaVinciDB-Example.yaml</text>
diff --git a/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_DTF_filtered.qmt b/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_DTF_filtered.qmt
index e52b37883c6a17c95741fd7326a10f39e67218e3..72510ba6cf5246719175d8090d6d3331f1a752cd 100755
--- a/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_DTF_filtered.qmt
+++ b/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_DTF_filtered.qmt
@@ -27,7 +27,6 @@
 <extension class="GaudiTest.GaudiExeTest" kind="test">
   <argument name="program"><text>davinci</text></argument>
   <argument name="args"><set>
-  <text>run-mc</text>
   <text>--inputfiledb</text>
   <text>Spruce_all_lines_dst</text>
   <text>$DAVINCIROOT/options/DaVinciDB-Example.yaml</text>
diff --git a/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_advanced.qmt b/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_advanced.qmt
index 9a3a2662bf47dfd33500a1adb6d97de2115d4b2b..b9a62963f59b8d04d5ab759871248cce783ccc51 100755
--- a/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_advanced.qmt
+++ b/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_advanced.qmt
@@ -26,7 +26,6 @@
 <extension class="GaudiTest.GaudiExeTest" kind="test">
   <argument name="program"><text>davinci</text></argument>
   <argument name="args"><set>
-  <text>run-mc</text>
   <text>--inputfiledb</text>
   <text>Upgrade_Bd2KstarMuMu_ldst</text>
   <text>$DAVINCIROOT/options/DaVinciDB-Example.yaml</text>
diff --git a/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_array_taggers.qmt b/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_array_taggers.qmt
index e997754531468902a17f9126b9daa88f7be5fc04..f0bd0bc1b29888e9dc0103e8b4c06339f0ce7218 100644
--- a/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_array_taggers.qmt
+++ b/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_array_taggers.qmt
@@ -26,7 +26,6 @@
 <extension class="GaudiTest.GaudiExeTest" kind="test">
   <argument name="program"><text>davinci</text></argument>
   <argument name="args"><set>
-  <text>run-mc</text>
   <text>--inputfiledb</text>
   <text>Spruce_all_lines_dst</text>
   <text>$DAVINCIROOT/options/DaVinciDB-Example.yaml</text>
diff --git a/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_from_collections.qmt b/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_from_collections.qmt
index 6f7d6d798278a29bbcd2750ea1449f8a86e83970..974337a475dc7d8b07479f04578b6011359aa29b 100644
--- a/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_from_collections.qmt
+++ b/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_from_collections.qmt
@@ -26,7 +26,6 @@
 <extension class="GaudiTest.GaudiExeTest" kind="test">
   <argument name="program"><text>davinci</text></argument>
   <argument name="args"><set>
-  <text>run-mc</text>
   <text>--inputfiledb</text>
   <text>FEST_November_2021_dst_newPacking</text>
   <text>$DAVINCIROOT/options/DaVinciDB-Example.yaml</text>
@@ -35,4 +34,4 @@
   <text>--user_algorithms</text>
   <text>../../python/DaVinciExamples/tupling/option_davinci_tupling_from_collections:main</text>
   </set></argument>
-</extension>
\ No newline at end of file
+</extension>
diff --git a/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_from_hlt2.qmt b/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_from_hlt2.qmt
index edffbbffce6a8dc46d7ec095dc3c5fe4367aaba0..7fee3440abb515536617b41b753dd2e6dd2d9b7d 100644
--- a/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_from_hlt2.qmt
+++ b/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_from_hlt2.qmt
@@ -26,7 +26,6 @@
 <extension class="GaudiTest.GaudiExeTest" kind="test">
   <argument name="program"><text>davinci</text></argument>
   <argument name="args"><set>
-  <text>run-mc</text>
   <text>--inputfiledb</text>
   <text>FEST_November_2021_dst_newPacking</text>
   <text>$DAVINCIROOT/options/DaVinciDB-Example.yaml</text>
diff --git a/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_from_passthrough.qmt b/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_from_passthrough.qmt
index 6861c6c0b466cad894f10affd55973a43fd24c98..039510a894d447f9239427a6d7b7da1bac6df515 100644
--- a/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_from_passthrough.qmt
+++ b/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_from_passthrough.qmt
@@ -28,7 +28,6 @@
   <argument name="program"><text>davinci</text></argument>
   <argument name="timeout"><integer>1000</integer></argument>
   <argument name="args"><set>
-  <text>run-mc</text>
   <text>-i</text>
   <text>test_passthrough_thor_lines</text>
   <text>$DAVINCIROOT/options/DaVinciDB-Example.yaml</text>
diff --git a/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_from_spruce.qmt b/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_from_spruce.qmt
index af29c24987e6890cead041f627635ca998d2c665..acb6850e01e9a81d4fd48fc75952ad85becb9a16 100644
--- a/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_from_spruce.qmt
+++ b/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_from_spruce.qmt
@@ -28,7 +28,6 @@
   <argument name="program"><text>davinci</text></argument>
   <argument name="timeout"><integer>1000</integer></argument>
   <argument name="args"><set>
-  <text>run-mc</text>
   <text>--inputfiledb</text>
   <text>Spruce_all_lines_dst</text>
   <text>$DAVINCIROOT/options/DaVinciDB-Example.yaml</text>
diff --git a/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_from_spruce_mc.qmt b/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_from_spruce_mc.qmt
index 31f749e1c4df30d7484e6db74b4ec6c4da715375..979e955ceee386cf400c5e77a7e10fe6dae7ecdf 100644
--- a/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_from_spruce_mc.qmt
+++ b/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_from_spruce_mc.qmt
@@ -27,7 +27,6 @@
 <extension class="GaudiTest.GaudiExeTest" kind="test">
   <argument name="program"><text>davinci</text></argument>
   <argument name="args"><set>
-  <text>run-mc</text>
   <text>--inputfiledb</text>
   <text>test_spruce_MCtools</text>
   <text>$DAVINCIROOT/options/DaVinciDB-Example.yaml</text>
diff --git a/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_from_xgen.qmt b/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_from_xgen.qmt
index 3b174dd9121451641c913d58aca7ac8f0c399bca..d8bc1864b0fe7fac7db8ffbd77a483bbcb7f9d93 100644
--- a/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_from_xgen.qmt
+++ b/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_from_xgen.qmt
@@ -27,7 +27,6 @@
   <argument name="program"><text>davinci</text></argument>
   <argument name="timeout"><integer>600</integer></argument>
   <argument name="args"><set>
-  <text>run-mc</text>
   <text>--user_algorithms</text>
   <text>../../python/DaVinciExamples/tupling/option_davinci_tupling_from_xgen:main</text>
   </set></argument>
diff --git a/DaVinciExamples/tests/qmtest/tupling.qms/test_example-tupling-basic-run-mc.qmt b/DaVinciExamples/tests/qmtest/tupling.qms/test_example-tupling-basic-run-mc.qmt
index e2d92259798cb8755f9782c354ab269ccb1e8626..07ff4235ae76164270a9f4e81e2e9d592945f6b9 100755
--- a/DaVinciExamples/tests/qmtest/tupling.qms/test_example-tupling-basic-run-mc.qmt
+++ b/DaVinciExamples/tests/qmtest/tupling.qms/test_example-tupling-basic-run-mc.qmt
@@ -27,7 +27,6 @@
 <extension class="GaudiTest.GaudiExeTest" kind="test">
   <argument name="program"><text>davinci</text></argument>
   <argument name="args"><set>
-  <text>run-mc</text>
   <text>--inputfiledb</text>
   <text>Upgrade_Bd2KstarMuMu_ldst</text>
   <text>$DAVINCIROOT/options/DaVinciDB-Example.yaml</text>
diff --git a/DaVinciExamples/tests/refs/test_davinci_configFuntuple.ref b/DaVinciExamples/tests/refs/test_davinci_configFuntuple.ref
index 05fa75f6974590f377e900b8532e1aecf64c975f..0b6fc469c1b29f7d048446a0bb1c4f71ae8aec88 100644
--- a/DaVinciExamples/tests/refs/test_davinci_configFuntuple.ref
+++ b/DaVinciExamples/tests/refs/test_davinci_configFuntuple.ref
@@ -1,4 +1,3 @@
-INFO No MainOptions specified. DaVinci will import no options file!
 INFO User algorithm option_davinci_configFuntuple.main imported successfully!
 ApplicationMgr    SUCCESS
 ====================================================================================================================================
diff --git a/DaVinciExamples/tests/refs/test_davinci_tupling-DTF-filtered.ref b/DaVinciExamples/tests/refs/test_davinci_tupling-DTF-filtered.ref
index 610a8b72911a9197a0be6fac22b22ef4c1321239..507645d7abf31ab492dae5a5e2652a89e672e755 100644
--- a/DaVinciExamples/tests/refs/test_davinci_tupling-DTF-filtered.ref
+++ b/DaVinciExamples/tests/refs/test_davinci_tupling-DTF-filtered.ref
@@ -1,4 +1,3 @@
-INFO No MainOptions specified. DaVinci will import no options file!
 INFO User algorithm example-tupling-DTF-filtered.main imported successfully!
 ApplicationMgr    SUCCESS
 ====================================================================================================================================
diff --git a/DaVinciExamples/tests/refs/test_davinci_tupling-basic-run-mc.ref b/DaVinciExamples/tests/refs/test_davinci_tupling-basic-run-mc.ref
index f97ea6a903ad9937acc5c29403587d2ba193edbe..21af895ba936fc8afe7ccac449c3dfa60edb2a49 100644
--- a/DaVinciExamples/tests/refs/test_davinci_tupling-basic-run-mc.ref
+++ b/DaVinciExamples/tests/refs/test_davinci_tupling-basic-run-mc.ref
@@ -1,4 +1,3 @@
-INFO No MainOptions specified. DaVinci will import no options file!
 INFO User algorithm example-tupling-basic-run-mc.main imported successfully!
 ApplicationMgr    SUCCESS
 ====================================================================================================================================
@@ -52,37 +51,37 @@ ApplicationMgr                         INFO Application Manager Finalized succes
 ApplicationMgr                         INFO Application Manager Terminated successfully
 CombineParticles                       INFO Number of counters : 11
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
- | "# FunctionalParticleMaker/Particles"           |        10 |       1106 |     110.60 |     43.140 |      33.000 |      158.00 |
+ | "# FunctionalParticleMaker/Particles"           |        10 |       1059 |     105.90 |     35.946 |      38.000 |      178.00 |
  | "# J/psi(1S) -> mu+  mu+ "                      |        10 |          0 |      0.0000 |      0.0000 |       0.0000 |       0.0000 |
- | "# J/psi(1S) -> mu+  mu- "                      |        10 |          3 |    0.30000 |    0.45826 |       0.0000 |      1.0000 |
+ | "# J/psi(1S) -> mu+  mu- "                      |        10 |          6 |    0.60000 |    0.48990 |       0.0000 |      1.0000 |
  | "# J/psi(1S) -> mu-  mu- "                      |        10 |          0 |      0.0000 |      0.0000 |       0.0000 |       0.0000 |
- | "# input particles"                             |        10 |       1106 |     110.60 |     43.140 |      33.000 |      158.00 |
- | "# mu+"                                         |        10 |          5 |    0.50000 |    0.50000 |       0.0000 |      1.0000 |
- | "# mu-"                                         |        10 |          6 |    0.60000 |    0.48990 |       0.0000 |      1.0000 |
- | "# selected"                                    |        10 |          3 |    0.30000 |
- |*"#accept"                                       |        10 |          3 |( 30.00000 +- 14.49138)% |
- | "#pass combcut"                                 |         3 |          3 |     1.0000 |
- | "#pass mother cut"                              |         3 |          3 |     1.0000 |
+ | "# input particles"                             |        10 |       1059 |     105.90 |     35.946 |      38.000 |      178.00 |
+ | "# mu+"                                         |        10 |          7 |    0.70000 |    0.45826 |       0.0000 |      1.0000 |
+ | "# mu-"                                         |        10 |          7 |    0.70000 |    0.45826 |       0.0000 |      1.0000 |
+ | "# selected"                                    |        10 |          6 |    0.60000 |
+ |*"#accept"                                       |        10 |          6 |( 60.00000 +- 15.49193)% |
+ | "#pass combcut"                                 |         6 |          6 |     1.0000 |
+ | "#pass mother cut"                              |         6 |          6 |     1.0000 |
 DimuonsTuple                           INFO Number of counters : 5
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
- | "# events without candidate for field Jpsi"     |         7 |
- | "# events without candidate for field MuPlus"   |         7 |
- | "# non-empty events for field Jpsi"             |         3 |
- | "# non-empty events for field MuPlus"           |         3 |
+ | "# events without candidate for field Jpsi"     |         4 |
+ | "# events without candidate for field MuPlus"   |         4 |
+ | "# non-empty events for field Jpsi"             |         6 |
+ | "# non-empty events for field MuPlus"           |         6 |
  | "# processed events"                            |        10 |
 FunctionalParticleMaker                INFO Number of counters : 4
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
- |*"# passed ProtoParticle filter"                 |      1106 |       1106 |( 100.0000 +-  0.000000)% |
- |*"# passed Track filter"                         |      1667 |       1106 |( 66.34673 +- 1.157326)% |
- | "Nb created anti-particles"                     |        10 |        570 |     57.000 |     25.072 |      11.000 |      93.000 |
- | "Nb created particles"                          |        10 |        536 |     53.600 |     19.643 |      22.000 |      77.000 |
+ |*"# passed ProtoParticle filter"                 |      1059 |       1059 |( 100.0000 +-  0.000000)% |
+ |*"# passed Track filter"                         |      1579 |       1059 |( 67.06776 +- 1.182705)% |
+ | "Nb created anti-particles"                     |        10 |        524 |     52.400 |     19.541 |      17.000 |      90.000 |
+ | "Nb created particles"                          |        10 |        535 |     53.500 |     16.771 |      21.000 |      88.000 |
 ToolSvc.HybridFactory                  INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "# loaded from PYTHON"                          |        11 |
 ToolSvc.LoKi::VertexFitter             INFO Number of counters : 2
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
- | "#iterations/1"                                 |         3 |          3 |     1.0000 |      0.0000 |      1.0000 |      1.0000 |
- | "#iterations/Opt"                               |         3 |          0 |      0.0000 |      0.0000 |       0.0000 |       0.0000 |
+ | "#iterations/1"                                 |         6 |          6 |     1.0000 |      0.0000 |      1.0000 |      1.0000 |
+ | "#iterations/Opt"                               |         6 |          0 |      0.0000 |      0.0000 |       0.0000 |       0.0000 |
 ToolSvc.PPFactoryHybridFactory         INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "# loaded from PYTHON"                          |         1 |
@@ -91,7 +90,7 @@ ToolSvc.TrackFunctorFactory            INFO Number of counters : 1
  | "# loaded from PYTHON"                          |         1 |
 UnpackBestTracks                       INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
- | "# Unpacked Tracks"                             |        10 |       4332 |     433.20 |
+ | "# Unpacked Tracks"                             |        10 |       4101 |     410.10 |
 UnpackMuonPIDs                         INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
- | "# UnPackedData"                                |        10 |       1088 |     108.80 |     43.990 |      33.000 |      159.00 |
+ | "# UnPackedData"                                |        10 |       1061 |     106.10 |     33.285 |      43.000 |      169.00 |
diff --git a/DaVinciExamples/tests/refs/test_davinci_tupling_array_taggers.ref b/DaVinciExamples/tests/refs/test_davinci_tupling_array_taggers.ref
index 6a454e609d39eecbe839025e16080d6616a31d6a..cebefde86ccc817a63169bd6368fab5039b8285e 100644
--- a/DaVinciExamples/tests/refs/test_davinci_tupling_array_taggers.ref
+++ b/DaVinciExamples/tests/refs/test_davinci_tupling_array_taggers.ref
@@ -1,4 +1,3 @@
-INFO No MainOptions specified. DaVinci will import no options file!
 INFO User algorithm option_davinci_tupling_array_taggers.main imported successfully!
 ApplicationMgr    SUCCESS
 ====================================================================================================================================
diff --git a/DaVinciExamples/tests/refs/test_davinci_tupling_from_hlt2.ref b/DaVinciExamples/tests/refs/test_davinci_tupling_from_hlt2.ref
index 560c2be7473e676c96ab5670fd20cce7e1595b74..babdf35e7b51c6bc99a81bfefd9d20d1c1a34614 100644
--- a/DaVinciExamples/tests/refs/test_davinci_tupling_from_hlt2.ref
+++ b/DaVinciExamples/tests/refs/test_davinci_tupling_from_hlt2.ref
@@ -1,4 +1,3 @@
-INFO No MainOptions specified. DaVinci will import no options file!
 INFO User algorithm option_davinci_tupling_from_hlt2.main imported successfully!
 ApplicationMgr    SUCCESS
 ====================================================================================================================================
diff --git a/DaVinciExamples/tests/refs/test_davinci_tupling_from_hlt2_gaudirun.ref b/DaVinciExamples/tests/refs/test_davinci_tupling_from_hlt2_gaudirun.ref
index 0b8529b93deb09866b39cfce0465f7bb74a39bad..a65ce3606687858d05f543f875d56e0c8466864c 100644
--- a/DaVinciExamples/tests/refs/test_davinci_tupling_from_hlt2_gaudirun.ref
+++ b/DaVinciExamples/tests/refs/test_davinci_tupling_from_hlt2_gaudirun.ref
@@ -1,5 +1,3 @@
-INFO No MainOptions specified. DaVinci will import no options file!
-INFO No MainOptions specified. DaVinci will import no options file!
 INFO User algorithm option_davinci_tupling_from_hlt2_gaudirun.main imported successfully!
 INFO User algorithm option_davinci_tupling_from_hlt2_gaudirun.main imported successfully!
 ApplicationMgr    SUCCESS
diff --git a/DaVinciExamples/tests/refs/test_davinci_tupling_from_passthrough.ref b/DaVinciExamples/tests/refs/test_davinci_tupling_from_passthrough.ref
index 4c318f6e54eabfcd3bc49ced655ba7460a4b19ad..3b28dff103998e5ddefb3998601b1c24e60be77b 100644
--- a/DaVinciExamples/tests/refs/test_davinci_tupling_from_passthrough.ref
+++ b/DaVinciExamples/tests/refs/test_davinci_tupling_from_passthrough.ref
@@ -1,4 +1,3 @@
-INFO No MainOptions specified. DaVinci will import no options file!
 INFO User algorithm option_davinci_tupling_from_passthrough.main imported successfully!
 ApplicationMgr    SUCCESS
 ====================================================================================================================================
diff --git a/DaVinciExamples/tests/refs/test_davinci_tupling_from_spruce.ref b/DaVinciExamples/tests/refs/test_davinci_tupling_from_spruce.ref
index a43d7d5bcba2becf2f0bbe65c74998bcb066887f..dd038762b6a82cadc07164f1580a2fb2a3160418 100644
--- a/DaVinciExamples/tests/refs/test_davinci_tupling_from_spruce.ref
+++ b/DaVinciExamples/tests/refs/test_davinci_tupling_from_spruce.ref
@@ -1,4 +1,3 @@
-INFO No MainOptions specified. DaVinci will import no options file!
 INFO User algorithm option_davinci_tupling_from_spruce.main imported successfully!
 ApplicationMgr    SUCCESS
 ====================================================================================================================================
diff --git a/DaVinciExamples/tests/refs/test_davinci_tupling_from_xgen.ref b/DaVinciExamples/tests/refs/test_davinci_tupling_from_xgen.ref
index af7ad353e0e4657cd92f4c4c072f29ee053fd7f0..5a68e670013a46a9f45fb36f5508831d1848d09e 100644
--- a/DaVinciExamples/tests/refs/test_davinci_tupling_from_xgen.ref
+++ b/DaVinciExamples/tests/refs/test_davinci_tupling_from_xgen.ref
@@ -1,4 +1,3 @@
-INFO No MainOptions specified. DaVinci will import no options file!
 INFO User algorithm option_davinci_tupling_from_xgen.main imported successfully!
 ApplicationMgr    SUCCESS
 ====================================================================================================================================
diff --git a/DaVinciSys/scripts/davinci b/DaVinciSys/scripts/davinci
index 930e3b7226512ec9327272602b66ddc8b5303958..98d692767c2b9eef5918ba0890f7dba835125699 100755
--- a/DaVinciSys/scripts/davinci
+++ b/DaVinciSys/scripts/davinci
@@ -13,17 +13,20 @@
 This script is meant to implement the Python Click functionality
 when running a DaVinci (Gaudi) application.
 
-Two possible functions have been developed to automatically handle
-the differences between jobs using data or simulated input files.
+Two possible functions have been developed to provide templates
+for the option files needed to run DaVinci:
+  - create-options-template
+  - create_options_templates
 
 A help message with all the details on the possible commands and
-relative options can be obtained with the command line:
+relative arguments can be obtained with the command line:
 
-./run davinci
+./run davinci --help
+./run davinci create-options-templates --help
 
-A DaVinci job using simulated data can be run using the command line:
+A DaVinci job can be run using the command line:
 
-./run davinci [davinci_opts] run-mc [job_opts]
+./run davinci [davinci_opts]
 """
 
 import os, sys, click
@@ -40,7 +43,64 @@ else:
     APP_VERSION = ""
 
 
-@click.group()
+class DefaultCommandGroup(click.Group):
+    """Class allowing a default command for a click.Group"""
+
+    def command(self, *args, **kwargs):
+        default_command = kwargs.pop('default_command', False)
+
+        if default_command and not args:
+            kwargs['name'] = kwargs.get('name', '_')
+        decorator = super(DefaultCommandGroup, self).command(*args, **kwargs)
+
+        if default_command:
+
+            def new_decorator(f):
+                cmd = decorator(f)
+                self.default_command = cmd.name
+                return cmd
+
+            return new_decorator
+
+        return decorator
+
+    def resolve_command(self, ctx, args):
+        # Store context params and args since they can be lost
+        # when no command is invoked (.i.e. inside the except)
+        params_bak = {}
+        for name, value in ctx.params.items():
+            params_bak[name] = value
+        args_bak = []
+        for value in ctx.args:
+            args_bak.append(value)
+
+        try:
+            # test if the command parses
+            return super(DefaultCommandGroup, self).resolve_command(ctx, args)
+        except click.UsageError:
+            # command did not parse, assume it is the default command
+            args.insert(0, self.default_command)
+
+            ctx.params = params_bak
+            ctx.args = args_bak
+
+            return super(DefaultCommandGroup, self).resolve_command(ctx, args)
+
+
+inputfiledb_helper = "TestFileDB-like file containing job input and conditions information (.yaml). Takes the pair of values 'filedb-key', 'filedb-path'." \
+                     "If you want to use the standard TestFileDB set 'filedb-path' = '-'.\n" \
+                     "E.g. for a local DB:\n./run davinci --inputfiledb Upgrade_Bd2KstarMuMu_ldst\n" \
+                     "Phys/DaVinci/options/DaVinciDB-Example.yaml.\n" \
+                     "E.g. for TestFileDB:\n./run davinci --inputfiledb Upgrade_Bd2KstarMuMu -"
+joboptfile_helper = "Option file containing the job information (.yaml, .py)"
+override_data_options_helper = "Allow overriding default data options defined in DaVinci Database."
+
+
+@click.group(
+    cls=DefaultCommandGroup,
+    invoke_without_command=True,
+    context_settings=dict(ignore_unknown_options=True, allow_extra_args=True))
+@click.version_option(version=APP_VERSION)
 @click.option(
     "-o",
     "--export",
@@ -62,22 +122,24 @@ else:
     default=False,
     help="Process the options but do not run the application.",
 )
-@click.version_option(version=APP_VERSION)
-def main(export, with_defaults, dry_run):
+@click.pass_context
+def main(ctx, export, with_defaults, dry_run):
     """
-    Try `davinci COMMAND --help` for information on COMMAND options available.
+    Try `davinci COMMAND --help` for additional information on the available DaVinci commands.
     """
     assert not export or export.endswith(
         ".opts"), "--export argument must have '.opts' extension"
 
+    if not ctx.invoked_subcommand:
+        log_click("INFO", ctx.get_help())
+
 
 @main.resultcallback()
 def run_job(configurables, export=None, with_defaults=False, dry_run=None):
     """
     This function is not invoked directly by davinci but it is used to override the
     default Click 'result_callback' function by means of the 'resultcallback' decorator.
-    The 'result_callback' method is invoked automatically when returning the values
-    of the main subcommnads: run_mc and run_data.
+    The 'result_callback' method is invoked automatically when running commands.
     """
     assert configurables.values()  # we only want the values
     configurables = configurables.values()
@@ -129,6 +191,50 @@ def run_job(configurables, export=None, with_defaults=False, dry_run=None):
         exit(app.run())
 
 
+@main.command(
+    default_command=True,
+    context_settings=dict(ignore_unknown_options=True, allow_extra_args=True))
+@click.option(
+    "-i",
+    "--inputfiledb",
+    default=("", "TestFileDB"),
+    nargs=2,
+    help=inputfiledb_helper)
+@click.option("-j", "--joboptfile", default="", help=joboptfile_helper)
+@click.option(
+    "--override_data_options",
+    is_flag=True,
+    default=False,
+    help=override_data_options_helper)
+@click.pass_context
+def main_command(ctx, inputfiledb, joboptfile, override_data_options):
+    """
+    Default command for running a DaVinci job.
+
+    Ctx: click.core.Context class (dict).
+    Predefined Click object storing information about the invoked command.
+    All options passed via the command line which are not recognised by Click are stored into the ctx.args element.
+    Ctx.args is a simple array and each extra option is stored using two values: the first one is the key
+    and the second one is the corresponding value.
+    E.g.: --evt_max 100 will be stored as: ctx.args[0] = --evt_max, ctx.args[1] = 100
+    """
+    ctx_args = (ctx.args if (len(ctx.args) > 1) else [])
+
+    inputfiledb_key, inputfiledb_file = set_testfiledb(inputfiledb)
+
+    dump_call(inputfiledb_file, inputfiledb_key, joboptfile, ctx_args)
+
+    config = run_davinci_app(
+        inputfiledb_key,
+        inputfiledb_file,  #file and key for job input and conditions
+        joboptfile,  # file for job options
+        ctx_args,  # list of extra options to be set in the job
+        override_data_options  # flag for overriding data options in the job
+    )
+
+    return config
+
+
 @main.command(
     context_settings=dict(
         ignore_unknown_options=False, allow_extra_args=False))
@@ -151,7 +257,7 @@ def create_options_template(option_type, filename_output, interactive):
     E.g. ./run davinci create-options-template data (for a template of the inputfiledb argument).
 
     Note:
-        Click automatically converts "_" in "-", so this function can be invoked calling create-options-template as shown in the help.   
+        Click automatically converts "_" in "-", so this function can be invoked calling create-options-template as shown in the help.
     """
     assert option_type in ("job", "data"), "option type value not recognised."\
         "Use 'job' for creating a template of the joboptfile or 'data' for the inputfiledb."
@@ -182,8 +288,7 @@ def create_options_templates(filenames_output):
     E.g. ./run davinci create-options-templates -f inputdb_template.yaml jobopt_template.yaml\n
 
     Note:
-        Click automatically converts "_" in "-", so this function can be invoked calling 
-        create-options-template as shown in the help.
+        Click automatically converts "_" in "-", so this function can be invoked calling create-options-template as shown in the help.
     """
 
     create_inputdb_template(filenames_output[0])
@@ -192,130 +297,5 @@ def create_options_templates(filenames_output):
     return get_dummy_config()
 
 
-inputfiledb_helper = "TestFileDB-like file containing job input and conditions information (.yaml). Takes the pair of values 'filedb-key', 'filedb-path'." \
-                      "If you want to use the standard TestFileDB set 'filedb-path' = '-'.\n" \
-                      "E.g. for a local DB:\n./run davinci [command] --inputfiledb Upgrade_Bd2KstarMuMu_ldst\n" \
-                      "Phys/DaVinci/options/DaVinciDB-Example.yaml.\n" \
-                      "E.g. for TestFileDB:\n./run davinci [command] --inputfiledb Upgrade_Bd2KstarMuMu -"
-joboptfile_helper = "Option file containing the job information (.yaml, .py)"
-simplejob_helper = "Option for running a simple DaVinci job without any specific configuration (.py)."
-override_data_options_helper = "Allow overriding default data options defined in DaVinci Database."
-
-
-@main.command(
-    context_settings=dict(
-        ignore_unknown_options=True,
-        allow_extra_args=True,
-    ))
-@click.option(
-    "-i",
-    "--inputfiledb",
-    default=("", "TestFileDB"),
-    nargs=2,
-    help=inputfiledb_helper)
-@click.option("-j", "--joboptfile", default="", help=joboptfile_helper)
-@click.option(
-    "--simplejob", is_flag=True, default=False, help=simplejob_helper)
-@click.option(
-    "--override_data_options",
-    is_flag=True,
-    default=False,
-    help=override_data_options_helper)
-@click.pass_context
-def run_mc(ctx, inputfiledb, joboptfile, simplejob, override_data_options):
-    """
-    DaVinci function for running jobs on simulated samples.
-
-    Ctx: click.core.Context class (dict).
-    Predefined Click object storing information about the invoked command.
-    All options passed via the command line which are not recognised by Click are stored into the ctx.args element.
-    Ctx.args is a simple array and each extra option is stored using two values: the first one is the key
-    and the second one is the corresponding value.
-    E.g.: --evt_max 100 will be stored as: ctx.args[0] = --evt_max, ctx.args[1] = 100
-
-    Note:
-        Click automatically converts "_" in "-", so this function can be invoked calling run-mc as shown in the help.
-    """
-
-    # Run on MC sample
-    options.simulation = True
-
-    # Test file DB key request overrides inputfiledb
-    inputfiledb_key, inputfiledb_file = set_testfiledb(inputfiledb)
-
-    ctx_args = (ctx.args if (len(ctx.args) > 1) else [])
-    dump_call(inputfiledb_file, inputfiledb_key, joboptfile, ctx_args)
-
-    config = run_davinci_app(
-        inputfiledb_key,
-        inputfiledb_file,  #file and key for job input and conditions
-        joboptfile,  # file for job options
-        ctx_args,  # list of extra options to be set in the job
-        simplejob,  # flag for running a simplejob
-        override_data_options  # flag for overriding data options in the job
-    )
-
-    return config
-
-
-@main.command(
-    context_settings=dict(
-        ignore_unknown_options=True,
-        allow_extra_args=True,
-    ))
-@click.option(
-    "-i",
-    "--inputfiledb",
-    default=("", "TestFileDB"),
-    nargs=2,
-    help=inputfiledb_helper)
-@click.option("-j", "--joboptfile", default="", help=joboptfile_helper)
-@click.option(
-    "--simplejob", is_flag=True, default=False, help=simplejob_helper)
-@click.option(
-    "--override_data_options",
-    is_flag=True,
-    default=False,
-    help=override_data_options_helper)
-@click.pass_context
-def run_data(ctx, inputfiledb, joboptfile, simplejob, override_data_options):
-    """
-    DaVinci function for running jobs on detector data samples.
-
-    Ctx: click.core.Context class (dict).
-    Predefined Click object storing information about the invoked command.
-    All options passed via the command line that are not recognised by Click are stored into the ctx.args element.
-    Ctx.args is a simple array and each extra option is stored using two values: the first one is the key
-    and the second one is the corresponding value.
-    Ex.: --evt_max 100 will be stored as: ctx.args[0] = --evt_max, ctx.args[1] = 100
-
-    Note:
-        Click automatically converts "_" in "-", so this function can be invoked calling run-data as shown in the help.
-    """
-
-    raise ValueError(
-        'Data file with upgrade conditions are not yet available. Please use :mc function instead.'
-    )
-
-    # Run on a data sample
-    options.simulation = False
-    # TestFileDB key request overrides inputfiledb
-    inputfiledb_key, inputfiledb_file = set_testfiledb(inputfiledb)
-
-    ctx_args = (ctx.args if (len(ctx.args) > 1) else [])
-    dump_call(inputfiledb_file, inputfiledb_key, joboptfile, ctx_args)
-
-    config = run_davinci_app(
-        inputfiledb_key,
-        inputfiledb_file,  #file and key for job input and conditions
-        joboptfile,  # file for job options
-        ctx_args,  # list of extra options to be set in the job
-        simplejob,  # flag for running a simplejob
-        override_data_options  # flag for overriding data options in the job
-    )
-
-    return config
-
-
 if __name__ == "__main__":
     main()
diff --git a/DaVinciSys/tests/test_davinci_script.py b/DaVinciSys/tests/test_davinci_script.py
index ddbba0db68132951b3fdcb9ebeb19f14ddc724a5..5555feab6fc985c9bffec34fc827230e5784c52d 100644
--- a/DaVinciSys/tests/test_davinci_script.py
+++ b/DaVinciSys/tests/test_davinci_script.py
@@ -40,7 +40,7 @@ def test_override_job_option():
     Verify the overriding of a DaVinci option on the fly.
     No need to actually run the job, hence the dry run.
     """
-    cmd = 'davinci --export test_override_job_option.opts --dry-run run-mc --override_data_options '\
+    cmd = 'davinci --export test_override_job_option.opts --dry-run --override_data_options '\
           ' --process "Turbo" --inputfiledb Upgrade_Bd2KstarMuMu -'
     result = subprocess.run(cmd, shell=True)
 
@@ -60,7 +60,7 @@ def test_override_job_option_bis():
     (see related test "test_override_job_option").
     No need to actually run the job, hence the dry run.
     """
-    cmd = 'davinci --export test_override_job_option_bis.opts --dry-run run-mc  --process "Turbo" '\
+    cmd = 'davinci --export test_override_job_option_bis.opts --dry-run  --process "Turbo" '\
           ' --override_data_options --inputfiledb Upgrade_Bd2KstarMuMu -'
     result = subprocess.run(cmd, shell=True)
 
@@ -79,7 +79,7 @@ def test_run_option_shortcut():
     Verify that the option values passed to the davinci command are accepted 
     also when not using the full name (e.g. --inputfiledb ==> -i).
     """
-    cmd = 'davinci --dry-run -o test_run_option_shortcut.opts run-mc -i Upgrade_Bd2KstarMuMu -'
+    cmd = 'davinci --dry-run -o test_run_option_shortcut.opts -i Upgrade_Bd2KstarMuMu -'
     result = subprocess.run(cmd, shell=True)
 
     # Just be maniac - the command should work ;-)
diff --git a/DaVinciTests/tests/options/option_davinci_gaudirun_job.py b/DaVinciTests/tests/options/option_davinci_gaudirun_job.py
index 6f8b4dc45cf7c93cae2509aa93b55a82e4b64693..003deb36adb01dffeb97bbc984ecf9e54214553b 100644
--- a/DaVinciTests/tests/options/option_davinci_gaudirun_job.py
+++ b/DaVinciTests/tests/options/option_davinci_gaudirun_job.py
@@ -29,7 +29,6 @@ def main():
 options.evt_max = 10
 options.ntuple_file = 'DV-example-ntp.root'
 options.histo_file = 'DV-example-his.root'
-options.input_raw_format = 0.3
 options.enable_unpack = False
 options.user_algorithms = "../options/option_davinci_gaudirun_job:main"
 options.write_fsr = False
diff --git a/DaVinciTests/tests/options/option_davinci_initialise_upgrade.yaml b/DaVinciTests/tests/options/option_davinci_initialise_upgrade.yaml
index b29beb5e1bbdd9265f0b94dc34ad99427f92a464..718e9b159a5eefc3bf2f60dc1c8c07468da52be0 100644
--- a/DaVinciTests/tests/options/option_davinci_initialise_upgrade.yaml
+++ b/DaVinciTests/tests/options/option_davinci_initialise_upgrade.yaml
@@ -10,5 +10,4 @@
 ###############################################################################
 
 evt_max: 1000
-skip_events: 0
 enable_unpack: False
\ No newline at end of file
diff --git a/DaVinciTests/tests/options/option_davinci_read_mc_xgen.py b/DaVinciTests/tests/options/option_davinci_read_mc_xgen.py
index 44e18e4c1b136bc07016bfe32dd01e2b0b936011..53c0ee80d23c19be23d117f7c1b8e3c67d08a329 100644
--- a/DaVinciTests/tests/options/option_davinci_read_mc_xgen.py
+++ b/DaVinciTests/tests/options/option_davinci_read_mc_xgen.py
@@ -56,12 +56,8 @@ bu2jpsik_line = force_location("/Event/MC/Particles")
 def main():
     from DaVinci import options
 
-    options.enable_unpack = True
-    options.input_raw_format = 0.3
-    options.lumi = False
     options.histo_file = "DV_histo_xgen.root"
     options.ntuple_file = "DV_tuple_xgen.root"
-    options.evt_max = -1
 
     printMC = PrintMCTree(
         MCParticles=bu2jpsik_line, ParticleNames=["B+", "B-"], OutputLevel=4)
diff --git a/DaVinciTests/tests/options/option_davinci_sprucing.yaml b/DaVinciTests/tests/options/option_davinci_sprucing.yaml
index a47dbdce795f591451c81427dddd13cb95f3548d..f8a02c3ddc624fb2d8e5183cbc0a25d112da964d 100644
--- a/DaVinciTests/tests/options/option_davinci_sprucing.yaml
+++ b/DaVinciTests/tests/options/option_davinci_sprucing.yaml
@@ -10,7 +10,4 @@
 ###############################################################################
 
 annsvc_config: 'root://eoslhcb.cern.ch//eos/lhcb/wg/dpa/wp3/tests/spruce_all_lines_realtime_newPacking.tck.json'
-evt_max: -1
-print_freq: 1
-process: Spruce
-stream: default
\ No newline at end of file
+print_freq: 1
\ No newline at end of file
diff --git a/DaVinciTests/tests/qmtest/davinci.qms/configure_dst_py-opts.qmt b/DaVinciTests/tests/qmtest/davinci.qms/configure_dst_py-opts.qmt
index 6551deb4775dae7273dfbdb5b914b7aedc897fab..d7eb55b62ceaa2608bbae9a4fba83585c63e36aa 100644
--- a/DaVinciTests/tests/qmtest/davinci.qms/configure_dst_py-opts.qmt
+++ b/DaVinciTests/tests/qmtest/davinci.qms/configure_dst_py-opts.qmt
@@ -15,7 +15,6 @@
   <argument name="args"><set>
       <text>--export</text>
       <text>configuration_dst_py.opts</text>
-      <text>run-mc</text>
       <text>--inputfiledb</text>
       <text>Upgrade_Bd2KstarMuMu</text>
       <text>-</text>
diff --git a/DaVinciTests/tests/qmtest/davinci.qms/configure_dst_yaml-opts.qmt b/DaVinciTests/tests/qmtest/davinci.qms/configure_dst_yaml-opts.qmt
index f852bb5eeb6c0f26b822db0275c12ae87c41f5c9..7de77d066a8128b20dd103a8e1a7c0d7c9c1c843 100644
--- a/DaVinciTests/tests/qmtest/davinci.qms/configure_dst_yaml-opts.qmt
+++ b/DaVinciTests/tests/qmtest/davinci.qms/configure_dst_yaml-opts.qmt
@@ -15,7 +15,6 @@
   <argument name="args"><set>
       <text>--export</text>
       <text>configuration_dst_yaml.opts</text>
-      <text>run-mc</text>
       <text>--inputfiledb</text>
       <text>Upgrade_Bd2KstarMuMu</text>
       <text>-</text>
diff --git a/DaVinciTests/tests/qmtest/davinci.qms/test_davinci_control_flow.qmt b/DaVinciTests/tests/qmtest/davinci.qms/test_davinci_control_flow.qmt
index 737fd5cd2fbd1a7a6839b2044141f4b8ccd6b7fb..938eef1d8515f8be85ccf32376482812c757331e 100755
--- a/DaVinciTests/tests/qmtest/davinci.qms/test_davinci_control_flow.qmt
+++ b/DaVinciTests/tests/qmtest/davinci.qms/test_davinci_control_flow.qmt
@@ -27,7 +27,6 @@
 <extension class="GaudiTest.GaudiExeTest" kind="test">
   <argument name="program"><text>davinci</text></argument>
   <argument name="args"><set>
-  <text>run-mc</text>
   <text>--inputfiledb</text>
   <text>Upgrade_Bd2KstarMuMu_ldst</text>
   <text>$DAVINCIROOT/options/DaVinciDB-Example.yaml</text>
diff --git a/DaVinciTests/tests/qmtest/davinci.qms/test_davinci_filters.qmt b/DaVinciTests/tests/qmtest/davinci.qms/test_davinci_filters.qmt
index ed67bfd7666c28dd0286f87109866cd0de3c834f..8d4d453e1f823064ce04f2253cd5cd735ed88432 100644
--- a/DaVinciTests/tests/qmtest/davinci.qms/test_davinci_filters.qmt
+++ b/DaVinciTests/tests/qmtest/davinci.qms/test_davinci_filters.qmt
@@ -28,7 +28,6 @@
   <argument name="program"><text>davinci</text></argument>
   <argument name="timeout"><integer>1000</integer></argument>
   <argument name="args"><set>
-  <text>run-mc</text>
   <text>--inputfiledb</text>
   <text>Spruce_all_lines_dst</text>
   <text>$DAVINCIROOT/options/DaVinciDB-Example.yaml</text>
diff --git a/DaVinciTests/tests/qmtest/davinci.qms/test_davinci_funtuple_array.qmt b/DaVinciTests/tests/qmtest/davinci.qms/test_davinci_funtuple_array.qmt
index 1319af0ce0043b4de080750bc7f15513bf051468..ef4818b7a98b7f7f151f7f5c539b7cd9d9daf8df 100644
--- a/DaVinciTests/tests/qmtest/davinci.qms/test_davinci_funtuple_array.qmt
+++ b/DaVinciTests/tests/qmtest/davinci.qms/test_davinci_funtuple_array.qmt
@@ -27,7 +27,6 @@
   <argument name="program"><text>davinci</text></argument>
   <argument name="timeout"><integer>1000</integer></argument>
   <argument name="args"><set>
-  <text>run-mc</text>
   <text>--inputfiledb</text>
   <text>Spruce_all_lines_dst</text>
   <text>$DAVINCIROOT/options/DaVinciDB-Example.yaml</text>
diff --git a/DaVinciTests/tests/qmtest/davinci.qms/test_davinci_initialise_upgrade.qmt b/DaVinciTests/tests/qmtest/davinci.qms/test_davinci_initialise_upgrade.qmt
index 5049d8e464e37f694f36b2b30b566f7ed43449fd..bbc1613d49b910027a77546901cd6c13839eba87 100755
--- a/DaVinciTests/tests/qmtest/davinci.qms/test_davinci_initialise_upgrade.qmt
+++ b/DaVinciTests/tests/qmtest/davinci.qms/test_davinci_initialise_upgrade.qmt
@@ -28,7 +28,6 @@
   <argument name="program"><text>davinci</text></argument>
   <argument name="args"><set>
   <text>--dry-run</text>
-  <text>run-mc</text>
   <text>--inputfiledb</text>
   <text>Upgrade_Bd2KstarMuMu_ldst</text>
   <text>$DAVINCIROOT/options/DaVinciDB-Example.yaml</text>
diff --git a/DaVinciTests/tests/qmtest/davinci.qms/test_davinci_recVertices.qmt b/DaVinciTests/tests/qmtest/davinci.qms/test_davinci_recVertices.qmt
index de2dd07845da92222e7d56fea8af653b338e9113..78d79a81481008d5bf0ca6e5e60591d1838f6e24 100644
--- a/DaVinciTests/tests/qmtest/davinci.qms/test_davinci_recVertices.qmt
+++ b/DaVinciTests/tests/qmtest/davinci.qms/test_davinci_recVertices.qmt
@@ -27,7 +27,6 @@
 <extension class="GaudiTest.GaudiExeTest" kind="test">
   <argument name="program"><text>davinci</text></argument>
   <argument name="args"><set>
-  <text>run-mc</text>
   <text>--inputfiledb</text>
   <text>Spruce_all_lines_dst</text>
   <text>$DAVINCIROOT/options/DaVinciDB-Example.yaml</text>
diff --git a/DaVinciTests/tests/qmtest/davinci.qms/test_davinci_simplejob.qmt b/DaVinciTests/tests/qmtest/davinci.qms/test_davinci_simplejob.qmt
deleted file mode 100755
index 3e68cb6cbb6107c8cc37bcf2c6c3968d5309afcf..0000000000000000000000000000000000000000
--- a/DaVinciTests/tests/qmtest/davinci.qms/test_davinci_simplejob.qmt
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" ?>
-<!--
-###############################################################################
-# (c) Copyright 2020-2021 CERN for the benefit of the LHCb Collaboration      #
-#                                                                             #
-# This software is distributed under the terms of the GNU General Public      #
-# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING".   #
-#                                                                             #
-# In applying this licence, CERN does not waive the privileges and immunities #
-# granted to it by virtue of its status as an Intergovernmental Organization  #
-# or submit itself to any jurisdiction.                                       #
-###############################################################################
--->
-<!DOCTYPE extension  PUBLIC '-//QM/2.3/Extension//EN'  'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'>
-<!--
-#######################################################
-# SUMMARY OF THIS TEST
-# ...................
-# Author: dfazzini
-# Purpose: Very simple test of DaVinci configurable for testing the click feature
-# Prerequisites: None
-# simplejob
-# inputfiledb Upgrade_Bd2KstarMuMu_ldst $DAVINCIROOT/options/DaVinciDB-Example.yaml
-#######################################################
--->
-<extension class="GaudiTest.GaudiExeTest" kind="test">
-  <argument name="program"><text>davinci</text></argument>
-  <argument name="args"><set>
-  <text>run-mc</text>
-  <text>--simplejob</text>
-  <text>--inputfiledb</text>
-  <text>Upgrade_Bd2KstarMuMu_ldst</text>
-  <text>$DAVINCIROOT/options/DaVinciDB-Example.yaml</text>
-  <text>--evt_max</text>
-  <text>10</text>
-  </set></argument>
-  <argument name="reference"><text>../refs/test_davinci_simplejob.ref</text></argument>
-  <argument name="error_reference"><text>../refs/empty.ref</text></argument>
-  <argument name="validator"><text>
-from DaVinciTests.QMTest.DaVinciExclusions import preprocessor
-validateWithReference(preproc = preprocessor)
-countErrorLines({"FATAL":0, "ERROR":0})
-  </text></argument>
-</extension>
diff --git a/DaVinciTests/tests/qmtest/davinci.qms/test_davinci_testfiledb.qmt b/DaVinciTests/tests/qmtest/davinci.qms/test_davinci_testfiledb.qmt
index 8231a4e242876ddb4aeac717790ca29774ebf3ae..7d3cabbe438e55ff2cec0951ccf0e41560260bf7 100755
--- a/DaVinciTests/tests/qmtest/davinci.qms/test_davinci_testfiledb.qmt
+++ b/DaVinciTests/tests/qmtest/davinci.qms/test_davinci_testfiledb.qmt
@@ -27,7 +27,6 @@
 <extension class="GaudiTest.GaudiExeTest" kind="test">
   <argument name="program"><text>davinci</text></argument>
   <argument name="args"><set>
-  <text>run-mc</text>
   <text>--inputfiledb</text>
   <text>Upgrade_Bd2KstarMuMu</text>
   <text>-</text>
diff --git a/DaVinciTests/tests/qmtest/davinci.qms/test_davinci_user_algs.qmt b/DaVinciTests/tests/qmtest/davinci.qms/test_davinci_user_algs.qmt
index 974a853716842efaaca362254866323b649b6a8e..fdb3e1226eadf07cd3f352f8a43224018a37a7ee 100755
--- a/DaVinciTests/tests/qmtest/davinci.qms/test_davinci_user_algs.qmt
+++ b/DaVinciTests/tests/qmtest/davinci.qms/test_davinci_user_algs.qmt
@@ -20,13 +20,13 @@
 # Purpose: Very simple test of DaVinci configurable for testing the click feature
 # Prerequisites: None
 # inputfiledb Upgrade_Bd2KstarMuMu_ldst $DAVINCIROOT/options/DaVinciDB-Example.yaml
-# user_algorithms ../options/option_davinci_simplejob:main
+# joboptfile ../options/option_davinci_initialise_upgrade.yaml
+# user_algorithms ../options/option_davinci_user_algs:main
 #######################################################
 -->
 <extension class="GaudiTest.GaudiExeTest" kind="test">
   <argument name="program"><text>davinci</text></argument>
   <argument name="args"><set>
-  <text>run-mc</text>
   <text>--inputfiledb</text>
   <text>Upgrade_Bd2KstarMuMu_ldst</text>
   <text>$DAVINCIROOT/options/DaVinciDB-Example.yaml</text>  
diff --git a/DaVinciTests/tests/qmtest/fsrs.qms/test-genfsr.qmt b/DaVinciTests/tests/qmtest/fsrs.qms/test-genfsr.qmt
index 77733f241e60dbb88410c7ab92c076cdad50c8aa..25575947ea64da6caabff44cd106fcca1fe63452 100644
--- a/DaVinciTests/tests/qmtest/fsrs.qms/test-genfsr.qmt
+++ b/DaVinciTests/tests/qmtest/fsrs.qms/test-genfsr.qmt
@@ -23,7 +23,6 @@
 <extension class="GaudiTest.GaudiExeTest" kind="test">
   <argument name="program"><text>davinci</text></argument>
   <argument name="args"><set>
-  <text>run-mc</text>
   <text>--inputfiledb</text>
   <text>Upgrade_genFSR_ldst</text>
   <text>$DAVINCIROOT/options/DaVinciDB-Example.yaml</text>
diff --git a/DaVinciTests/tests/qmtest/io.qms/test_read_mc_digi.qmt b/DaVinciTests/tests/qmtest/io.qms/test_read_mc_digi.qmt
index a3f57b39813b89c3d6640c95ff459a68b5d88c63..1230c6e9b516529cceace791f701867d9e66a2b7 100644
--- a/DaVinciTests/tests/qmtest/io.qms/test_read_mc_digi.qmt
+++ b/DaVinciTests/tests/qmtest/io.qms/test_read_mc_digi.qmt
@@ -26,11 +26,9 @@
   <argument name="program"><text>davinci</text></argument>
   <argument name="timeout"><integer>600</integer></argument>
   <argument name="args"><set>
-  <text>run-mc</text>
   <text>--inputfiledb</text>
   <text>upgrade-magdown-sim09c-up02-34112100-digi</text>
   <text>-</text>
-  <text>--simplejob</text>
   <text>--evt_max</text>
   <text>200</text>
   </set></argument>
diff --git a/DaVinciTests/tests/qmtest/io.qms/test_read_mc_ldst.qmt b/DaVinciTests/tests/qmtest/io.qms/test_read_mc_ldst.qmt
index 6694aff5181adfa687c5584f0359e0324b3a21a7..130a4d42fca6177bc2d592acfa8eb0fc85f89d27 100644
--- a/DaVinciTests/tests/qmtest/io.qms/test_read_mc_ldst.qmt
+++ b/DaVinciTests/tests/qmtest/io.qms/test_read_mc_ldst.qmt
@@ -26,11 +26,9 @@
   <argument name="program"><text>davinci</text></argument>
   <argument name="timeout"><integer>600</integer></argument>
   <argument name="args"><set>
-  <text>run-mc</text>
   <text>--inputfiledb</text>
   <text>upgrade-magdown-sim09c-up02-reco-up01-minbias-ldst</text>
   <text>-</text>
-  <text>--simplejob</text>
   <text>--evt_max</text>
   <text>200</text>
   </set></argument>
diff --git a/DaVinciTests/tests/qmtest/io.qms/test_read_mc_mdf.qmt b/DaVinciTests/tests/qmtest/io.qms/test_read_mc_mdf.qmt
index b9d25ad6574f512030dc6540887e8e43a4989076..0109289901c02bdd3065f84b8c21391d8defed37 100644
--- a/DaVinciTests/tests/qmtest/io.qms/test_read_mc_mdf.qmt
+++ b/DaVinciTests/tests/qmtest/io.qms/test_read_mc_mdf.qmt
@@ -26,11 +26,9 @@
   <argument name="program"><text>davinci</text></argument>
   <argument name="timeout"><integer>600</integer></argument>
   <argument name="args"><set>
-  <text>run-mc</text>
   <text>--inputfiledb</text>
   <text>UpgradeHLT1FilteredMinbias</text>
   <text>-</text>
-  <text>--simplejob</text>
   <text>--evt_max</text>
   <text>200</text>
   </set></argument>
diff --git a/DaVinciTests/tests/qmtest/io.qms/test_read_mc_xdigi.qmt b/DaVinciTests/tests/qmtest/io.qms/test_read_mc_xdigi.qmt
index f1fe8e3e10d0494daed40f3c55fa469b7fd9f724..485d42d404eb3d0a15ad10435aa0b3dfc88e9726 100644
--- a/DaVinciTests/tests/qmtest/io.qms/test_read_mc_xdigi.qmt
+++ b/DaVinciTests/tests/qmtest/io.qms/test_read_mc_xdigi.qmt
@@ -26,11 +26,9 @@
   <argument name="program"><text>davinci</text></argument>
   <argument name="timeout"><integer>600</integer></argument>
   <argument name="args"><set>
-  <text>run-mc</text>
   <text>--inputfiledb</text>
   <text>upgrade_DC19_01_Bs2JPsiPhi_MD</text>
   <text>-</text>
-  <text>--simplejob</text>
   <text>--evt_max</text>
   <text>200</text>
   </set></argument>
diff --git a/DaVinciTests/tests/qmtest/io.qms/test_read_mc_xgen.qmt b/DaVinciTests/tests/qmtest/io.qms/test_read_mc_xgen.qmt
index 4371648a95843ed8ec92cf4741bf4700b36f70c0..5fbdb7d4f79a1dbf51215a1d832a6eeed317d984 100644
--- a/DaVinciTests/tests/qmtest/io.qms/test_read_mc_xgen.qmt
+++ b/DaVinciTests/tests/qmtest/io.qms/test_read_mc_xgen.qmt
@@ -27,11 +27,9 @@
   <argument name="program"><text>davinci</text></argument>
   <argument name="timeout"><integer>600</integer></argument>
   <argument name="args"><set>
-  <text>run-mc</text>
   <text>--inputfiledb</text>
   <text>test_read_xgen</text>
   <text>$DAVINCIROOT/options/DaVinciDB-Example.yaml</text>
-  <text>--simplejob</text>
   <text>--evt_max</text>
   <text>-1</text>
   </set></argument>
diff --git a/DaVinciTests/tests/qmtest/io.qms/test_read_moore_dst.qmt b/DaVinciTests/tests/qmtest/io.qms/test_read_moore_dst.qmt
index 3b00f5bf4ce191a994eab8851b76161c8c330d22..033c72113b0898516c765fb5b85ea8d93e443b57 100755
--- a/DaVinciTests/tests/qmtest/io.qms/test_read_moore_dst.qmt
+++ b/DaVinciTests/tests/qmtest/io.qms/test_read_moore_dst.qmt
@@ -27,11 +27,9 @@
   <argument name="program"><text>davinci</text></argument>
   <argument name="timeout"><integer>3600</integer></argument>
   <argument name="args"><set>
-  <text>run-mc</text>
   <text>--inputfiledb</text>
   <text>Moore-Output-DST</text>
   <text>-</text>
-  <text>--simplejob</text>
   <text>--user_algorithms</text>
   <text>../options/DVTestReadMooreOutput:main</text>
 </set></argument>
diff --git a/DaVinciTests/tests/refs/test_davinci_control_flow.ref b/DaVinciTests/tests/refs/test_davinci_control_flow.ref
index 0008b9b2c5d6767f71ed652ac5b8b649a9eb0351..cb753f073cbff7c9378c4e82034f1c47a3039a39 100644
--- a/DaVinciTests/tests/refs/test_davinci_control_flow.ref
+++ b/DaVinciTests/tests/refs/test_davinci_control_flow.ref
@@ -1,4 +1,3 @@
-INFO No MainOptions specified. DaVinci will import no options file!
 WARNING DV option file or main function not defined. No user algorithms will be used.
 ApplicationMgr    SUCCESS
 ====================================================================================================================================
diff --git a/DaVinciTests/tests/refs/test_davinci_filters.ref b/DaVinciTests/tests/refs/test_davinci_filters.ref
index 3d6642127e3dd23156ee4b191aa3d2ef96f335bf..24f4d7627124a88451a5b663d42fddba63d8ec7f 100644
--- a/DaVinciTests/tests/refs/test_davinci_filters.ref
+++ b/DaVinciTests/tests/refs/test_davinci_filters.ref
@@ -1,4 +1,3 @@
-INFO No MainOptions specified. DaVinci will import no options file!
 INFO User algorithm option_davinci_filters.main imported successfully!
 ApplicationMgr    SUCCESS
 ====================================================================================================================================
diff --git a/DaVinciTests/tests/refs/test_davinci_funtuple_array.ref b/DaVinciTests/tests/refs/test_davinci_funtuple_array.ref
index 71aeca68a8c1ccc9e1f0fed6d112c2b74f399ebe..d7b313430718e44dd07d77499ecc6c878200ff6e 100644
--- a/DaVinciTests/tests/refs/test_davinci_funtuple_array.ref
+++ b/DaVinciTests/tests/refs/test_davinci_funtuple_array.ref
@@ -1,4 +1,3 @@
-INFO No MainOptions specified. DaVinci will import no options file!
 INFO User algorithm option_davinci_funtuple_array.main imported successfully!
 ApplicationMgr    SUCCESS
 ====================================================================================================================================
diff --git a/DaVinciTests/tests/refs/test_davinci_gaudirun_job.ref b/DaVinciTests/tests/refs/test_davinci_gaudirun_job.ref
index 9f9b1d733f253f35864b723fc9eaa63b4e211df8..3cb5cae321f647e444dda8d5e1a65130182760ba 100644
--- a/DaVinciTests/tests/refs/test_davinci_gaudirun_job.ref
+++ b/DaVinciTests/tests/refs/test_davinci_gaudirun_job.ref
@@ -1,5 +1,3 @@
-INFO No MainOptions specified. DaVinci will import no options file!
-INFO No MainOptions specified. DaVinci will import no options file!
 INFO User algorithm option_davinci_gaudirun_job.main imported successfully!
 INFO User algorithm option_davinci_gaudirun_job.main imported successfully!
 ApplicationMgr    SUCCESS
diff --git a/DaVinciTests/tests/refs/test_davinci_initialise_upgrade.ref b/DaVinciTests/tests/refs/test_davinci_initialise_upgrade.ref
index 7514fef3b8070b998b4e54c2ea59179bc69a0a32..0e48ac3637987ee454a45556751964d071df532d 100644
--- a/DaVinciTests/tests/refs/test_davinci_initialise_upgrade.ref
+++ b/DaVinciTests/tests/refs/test_davinci_initialise_upgrade.ref
@@ -1,3 +1,2 @@
-INFO No MainOptions specified. DaVinci will import no options file!
 WARNING DV option file or main function not defined. No user algorithms will be used.
 INFO dry-run: not starting the application
diff --git a/DaVinciTests/tests/refs/test_davinci_read_mc_digi.ref b/DaVinciTests/tests/refs/test_davinci_read_mc_digi.ref
index 165ced640aac52a726651d23e35c2d3d5f14d3aa..cc79fbf394478013f81b24e420e0121bd1533868 100644
--- a/DaVinciTests/tests/refs/test_davinci_read_mc_digi.ref
+++ b/DaVinciTests/tests/refs/test_davinci_read_mc_digi.ref
@@ -1,4 +1,3 @@
-INFO No MainOptions specified. DaVinci will import no options file!
 WARNING DV option file or main function not defined. No user algorithms will be used.
 ApplicationMgr    SUCCESS
 ====================================================================================================================================
@@ -6,15 +5,20 @@ ApplicationMgr    SUCCESS
 ApplicationMgr       INFO Application Manager Configured successfully
 DetectorPersistencySvc                 INFO Added successfully Conversion service:XmlCnvSvc
 DetectorDataSvc                     SUCCESS Detector description database: git:/lhcb.xml
+FSROutputStreamDstWriter               INFO Data source: EventDataSvc output: SVC='Gaudi::RootCnvSvc'
 EventClockSvc.FakeEventTime            INFO Event times generated from 0 with steps of 0
 ApplicationMgr                         INFO Application Manager Initialized successfully
 DeFTDetector                           INFO Current FT geometry version =   63
 ApplicationMgr                         INFO Application Manager Started successfully
 EventPersistencySvc                    INFO Added successfully Conversion service:RootCnvSvc
-EventSelector                          INFO Stream:EventSelector.DataStreamTool_1 Def:DATAFILE='root://eoslhcb.cern.ch//eos/lhcb/wg/HLT/UpgradeSignalDigi/K0S2mu2/K0S2mu2_MCUpgrade_34112100_MagDown_00.digi' SVC='Gaudi::RootEvtSelector' OPT='READ' IgnoreChecksum='YES'
 EventSelector                       SUCCESS Reading Event record 1. Record number within stream 1: 1
 ApplicationMgr                         INFO Application Manager Stopped successfully
+FSROutputStreamDstWriter               INFO Set up File Summary Record
+FSROutputStreamDstWriter               INFO Events output: 1
 LAZY_AND: DaVinci                                               #=200     Sum=200         Eff=|( 100.0000 +- 0.00000 )%|
+ NONLAZY_OR: FileSummaryRecords                                 #=200     Sum=200         Eff=|( 100.0000 +- 0.00000 )%|
+  LAZY_AND: GenFSR                                              #=200     Sum=200         Eff=|( 100.0000 +- 0.00000 )%|
+   RecordStream/FSROutputStreamDstWriter                        #=200     Sum=200         Eff=|( 100.0000 +- 0.00000 )%|
  NONLAZY_OR: UserAnalysis                                       #=200     Sum=200         Eff=|( 100.0000 +- 0.00000 )%|
   LAZY_AND: UserAlgorithms                                      #=200     Sum=200         Eff=|( 100.0000 +- 0.00000 )%|
    Gaudi__Examples__VoidConsumer/Gaudi__Examples__VoidConsumer  #=200     Sum=200         Eff=|( 100.0000 +- 0.00000 )%|
diff --git a/DaVinciTests/tests/refs/test_davinci_read_mc_ldst.ref b/DaVinciTests/tests/refs/test_davinci_read_mc_ldst.ref
index 4fba53911187e385cad455bdb61494cdd9ff2ebe..cc79fbf394478013f81b24e420e0121bd1533868 100644
--- a/DaVinciTests/tests/refs/test_davinci_read_mc_ldst.ref
+++ b/DaVinciTests/tests/refs/test_davinci_read_mc_ldst.ref
@@ -1,4 +1,3 @@
-INFO No MainOptions specified. DaVinci will import no options file!
 WARNING DV option file or main function not defined. No user algorithms will be used.
 ApplicationMgr    SUCCESS
 ====================================================================================================================================
@@ -6,15 +5,20 @@ ApplicationMgr    SUCCESS
 ApplicationMgr       INFO Application Manager Configured successfully
 DetectorPersistencySvc                 INFO Added successfully Conversion service:XmlCnvSvc
 DetectorDataSvc                     SUCCESS Detector description database: git:/lhcb.xml
+FSROutputStreamDstWriter               INFO Data source: EventDataSvc output: SVC='Gaudi::RootCnvSvc'
 EventClockSvc.FakeEventTime            INFO Event times generated from 0 with steps of 0
 ApplicationMgr                         INFO Application Manager Initialized successfully
 DeFTDetector                           INFO Current FT geometry version =   63
 ApplicationMgr                         INFO Application Manager Started successfully
 EventPersistencySvc                    INFO Added successfully Conversion service:RootCnvSvc
-EventSelector                          INFO Stream:EventSelector.DataStreamTool_1 Def:DATAFILE='root://eoslhcb.cern.ch//eos/lhcb/wg/HLT/UpgradeMinbias/00069155_00000021_2.ldst' SVC='Gaudi::RootEvtSelector' OPT='READ' IgnoreChecksum='YES'
 EventSelector                       SUCCESS Reading Event record 1. Record number within stream 1: 1
 ApplicationMgr                         INFO Application Manager Stopped successfully
+FSROutputStreamDstWriter               INFO Set up File Summary Record
+FSROutputStreamDstWriter               INFO Events output: 1
 LAZY_AND: DaVinci                                               #=200     Sum=200         Eff=|( 100.0000 +- 0.00000 )%|
+ NONLAZY_OR: FileSummaryRecords                                 #=200     Sum=200         Eff=|( 100.0000 +- 0.00000 )%|
+  LAZY_AND: GenFSR                                              #=200     Sum=200         Eff=|( 100.0000 +- 0.00000 )%|
+   RecordStream/FSROutputStreamDstWriter                        #=200     Sum=200         Eff=|( 100.0000 +- 0.00000 )%|
  NONLAZY_OR: UserAnalysis                                       #=200     Sum=200         Eff=|( 100.0000 +- 0.00000 )%|
   LAZY_AND: UserAlgorithms                                      #=200     Sum=200         Eff=|( 100.0000 +- 0.00000 )%|
    Gaudi__Examples__VoidConsumer/Gaudi__Examples__VoidConsumer  #=200     Sum=200         Eff=|( 100.0000 +- 0.00000 )%|
diff --git a/DaVinciTests/tests/refs/test_davinci_read_mc_mdf.ref b/DaVinciTests/tests/refs/test_davinci_read_mc_mdf.ref
index ee47973496c3da7fd2627c58bf0d5b971ac57d67..011beee446ac0297be27a3fe03838a920e50cb57 100644
--- a/DaVinciTests/tests/refs/test_davinci_read_mc_mdf.ref
+++ b/DaVinciTests/tests/refs/test_davinci_read_mc_mdf.ref
@@ -1,4 +1,3 @@
-INFO No MainOptions specified. DaVinci will import no options file!
 WARNING DV option file or main function not defined. No user algorithms will be used.
 ApplicationMgr    SUCCESS
 ====================================================================================================================================
@@ -6,15 +5,20 @@ ApplicationMgr    SUCCESS
 ApplicationMgr       INFO Application Manager Configured successfully
 DetectorPersistencySvc                 INFO Added successfully Conversion service:XmlCnvSvc
 DetectorDataSvc                     SUCCESS Detector description database: git:/lhcb.xml
+FSROutputStreamDstWriter               INFO Data source: EventDataSvc output: SVC='Gaudi::RootCnvSvc'
 EventClockSvc.FakeEventTime            INFO Event times generated from 0 with steps of 0
 ApplicationMgr                         INFO Application Manager Initialized successfully
 DeFTDetector                           INFO Current FT geometry version =   62
 ApplicationMgr                         INFO Application Manager Started successfully
-EventSelector                          INFO Stream:EventSelector.DataStreamTool_1 Def:DATAFILE='mdf:root://eoslhcb.cern.ch//eos/lhcb/wg/rta/WP2/Hlt2Throughput/minbias_filtered_1.mdf' SVC='LHCb::MDFSelector' OPT='READ' IgnoreChecksum='YES'
 EventSelector.DataStreamTool_1         INFO Compression:0 Checksum:1
 EventSelector                       SUCCESS Reading Event record 1. Record number within stream 1: 1
 ApplicationMgr                         INFO Application Manager Stopped successfully
+FSROutputStreamDstWriter               INFO Set up File Summary Record
+FSROutputStreamDstWriter               INFO Events output: 1
 LAZY_AND: DaVinci                                               #=200     Sum=200         Eff=|( 100.0000 +- 0.00000 )%|
+ NONLAZY_OR: FileSummaryRecords                                 #=200     Sum=200         Eff=|( 100.0000 +- 0.00000 )%|
+  LAZY_AND: GenFSR                                              #=200     Sum=200         Eff=|( 100.0000 +- 0.00000 )%|
+   RecordStream/FSROutputStreamDstWriter                        #=200     Sum=200         Eff=|( 100.0000 +- 0.00000 )%|
  NONLAZY_OR: UserAnalysis                                       #=200     Sum=200         Eff=|( 100.0000 +- 0.00000 )%|
   LAZY_AND: UserAlgorithms                                      #=200     Sum=200         Eff=|( 100.0000 +- 0.00000 )%|
    Gaudi__Examples__VoidConsumer/Gaudi__Examples__VoidConsumer  #=200     Sum=200         Eff=|( 100.0000 +- 0.00000 )%|
diff --git a/DaVinciTests/tests/refs/test_davinci_read_mc_xdigi.ref b/DaVinciTests/tests/refs/test_davinci_read_mc_xdigi.ref
index d939ad264e8dac2b1fe0d6fd22bfbee8611fb0d5..543336161c6cc447d9331ca32c32e1d4ad600b15 100644
--- a/DaVinciTests/tests/refs/test_davinci_read_mc_xdigi.ref
+++ b/DaVinciTests/tests/refs/test_davinci_read_mc_xdigi.ref
@@ -1,4 +1,3 @@
-INFO No MainOptions specified. DaVinci will import no options file!
 WARNING DV option file or main function not defined. No user algorithms will be used.
 ApplicationMgr    SUCCESS
 ====================================================================================================================================
@@ -6,15 +5,20 @@ ApplicationMgr    SUCCESS
 ApplicationMgr       INFO Application Manager Configured successfully
 DetectorPersistencySvc                 INFO Added successfully Conversion service:XmlCnvSvc
 DetectorDataSvc                     SUCCESS Detector description database: git:/lhcb.xml
+FSROutputStreamDstWriter               INFO Data source: EventDataSvc output: SVC='Gaudi::RootCnvSvc'
 EventClockSvc.FakeEventTime            INFO Event times generated from 0 with steps of 0
 ApplicationMgr                         INFO Application Manager Initialized successfully
 DeFTDetector                           INFO Current FT geometry version =   64
 ApplicationMgr                         INFO Application Manager Started successfully
 EventPersistencySvc                    INFO Added successfully Conversion service:RootCnvSvc
-EventSelector                          INFO Stream:EventSelector.DataStreamTool_1 Def:DATAFILE='root://eoslhcb.cern.ch//eos/lhcb/MC/Upgrade/XDIGI/00091825/0000/00091825_00000002_1.xdigi' SVC='Gaudi::RootEvtSelector' OPT='READ' IgnoreChecksum='YES'
 EventSelector                       SUCCESS Reading Event record 1. Record number within stream 1: 1
 ApplicationMgr                         INFO Application Manager Stopped successfully
+FSROutputStreamDstWriter               INFO Set up File Summary Record
+FSROutputStreamDstWriter               INFO Events output: 1
 LAZY_AND: DaVinci                                               #=200     Sum=200         Eff=|( 100.0000 +- 0.00000 )%|
+ NONLAZY_OR: FileSummaryRecords                                 #=200     Sum=200         Eff=|( 100.0000 +- 0.00000 )%|
+  LAZY_AND: GenFSR                                              #=200     Sum=200         Eff=|( 100.0000 +- 0.00000 )%|
+   RecordStream/FSROutputStreamDstWriter                        #=200     Sum=200         Eff=|( 100.0000 +- 0.00000 )%|
  NONLAZY_OR: UserAnalysis                                       #=200     Sum=200         Eff=|( 100.0000 +- 0.00000 )%|
   LAZY_AND: UserAlgorithms                                      #=200     Sum=200         Eff=|( 100.0000 +- 0.00000 )%|
    Gaudi__Examples__VoidConsumer/Gaudi__Examples__VoidConsumer  #=200     Sum=200         Eff=|( 100.0000 +- 0.00000 )%|
diff --git a/DaVinciTests/tests/refs/test_davinci_read_mc_xgen.ref b/DaVinciTests/tests/refs/test_davinci_read_mc_xgen.ref
index 8ebd779220545126f0934b201533193780789b27..c523a50311b59d527f0d1a79bbf57f1fb4a8d452 100644
--- a/DaVinciTests/tests/refs/test_davinci_read_mc_xgen.ref
+++ b/DaVinciTests/tests/refs/test_davinci_read_mc_xgen.ref
@@ -1,4 +1,3 @@
-INFO No MainOptions specified. DaVinci will import no options file!
 WARNING DV option file or main function not defined. No user algorithms will be used.
 ApplicationMgr    SUCCESS
 ====================================================================================================================================
@@ -6,17 +5,24 @@ ApplicationMgr    SUCCESS
 ApplicationMgr       INFO Application Manager Configured successfully
 DetectorPersistencySvc                 INFO Added successfully Conversion service:XmlCnvSvc
 DetectorDataSvc                     SUCCESS Detector description database: git:/lhcb.xml
+FSROutputStreamDstWriter               INFO Data source: EventDataSvc output: SVC='Gaudi::RootCnvSvc'
 EventClockSvc.FakeEventTime            INFO Event times generated from 0 with steps of 0
 ApplicationMgr                         INFO Application Manager Initialized successfully
 DeFTDetector                           INFO Current FT geometry version =   63
 ApplicationMgr                         INFO Application Manager Started successfully
 EventPersistencySvc                    INFO Added successfully Conversion service:RootCnvSvc
-EventSelector                          INFO Stream:EventSelector.DataStreamTool_1 Def:DATAFILE='root://eoslhcb.cern.ch//eos/lhcb/wg/dpa/wp3/testDV_read_xgen/Gauss-12143001-100ev-20211117.xgen' SVC='Gaudi::RootEvtSelector' OPT='READ' IgnoreChecksum='YES'
 EventSelector                       SUCCESS Reading Event record 1. Record number within stream 1: 1
 ApplicationMgr                         INFO Application Manager Stopped successfully
+FSROutputStreamDstWriter               INFO Set up File Summary Record
+FSROutputStreamDstWriter               INFO Events output: 1
 LAZY_AND: DaVinci                                               #=100     Sum=100         Eff=|( 100.0000 +- 0.00000 )%|
+ NONLAZY_OR: FileSummaryRecords                                 #=100     Sum=100         Eff=|( 100.0000 +- 0.00000 )%|
+  LAZY_AND: GenFSR                                              #=100     Sum=100         Eff=|( 100.0000 +- 0.00000 )%|
+   RecordStream/FSROutputStreamDstWriter                        #=100     Sum=100         Eff=|( 100.0000 +- 0.00000 )%|
  NONLAZY_OR: UserAnalysis                                       #=100     Sum=100         Eff=|( 100.0000 +- 0.00000 )%|
   LAZY_AND: UserAlgorithms                                      #=100     Sum=100         Eff=|( 100.0000 +- 0.00000 )%|
+   UnpackMCParticle/UnpackMCParticle                            #=100     Sum=100         Eff=|( 100.0000 +- 0.00000 )%|
+   UnpackMCVertex/UnpackMCVertex                                #=100     Sum=100         Eff=|( 100.0000 +- 0.00000 )%|
    Gaudi__Examples__VoidConsumer/Gaudi__Examples__VoidConsumer  #=100     Sum=100         Eff=|( 100.0000 +- 0.00000 )%|
 ToolSvc                                INFO Removing all tools created by ToolSvc
 ApplicationMgr                         INFO Application Manager Finalized successfully
diff --git a/DaVinciTests/tests/refs/test_davinci_recVertices.ref b/DaVinciTests/tests/refs/test_davinci_recVertices.ref
index c3ddaf0565b5e866cad843e87e6b0b7b85def1e7..3e0749f03b6e9d9c3a33ef8022ec95404d08835a 100644
--- a/DaVinciTests/tests/refs/test_davinci_recVertices.ref
+++ b/DaVinciTests/tests/refs/test_davinci_recVertices.ref
@@ -1,4 +1,3 @@
-INFO No MainOptions specified. DaVinci will import no options file!
 INFO User algorithm option_davinci_recVertices.alg_config imported successfully!
 ApplicationMgr    SUCCESS
 ====================================================================================================================================
diff --git a/DaVinciTests/tests/refs/test_davinci_simplejob.ref b/DaVinciTests/tests/refs/test_davinci_simplejob.ref
deleted file mode 100644
index d12a82e87055a8484facdcae8c8d01dda10e94be..0000000000000000000000000000000000000000
--- a/DaVinciTests/tests/refs/test_davinci_simplejob.ref
+++ /dev/null
@@ -1,23 +0,0 @@
-INFO No MainOptions specified. DaVinci will import no options file!
-WARNING DV option file or main function not defined. No user algorithms will be used.
-ApplicationMgr    SUCCESS
-====================================================================================================================================
-====================================================================================================================================
-ApplicationMgr       INFO Application Manager Configured successfully
-DetectorPersistencySvc                 INFO Added successfully Conversion service:XmlCnvSvc
-DetectorDataSvc                     SUCCESS Detector description database: git:/lhcb.xml
-EventClockSvc.FakeEventTime            INFO Event times generated from 0 with steps of 0
-ApplicationMgr                         INFO Application Manager Initialized successfully
-DeFTDetector                           INFO Current FT geometry version =   63
-ApplicationMgr                         INFO Application Manager Started successfully
-EventPersistencySvc                    INFO Added successfully Conversion service:RootCnvSvc
-EventSelector                          INFO Stream:EventSelector.DataStreamTool_1 Def:DATAFILE='root://eoslhcb.cern.ch//eos/lhcb/MC/Upgrade/LDST/00076720/0000/00076720_00000002_1.ldst' SVC='Gaudi::RootEvtSelector' OPT='READ' IgnoreChecksum='YES'
-EventSelector                       SUCCESS Reading Event record 1. Record number within stream 1: 1
-ApplicationMgr                         INFO Application Manager Stopped successfully
-LAZY_AND: DaVinci                                               #=10      Sum=10          Eff=|( 100.0000 +- 0.00000 )%|
- NONLAZY_OR: UserAnalysis                                       #=10      Sum=10          Eff=|( 100.0000 +- 0.00000 )%|
-  LAZY_AND: UserAlgorithms                                      #=10      Sum=10          Eff=|( 100.0000 +- 0.00000 )%|
-   Gaudi__Examples__VoidConsumer/Gaudi__Examples__VoidConsumer  #=10      Sum=10          Eff=|( 100.0000 +- 0.00000 )%|
-ToolSvc                                INFO Removing all tools created by ToolSvc
-ApplicationMgr                         INFO Application Manager Finalized successfully
-ApplicationMgr                         INFO Application Manager Terminated successfully
diff --git a/DaVinciTests/tests/refs/test_davinci_testfiledb.ref b/DaVinciTests/tests/refs/test_davinci_testfiledb.ref
index 38f6b9ef5162d8d95d11a3dc18bd749ff6fbd211..83e1185f2aa329aaef20ddcf865aac67e42fdcac 100644
--- a/DaVinciTests/tests/refs/test_davinci_testfiledb.ref
+++ b/DaVinciTests/tests/refs/test_davinci_testfiledb.ref
@@ -1,4 +1,3 @@
-INFO No MainOptions specified. DaVinci will import no options file!
 WARNING DV option file or main function not defined. No user algorithms will be used.
 ApplicationMgr    SUCCESS
 ====================================================================================================================================
diff --git a/DaVinciTests/tests/refs/test_davinci_user_algs.ref b/DaVinciTests/tests/refs/test_davinci_user_algs.ref
index e7b077920de58bf66dd8938ea3af6df5faf1a1b5..7e5126d3bfb40bd75db7d35703aa1af00a232143 100644
--- a/DaVinciTests/tests/refs/test_davinci_user_algs.ref
+++ b/DaVinciTests/tests/refs/test_davinci_user_algs.ref
@@ -1,4 +1,3 @@
-INFO No MainOptions specified. DaVinci will import no options file!
 INFO User algorithm option_davinci_user_algs.main imported successfully!
 ApplicationMgr    SUCCESS
 ====================================================================================================================================
diff --git a/Phys/DaVinci/options/DaVinciDB-Example.yaml b/Phys/DaVinci/options/DaVinciDB-Example.yaml
index 67b95981be726bb8e9d09d95adef805f778f7cf9..d91434fed080a295abb85b6c59e83335d3cef0ce 100644
--- a/Phys/DaVinci/options/DaVinciDB-Example.yaml
+++ b/Phys/DaVinci/options/DaVinciDB-Example.yaml
@@ -11,10 +11,7 @@
 
 Upgrade_genFSR_ldst:
    filenames:
-   - 'root://eoslhcb.cern.ch//eos/lhcb/cern-swtest/lhcb/swtest/genFSR/genfsr_upgrade0.ldst'
-   - 'root://eoslhcb.cern.ch//eos/lhcb/cern-swtest/lhcb/swtest/genFSR/genfsr_upgrade1.ldst'
-   - 'root://eoslhcb.cern.ch//eos/lhcb/cern-swtest/lhcb/swtest/genFSR/genfsr_upgrade2.ldst'
-   - 'root://eoslhcb.cern.ch//eos/lhcb/cern-swtest/lhcb/swtest/genFSR/genfsr_upgrade3.ldst'
+   - 'root://eoslhcb.cern.ch//eos/lhcb/cern-swtest/lhcb/swtest/genFSR/genfsr_upgrade[0-3].*'
    qualifiers:
       data_type: Upgrade
       input_type: LDST
@@ -28,13 +25,10 @@ Upgrade_genFSR_ldst:
 
 Upgrade_Bd2KstarMuMu_ldst:
    filenames:
-   - 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00076720/0000/00076720_00000002_1.ldst'
-   - 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00076720/0000/00076720_00000004_1.ldst'
-   - 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00076720/0000/00076720_00000043_1.ldst'
-   - 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00076720/0000/00076720_00000068_1.ldst'
+   - 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/*/0000/00076720_*_1.ldst'
    qualifiers:
       data_type: Upgrade
-      input_type: LDST
+      input_type: ROOT
       simulation: true
       conddb_tag: sim-20171127-vc-md100
       dddb_tag: dddb-20171126
@@ -45,10 +39,10 @@ Upgrade_Bd2KstarMuMu_ldst:
 
 Spruce_all_lines_dst:
    filenames:
-   - 'root://eoslhcb.cern.ch//eos/lhcb/wg/dpa/wp3/tests/spruce_all_lines_realtimereco_newPacking.dst'
+   - 'root://eoslhcb.cern.ch//eos/lhcb/wg/dpa/wp3/**/spruce_all_lines_realtimereco_newPacking.dst'
    qualifiers:
       data_type: Upgrade
-      input_type: DST
+      input_type: ROOT
       simulation: true
       conddb_tag: sim-20171127-vc-md100
       dddb_tag: dddb-20171126
@@ -59,7 +53,7 @@ Spruce_all_lines_dst:
 
 FEST_November_2021_dst:
    filenames:
-   - 'root://eoslhcb.cern.ch//eos/lhcb/wg/dpa/wp3/NovemberFEST/hlt2_D0_Kpi_10evts.dst'
+   - 'root://eoslhcb.cern.ch//eos/lhcb/wg/dpa/wp3/NovemberFEST/hlt2_D0_Kpi_1?evts.dst'
    qualifiers:
       data_type: Upgrade
       input_type: ROOT
@@ -126,4 +120,4 @@ test_passthrough_thor_lines:
    metadata:
       Author: 'Davide Fazzini'
       Data: '2022-05'
-      Comment: "DST file to test passthrough sample with hlt2 generic thor lines."
+      Comment: "DST file to test passthrough sample with hlt2 generic thor lines."
\ No newline at end of file
diff --git a/Phys/DaVinci/python/DaVinci/Configuration.py b/Phys/DaVinci/python/DaVinci/Configuration.py
index a108ba34815c1392a90968fac7a224bc8fb0daf2..8732e0b08e0c4350f2f703d2470a060d57bac370 100644
--- a/Phys/DaVinci/python/DaVinci/Configuration.py
+++ b/Phys/DaVinci/python/DaVinci/Configuration.py
@@ -11,14 +11,16 @@
 """
 High level configuration tools for DaVinci.
 """
+from GaudiKernel.ProcessJobOptions import importOptions
 from PyConf.application import ComponentConfig, configure, configure_input
 from PyConf.Algorithms import EventAccounting
 from GaudiConf import reading
-from DaVinci.configOptions import (check_options, set_job_options,
-                                   set_properties, set_args_options,
-                                   set_input_file_options)
+from DaVinci.configOptions import (
+    check_options, set_job_options, set_properties, set_args_options,
+    set_input_file_options, list_data_options, check_user_option_values)
 from DaVinci.algorithms import (setup_algorithms, define_fsr_writer,
-                                apply_filters_and_unpacking)
+                                apply_filters_and_unpacking,
+                                expand_input_files)
 from DaVinci.config import davinci_control_flow, prepare_davinci_nodes
 
 
@@ -26,7 +28,6 @@ def run_davinci_app(fileDB_key="",
                     fileDB_file="",
                     jobOpt_file="",
                     ctx_args=[],
-                    simple_job=False,
                     override_data_options=False,
                     prod_conf=False):
     """
@@ -63,27 +64,32 @@ def run_davinci_app(fileDB_key="",
     # Initialization in DVAppOptions class seems to be not sufficient.
     set_properties(options)
 
+    data_options = list_data_options(fileDB_key, fileDB_file)
+
     if fileDB_key and not prod_conf:
         set_input_file_options(options, fileDB_key, fileDB_file)
     if jobOpt_file:
-        set_job_options(options, jobOpt_file, fileDB_key, fileDB_file,
+        set_job_options(options, jobOpt_file, data_options,
                         override_data_options)
     if ctx_args:
-        set_args_options(options, ctx_args, fileDB_key, fileDB_file,
+        set_args_options(options, ctx_args, data_options,
                          override_data_options)
 
     config = ComponentConfig()
+    init_properties = options.properties()
+    user_algorithms, public_tools = setup_algorithms(options.user_algorithms)
+
+    if not override_data_options:
+        check_user_option_values(options, init_properties, data_options)
 
-    if simple_job:
-        config.update(add_simple_conf(options))
-    else:
-        config.update(add_davinci_configurables(options))
+    config.update(
+        add_davinci_configurables(options, user_algorithms, public_tools))
 
     if not prod_conf:
         return config
 
 
-def add_davinci_configurables(options):
+def add_davinci_configurables(options, user_algorithms, public_tools):
     """
     Run the job adding the specific Davinci configurables to the standard PyConf ones.
 
@@ -98,18 +104,21 @@ def add_davinci_configurables(options):
     dvMainFlow = {}
     fsrAlgs = {}
 
-    userAlgs, publicTools = setup_algorithms(options)
+    if options.main_options:
+        importOptions(options.main_options)
+
     # For xgen files we need to unpack only mc particles and vertices
     # Needed until unpacking will become functinal
     unpack_only_mc = options.input_type == "XGEN"
 
+    expand_input_files(options)
     check_options(options)
     config = configure_input(options)
 
     if options.annsvc_config:
         config.update(reading.set_hltAnn_svc(options.annsvc_config))
     dvMainFlow.update(
-        apply_filters_and_unpacking(options, userAlgs, unpack_only_mc))
+        apply_filters_and_unpacking(options, user_algorithms, unpack_only_mc))
 
     if options.write_fsr:
         if options.simulation:
@@ -123,28 +132,5 @@ def add_davinci_configurables(options):
                                       prepare_davinci_nodes(dvMainFlow),
                                       prepare_davinci_nodes(fsrAlgs))
 
-    config.update(configure(options, dvMainNode, public_tools=publicTools))
-    return config
-
-
-def add_simple_conf(options):
-    """
-    Run the job using only the standard PyConf configuration with any user algorithm.
-
-    Args:
-        options (DVAppOptions instance): list of DV options.
-
-    Returns:
-        ComponentConfig instance, a dict of configured Gaudi Configurable instances and user algorithms.
-    """
-    userAlgs, publicTools = setup_algorithms(options)
-
-    check_options(options)
-
-    dvNodes = prepare_davinci_nodes(userAlgs)
-    top_dv_node = davinci_control_flow(options, dvNodes)
-
-    config = configure_input(options)
-    config.update(configure(options, top_dv_node, public_tools=publicTools))
-
+    config.update(configure(options, dvMainNode, public_tools=public_tools))
     return config
diff --git a/Phys/DaVinci/python/DaVinci/algorithms.py b/Phys/DaVinci/python/DaVinci/algorithms.py
index c11d6da7e9ebd6435b970858ac9903bc67d17349..53db29c2a6d39af26f815615dd50b505db0a8837 100644
--- a/Phys/DaVinci/python/DaVinci/algorithms.py
+++ b/Phys/DaVinci/python/DaVinci/algorithms.py
@@ -10,7 +10,6 @@
 ###############################################################################
 
 import os, sys, importlib
-from GaudiKernel.ProcessJobOptions import importOptions
 from PyConf.Algorithms import (
     FilterDecays,
     LoKi__HDRFilter as HDRFilter,
@@ -27,30 +26,21 @@ from DaVinci.algorithms_pyconf import make_dvalgorithm
 from PyConf.components import force_location
 
 
-def setup_algorithms(options):
+def setup_algorithms(user_algs_name):
     """
     Set DaVinci algorithms.
 
     Args:
-        options: list of DaVinci options.
+        user_algs_name (str): user algorithm name.
 
     Returns:
         Dict of the algorithm instances to be run in the job.
         List of public tool instances to configure.
     """
-    opts = options.main_options
-    publicTools = []
-    dvAlgs = {}
-
-    if not opts == "":
-        importOptions(opts)
-    else:
-        log_click(
-            "INFO",
-            "No MainOptions specified. DaVinci will import no options file!")
+    public_tools = []
+    dv_algs = {}
 
-    userAlgName = options.user_algorithms
-    if not userAlgName:
+    if not user_algs_name:
         log_click(
             "WARNING",
             "DV option file or main function not defined. No user algorithms will be used."
@@ -58,12 +48,12 @@ def setup_algorithms(options):
         # Add a dummy algorithm in order to avoid errors from empty nodes
         from Gaudi.Configuration import ERROR
         from PyConf.Algorithms import Gaudi__Examples__VoidConsumer as VoidConsumer
-        dvAlgs = {"UserAlgorithms": [VoidConsumer(OutputLevel=ERROR)]}
+        dv_algs = {"UserAlgorithms": [VoidConsumer(OutputLevel=ERROR)]}
     else:
-        userAlgs, publicTools = setup_user_algorithms(userAlgName)
-        dvAlgs.update(userAlgs)
+        user_algs, public_tools = setup_user_algorithms(user_algs_name)
+        dv_algs.update(user_algs)
 
-    return dvAlgs, publicTools
+    return dv_algs, public_tools
 
 
 def set_filter(name, code, dec_reports):
@@ -71,9 +61,9 @@ def set_filter(name, code, dec_reports):
     Adding an HDR filter to FunTuple algorithms checking if the corresponding HLT/Sprucing line fired.
 
     Args:
-        name: filter's name.
-        code: filter's code.
-        dec_reports: HltDecReportsDecoder containing the configuration for HLT/Sprucing lines.
+        name (str): filter's name.
+        code (str): filter's code.
+        dec_reports (HltDecreportsDecoder instance): HltDecReportsDecoder containing the configuration for HLT/Sprucing lines.
 
     Returns:
         Filter with name and code defined by the user.
@@ -94,8 +84,8 @@ def add_filter(name, code):
     Adding an event pre-filter using a code defined by the user.
 
     Args:
-        name: filter's name.
-        code: filter's code.
+        name (str): filter's name.
+        code (str): filter's code.
 
     Returns:
         Filter with name and code defined by the user.
@@ -117,9 +107,9 @@ def apply_filters_and_unpacking(options, algs_dict, unpack_only_mc):
     Adding filter and unpacking algorithms.
 
     Args:
-        options: list of DaVinci options.
-        algs_dict: dict of the user algorithms.
-        unpack_only_mc: flag to unpack only mc particles and vertices.
+        options (DVAppOptions instance): list of DaVinci options.
+        algs_dict (dict): dict of the user algorithms.
+        unpack_only_mc (bool): flag to unpack only mc particles and vertices.
         (TO BE REMOVED WHEN THE UNPACKING WILL BECOME FUNCTIONAL)
 
     Returns:
@@ -151,7 +141,7 @@ def define_fsr_writer(options):
     Define Generator FSR writer.
 
     Args:
-        options: list of DaVinci options.
+        options (DVAppOptions instance): list of DaVinci options.
 
     Returns:
         List of FSR algorithm instances to be configured.
@@ -178,7 +168,7 @@ def setup_user_algorithms(userAlgPath):
     Set user algorithms and return a PyConf node.
 
     Args:
-        userAlgPath: path to the file containing the algorithms and tools defined by the user.
+        userAlgPath (str): path to the file containing the algorithms and tools defined by the user.
 
     Returns:
         Dict of user algorithm instances to be run in the job.
@@ -248,8 +238,8 @@ def unpack_locations(options, unpack_only_mc):
     (TO BE REMOVED WHEN THE UNPACKING WILL BECOME FUNCTIONAL)
 
     Args:
-       - options: list of DaVinci options.
-       - unpack_only_mc: flag to unpack only mc particles and vertices.
+       - options (DVAppOptions instance): list of DaVinci options.
+       - unpack_only_mc (bool): flag to unpack only mc particles and vertices.
 
     Returns:
        - List of unpacking algorithms.
@@ -324,8 +314,8 @@ def get_hlt_reports(options, source=''):
     Set the Hlt service and algorithms.
 
     Args:
-       - options: list of DaVinci options.
-       - source: source ID required by the user.
+       - options (DVAppOptions instance): list of DaVinci options.
+       - source (str): source ID required by the user.
 
     Returns:
        - HltDecReportsDecoder containing the configuration for hlt2 lines.
@@ -402,7 +392,7 @@ def get_odin(dv_options):
     Function to get the LHCb::ODIN location
 
     Args:
-        dv_options: Configured DaVinci.options object
+        dv_options (DVAppOptions instance): Configured DaVinci.options object
     Returns:
         odin_loc: Location of the LHCb::ODIN
     """
@@ -423,7 +413,7 @@ def get_decreports(sel_stage, dv_options):
 
     Args:
         sel_state (str): Selction stage can be "Hlt1" or "Hlt2" or "Spruce" (There does not seem to be a decoder for Hlt1 currently)
-        dv_options: Configured DaVinci.options object
+        dv_options (DVAppOptions instance): Configured DaVinci.options object
     Returns:
         dec_loc: Location of the LHCb::DecReports for HLT1 or Hlt2 or Spruce
     """
@@ -466,3 +456,31 @@ def filter_on(location, decay_descriptor=None, bank_type=None):
     if decay_descriptor:
         data = apply_algorithm([data], FilterDecays, Code=decay_descriptor)
     return data
+
+
+def expand_input_files(options):
+    """
+    Function to expand input files list including all the files matching 
+    a specified pattern according to the rules used by Unix (uses `glob`).
+
+    Args:
+        options (DVAppOptions instance): list of DaVinci options.
+    """
+    expanded_files = []
+    for file_name in options.input_files:
+        if "root://eoslhcb.cern.ch//" in file_name:
+            import XRootD.client as c
+            # Workaround since file with a prefix before 'root://'
+            # as ('mdf:', 'PFN:') are not expanded correctly with .glob
+            if ":root" in file_name:
+                prefix, file_name = file_name.split(":", 1)
+                expanded_files.extend(
+                    [f"{prefix}:{f}" for f in c.glob(file_name)])
+            else:
+                expanded_files.extend(c.glob(file_name))
+        else:
+            import glob
+            expanded_files.extend(glob.glob(file_name, recursive=True))
+
+    expanded_files = sorted(expanded_files)
+    options.input_files = expanded_files
diff --git a/Phys/DaVinci/python/DaVinci/configOptions.py b/Phys/DaVinci/python/DaVinci/configOptions.py
index 91ac47a11eab0e55f43e3f20a2b242c9ddc2f678..4f3c95e70dd6360571dc66d973cf4510d5c176ee 100644
--- a/Phys/DaVinci/python/DaVinci/configOptions.py
+++ b/Phys/DaVinci/python/DaVinci/configOptions.py
@@ -22,9 +22,9 @@ def set_option_value(options, name, value):
     Set option value for a given name.
 
      Args:
-         options: list of DaVinci options.
-         name: name of the option of interest.
-         value: value to be set.
+         options (DVAppOptions instance): list of DaVinci options.
+         name (str): name of the option of interest.
+         value (str): value to be set.
     """
     # Properties value passed by command line are always interpreted as string
     # Numerical values are converted automatically but this is not true for boolean
@@ -50,9 +50,9 @@ def set_input_file_options(options, fileDB_key, fileDB_file):
     does, but the latter acts on a TestFileDB entry.
 
     Args:
-        options: list of DaVinci options.
-        fileDB_key: key in the testfileDB.
-        fileDB_file: file containing the testfileDB.
+        options (DVAppOptions instance): list of DaVinci options.
+        fileDB_key (str): key in the testfileDB.
+        fileDB_file (str): file containing the testfileDB.
     """
     if fileDB_file == "TestFileDB":
         options.set_input_and_conds_from_testfiledb(fileDB_key)
@@ -61,51 +61,38 @@ def set_input_file_options(options, fileDB_key, fileDB_file):
         with open(os.path.expandvars(fileDB_file)) as fileDB:
             test_file_db = yaml.safe_load(fileDB)
 
-        # File index for running job only on a specific file in the testfileDB list.
-        # File number specified with ":" (e.g. key:2). Dafault -1 for running over all the files.
-        idxFile = -1
-        if ":" in fileDB_key:
-            idxFile = int(fileDB_key.split(":")[1])
-            fileDB_key = fileDB_key.split(":")[0]
+        valid_properties = ['filenames', 'qualifiers', 'metadata']
 
         # Given a specific key, loop over the elements of the testfileDB
         for item, obj in test_file_db[fileDB_key].items():
+            # Check if there are no typo in the fileDB properties
+            if item not in valid_properties:
+                message = f"Property {item} not recognised! Please check the key {fileDB_key} in {fileDB_file}\n"
+                message += f"Valid property names: {valid_properties}"
+                raise DVOptionError(item, message)
+
             # Set all the file quelifiers:
             if item == 'qualifiers':
                 for prop, value in obj.items():
                     set_option_value(options, prop, value)
             # set the input files:
             elif item == 'filenames':
-                # if file index is not -1, select only the corresponding file from the list in testfileDB.
-                if idxFile > -1:
-                    # Check that the index element exists
-                    if idxFile < len(obj):
-                        set_option_value(options, "input_files",
-                                         [obj[idxFile]])
-                    else:
-                        raise ValueError(
-                            'Index file exceeds the number of available files related to the given key!'
-                        )
-                else:
-                    set_option_value(options, "input_files", obj)
-
-
-def set_job_options(options, jobOptFile, fileDB_key, fileDB_file,
-                    override_data_options):
+                set_option_value(options, "input_files", obj)
+
+
+def set_job_options(options, jobOptFile, dataOptions, override_data_options):
     """
     Set the job properties required by the user. The method checks if there
     are options related to the input files selected with key and file of the
     testfileDB, if yes it checks if the option is settable.
 
     Args:
-        options: list of DaVinci options.
-        jobOptFile: file containing the job options chosen by the user.
-        fileDB_key: key in the testfileDB.
-        fileDB_file: file containing the testfileDB.
-        override_data_options: boolean for enabling data options override.
+        options (DVAppOptions instance): list of DaVinci options.
+        jobOptFile (str): file containing the job options chosen by the user.
+        fileDB_key (str): key in the testfileDB.
+        fileDB_file (str): file containing the testfileDB.
+        override_data_options (bool): boolean for enabling data options override.
     """
-    dataOptions = list_data_options(fileDB_key.split(":")[0], fileDB_file)
-
     with open(os.path.expandvars(jobOptFile)) as config_file:
         _, ext = os.path.splitext(jobOptFile)
         if ext in (".yaml", ".yml", ".json"):
@@ -125,20 +112,17 @@ def set_job_options(options, jobOptFile, fileDB_key, fileDB_file,
                 set_option_value(options, key, value)
 
 
-def set_args_options(options, ctx_args, fileDB_key, fileDB_file,
-                     override_data_options):
+def set_args_options(options, ctx_args, dataOptions, override_data_options):
     """
     Set the extra arguments required by the user.
 
     Args:
-        options: list of DaVinci options.
-        ctx_args: click context.
-        fileDB_key: key in the testfileDB.
-        fileDB_file: file containing the testfileDB.
-        override_data_options: boolean for enabling data options override.
+        options (DVAppOptions instance): list of DaVinci options.
+        ctx_args (list): click context.
+        fileDB_key (str): key in the testfileDB.
+        fileDB_file (str): file containing the testfileDB.
+        override_data_options (bool): boolean for enabling data options override.
     """
-    dataOptions = list_data_options(fileDB_key.split(":")[0], fileDB_file)
-
     # Loop over the properties and set their values
     for i in range(0, len(ctx_args), 2):
         key = ctx_args[i][2:]
@@ -158,10 +142,10 @@ def is_option_settable(options, name, dataOptions, override_data_options):
     using the information found in the testfileDB.
 
     Args:
-        options: list of DaVinci options.
-        name: name of the option to be checked.
-        dataOptions: list of options related to the input data.
-        override_data_options: boolean for enabling data options override.
+        options (DVAppOptions instance): list of DaVinci options.
+        name (str): name of the option to be checked.
+        dataOptions (list): list of options related to the input data.
+        override_data_options (bool): boolean for enabling data options override.
     Raises:
         DVRuntimeError: if 'override_data_options' is set and input 'name' is a data option.
     """
@@ -188,8 +172,8 @@ def list_data_options(fileDB_key, fileDB_file):
     Get the list of the properties that are set automatically given a dataset.
 
     Args:
-        fileDB_key: key in the testfileDB.
-        fileDB_file: file containing the testfileDB.
+        fileDB_key (str): key in the testfileDB.
+        fileDB_file (str): file containing the testfileDB.
     """
     import yaml
 
@@ -215,7 +199,7 @@ def check_options(options):
     Check the options. Applies changes if needed.
 
     Args:
-        options: list of DaVinci options.
+        options (DVAppOptions instance): list of DaVinci options.
     """
     dataType = options.data_type
     option_checker("data_type", dataType)
@@ -249,6 +233,29 @@ def check_options(options):
 
 
 def set_properties(options):
+    """
+    Function to initialise the DaVinci options.
+
+    Args:
+        options (DVAppOptions instance): list of DaVinci options.
+    """
     for name, default in options.getDefaultProperties().items():
         if not options.isPropertySet(name):
             options.setProp(name, default)
+
+
+def check_user_option_values(options, init_properties, data_options):
+    """
+    Method checking if options related to the input files have been changed in the
+    user algorithms .py file and if these options are settable.
+
+    Args:
+        options (DVAppOptions instance): list of DaVinci options.
+        init_properties (dict): DaVinci options values before importing the user algorithms.
+        data_options (list): list of input data properties.
+    """
+    properties = options.properties()
+    for key, value in properties.items():
+        init_value = init_properties[key]
+        if init_value != value:
+            assert is_option_settable(options, key, data_options, False)
diff --git a/Phys/DaVinci/python/DaVinci/optionChecker.py b/Phys/DaVinci/python/DaVinci/optionChecker.py
index d2e1f887080ef9ac358cd31dc5f0cd4bb866e7f7..5571166962f1dec6308cfe866b753c90fdf26de8 100644
--- a/Phys/DaVinci/python/DaVinci/optionChecker.py
+++ b/Phys/DaVinci/python/DaVinci/optionChecker.py
@@ -89,6 +89,10 @@ class DVKeyError(KeyError):
 def option_checker(name, value):
     """
     Check the correctness of a DaVinci configurable option.
+
+    Args:
+        name (str): DaVinci option name
+        value: value to be checked
     """
     from DaVinci.options_default import __optsDict__ as dv_default
 
@@ -110,6 +114,13 @@ def option_checker(name, value):
 
 
 def get_allowed_option_values():
+    """
+    Return the allowed values for the DaVinci options accepting 
+    specific inputs.
+
+    Returns:
+        dict containing the allowed values. 
+    """
     allowedValues = {
         "data_type": ["Upgrade"],
         "detectors": [
diff --git a/Phys/DaVinci/python/DaVinci/utilities_script.py b/Phys/DaVinci/python/DaVinci/utilities_script.py
index c89a568c570a7911fb7d9803cb53d1bbf6f1bc54..f08ae441c33d53eaa709f13091c6340179d00299 100644
--- a/Phys/DaVinci/python/DaVinci/utilities_script.py
+++ b/Phys/DaVinci/python/DaVinci/utilities_script.py
@@ -18,10 +18,10 @@ def dump_call(testfiledb_file, testfiledb_key, joboptfile, ctx_args):
     Print out all the davinci options used to run the job by means of the 'davinci' script.
 
     Args:
-       - testfiledb_file: TestFileDB-like file with job input information (1st davinci argument, 1st slot).
-       - testfiledb_key: relevant key to be looked for in the TestFileDB-like file (1st davinci argument, 2nd slot).
-       - joboptfile: file containing the job option information (2nd davinci argument).
-       - ctx_args: array with the remnant options passed to davinci by command line.
+       - testfiledb_file (str): TestFileDB-like file with job input information (1st davinci argument, 1st slot).
+       - testfiledb_key (str) relevant key to be looked for in the TestFileDB-like file (1st davinci argument, 2nd slot).
+       - joboptfile (str): file containing the job option information (2nd davinci argument).
+       - ctx_args (list): array with the remnant options passed to davinci by command line.
     """
     import click
 
@@ -45,8 +45,8 @@ def get_configurable_opts(configurables, with_defaults):
     in a dictionary.
 
     Args:
-       - configurables: list of configurables to be passed to Gaudi.
-       - with_defaults: flag to set the default values.
+       - configurables (dict): list of configurables to be passed to Gaudi.
+       - with_defaults (bool): flag to set the default values.
 
     Returns:
        - opts: dictionary containing all the configurables.
@@ -127,7 +127,7 @@ def create_jobopt_template(file_name="jobopt_template.yaml",
 
     Args:
         file_name (str): name for the output template file. Default = 'jobopt_template.yaml'.
-        interactive (bool): flag to create the template interactively.
+        interactive (bool, optional): flag to create the template interactively.
 
     Output:
         the template file with job options and the name defined by the user.
diff --git a/Phys/DaVinci/tests/config/test_algorithms.py b/Phys/DaVinci/tests/config/test_algorithms.py
index 26e7f3cf4b932a304ada04307c71a460b76d0d2c..ea4d5a36057a73a9868127bcfea2c98269368881 100644
--- a/Phys/DaVinci/tests/config/test_algorithms.py
+++ b/Phys/DaVinci/tests/config/test_algorithms.py
@@ -21,25 +21,6 @@ from DaVinci.algorithms import (setup_algorithms, define_fsr_writer, filter_on,
                                 configured_FunTuple, get_odin, get_decreports)
 
 
-def test_import_main_options():
-    """
-    Check if a configurable .opts file can be imported correctly in DaVinci.
-    """
-    filename = "test_options.opts"
-    with open(filename, "w") as f:
-        f.write("DVAppOptions.enable_unpack = True;\n")
-        f.write("DVAppOptions.evt_max = 5;\n")
-        f.close()
-
-    options.main_options = filename
-    options.user_algorithms = ""
-    setup_algorithms(options)
-    os.remove(filename)
-
-    # Restore default value avoid failure in the next tests
-    options.main_options = ""
-
-
 def test_set_user_algorithms():
     """
     Check if DaVinci can import correctly an external user algorithm implemented in a given Python module.
@@ -60,7 +41,7 @@ def main():
 """)
 
     options.user_algorithms = f"{filename}:main"
-    test_algs, _ = setup_algorithms(options)
+    test_algs, _ = setup_algorithms(options.user_algorithms)
     assert "testAlg" in test_algs
 
     os.remove(f"{filename}.py")
diff --git a/Phys/DaVinci/tests/config/test_configOptions.py b/Phys/DaVinci/tests/config/test_configOptions.py
index b75a815720d29b483b4e3e0606dda4464b2cafdc..21152b4c4237fa2fc290634961ab6bf04bc588ad 100644
--- a/Phys/DaVinci/tests/config/test_configOptions.py
+++ b/Phys/DaVinci/tests/config/test_configOptions.py
@@ -107,32 +107,13 @@ def test_set_input_file_from_userDB():
     assert not options.input_files == []
 
 
-def test_select_input_file_by_index():
-    """
-    Check if DaVinci selects only a specific file from the ones listed in the database
-    if the file index is provided after the database key.
-    """
-    key = f"{fileDB_key}:3"
-    set_input_file_options(options, key, fileDB_file)
-    assert len(options.input_files) == 1
-
-
-def test_wrong_input_file_index():
-    """
-    Check that DaVinci raises an error if the file index is higher than the number of 
-    input files available in the TestFileDB-like database.
-    """
-    key = f"{fileDB_key}:100"
-    with pytest.raises(ValueError):
-        set_input_file_options(options, key, fileDB_file)
-
-
 def test_job_options_from_py_file():
     """
     Check if DaVinci sets correctly an option value when reading a .py job option file.
     Check also the .py example is well formatted and readable by DaVinci.
     """
-    set_job_options(options, f"{jobOpt_file}.py", "", "", False)
+    data_options = list_data_options(fileDB_key, fileDB_file)
+    set_job_options(options, f"{jobOpt_file}.py", data_options, False)
     assert options.evt_max == 100
 
 
@@ -141,7 +122,8 @@ def test_job_options_from_yaml_file():
     Check if DaVinci sets correctly an option value when reading a .yaml job option file.
     Check also the .yaml example is well formatted and readable by DaVinci.
     """
-    set_job_options(options, f"{jobOpt_file}.yaml", "", "", False)
+    data_options = list_data_options(fileDB_key, fileDB_file)
+    set_job_options(options, f"{jobOpt_file}.yaml", data_options, False)
     assert options.evt_max == 100
 
 
@@ -155,7 +137,8 @@ def test_job_options_from_unknown_file():
         f.write("evt_max: 100")
         f.close()
     with pytest.raises(ValueError):
-        set_job_options(options, job_opt_name, "", "", False)
+        data_options = list_data_options(fileDB_key, fileDB_file)
+        set_job_options(options, job_opt_name, data_options, False)
     os.remove(job_opt_name)
 
 
diff --git a/Phys/DaVinci/tests/config/test_configuration.py b/Phys/DaVinci/tests/config/test_configuration.py
index 6354eb781e09b3e0dbb5b649b739a716dc2f4fb2..867a4d4c6c9496e2e7be3b95f024086fb42a8b1a 100644
--- a/Phys/DaVinci/tests/config/test_configuration.py
+++ b/Phys/DaVinci/tests/config/test_configuration.py
@@ -32,18 +32,6 @@ def test_run_app_dummy():
     assert isinstance(configurables, ComponentConfig)
 
 
-def test_run_simple_job():
-    """
-    Check if DaVinci is able to set correctly the control flow application when running a simple job.
-    """
-    config = run_davinci_app(
-        fileDB_key="Upgrade_Bd2KstarMuMu",
-        fileDB_file="TestFileDB",
-        jobOpt_file=DIR / "../../options/jobOptions-Example.yaml",
-        simple_job=True)
-    assert "HLTControlFlowMgr/HLTControlFlowMgr" in config
-
-
 def test_set_hltAnnSvc():
     """
     Check if DaVinci is able to set correctly the HltAnnSvc given a specific .tck.json file.
@@ -114,3 +102,24 @@ def test_run_davinci():
 
     # Run davinci
     run_davinci(options, user_algs={"DVselection": [simple_histos]})
+
+
+def test_import_main_options():
+    """
+    Check if a configurable .opts file can be imported correctly in DaVinci.
+    """
+    filename = "test_options.opts"
+    with open(filename, "w") as f:
+        f.write("DVAppOptions.enable_unpack = True;\n")
+        f.write("DVAppOptions.evt_max = 5;\n")
+        f.close()
+
+    options.main_options = filename
+    options.lumi = False
+    run_davinci_app()
+
+    import os
+    os.remove(filename)
+
+    # Restore default value avoid failure in the next tests
+    options.main_options = ""