Skip to content

Commit

Permalink
Make the test also read and produce some collections
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell committed Dec 9, 2024
1 parent f7a55d5 commit 46f5b56
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion test/k4FWCoreTest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ set_tests_properties(FunctionalWrongImport PROPERTIES PASS_REGULAR_EXPRESSION "I
add_test_with_env(FunctionalReadNthEvent options/ExampleFunctionalReadNthEvent.py PROPERTIES DEPENDS FunctionalProducer ADD_TO_CHECK_FILES)
add_test_with_env(FunctionalProducerRNTuple options/ExampleFunctionalProducerRNTuple.py ADD_TO_CHECK_FILES)
add_test_with_env(FunctionalTTreeToRNTuple options/ExampleFunctionalTTreeToRNTuple.py PROPERTIES DEPENDS FunctionalProducer ADD_TO_CHECK_FILES)
add_test_with_env(GaudiFunctional options/ExampleGaudiFunctional.py)
add_test_with_env(GaudiFunctional options/ExampleGaudiFunctional.py PROPERTIES DEPENDS FunctionalProducer ADD_TO_CHECK_FILES)


# The following is done to make the tests work without installing the files in
Expand Down
14 changes: 9 additions & 5 deletions test/k4FWCoreTest/options/ExampleGaudiFunctional.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,23 @@
# data

from Gaudi.Configuration import INFO
from Configurables import ExampleGaudiFunctionalProducer
from Configurables import ExampleGaudiFunctionalProducer, ExampleFunctionalTransformer
from Configurables import EventDataSvc
from k4FWCore import ApplicationMgr, IOSvc

svc = IOSvc("IOSvc")
svc.Output = "functional_transformer.root"
svc.Input = "functional_producer.root"
svc.Output = "gaudi_functional.root"

producer = ExampleGaudiFunctionalProducer("Producer", OutputCollectionName="Output")
gaudi_producer = ExampleGaudiFunctionalProducer("GaudiProducer", OutputCollectionName="Output")
transformer = ExampleFunctionalTransformer(
"Transformer", InputCollection=["MCParticles"], OutputCollection=["NewMCParticles"]
)

mgr = ApplicationMgr(
TopAlg=[producer],
TopAlg=[gaudi_producer, transformer],
EvtSel="NONE",
EvtMax=3,
EvtMax=-1,
ExtSvc=[EventDataSvc("EventDataSvc")],
OutputLevel=INFO,
)
1 change: 1 addition & 0 deletions test/k4FWCoreTest/scripts/CheckOutputFiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ def check_metadata(filename, expected_metadata):


check_collections("functional_transformer.root", ["MCParticles", "NewMCParticles"])
check_collections("gaudi_functional.root", ["MCParticles", "NewMCParticles"])
check_collections("functional_transformer_cli.root", ["MCParticles", "NewMCParticles"])
check_collections(
"functional_transformer_multiple.root",
Expand Down

0 comments on commit 46f5b56

Please sign in to comment.