Skip to content

Commit

Permalink
Rename the collections
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell committed Jul 27, 2023
1 parent 2ed0ecd commit 438abb8
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions test/k4FWCoreTest/options/runExampleFunctionalConsumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@

inp = PodioInput()
inp.collections = [
"ExampleInt",
"MCParticles",
]

consumer = ExampleFunctionalConsumer("ExampleFunctionalConsumer",
InputLocation="/Event/ExampleInt",
InputLocation="MCParticles",
)

ApplicationMgr(TopAlg=[inp, consumer],
Expand Down
2 changes: 1 addition & 1 deletion test/k4FWCoreTest/options/runExampleFunctionalProducer.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
out.outputCommands = ["keep *"]

producer = ExampleFunctionalProducer("ExampleFunctionalProducer",
OutputLocation="ExampleInt",
OutputLocation="MCParticles",
ExampleInt=5)

ApplicationMgr(TopAlg=[producer, out],
Expand Down
8 changes: 4 additions & 4 deletions test/k4FWCoreTest/options/runExampleFunctionalTransformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@

inp = PodioInput()
inp.collections = [
"ExampleInt",
"MCParticles",
]

out = PodioOutput("out")
out.filename = "output_k4test_exampledata_transformer.root"
# Use this to keep all the existing collections in the input file
out.outputCommands = ["drop ExampleInt"]
out.outputCommands = ["drop MCParticles"]

transformer = ExampleFunctionalTransformer("ExampleFunctionalTransformer",
InputLocation="ExampleInt",
OutputLocation="ExampleDoubles")
InputLocation="MCParticles",
OutputLocation="NewMCParticles")

ApplicationMgr(TopAlg=[inp, transformer, out],
EvtSel="NONE",
Expand Down
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ using colltype = DataWrapper<podio::CollectionBase>;
struct ExampleFunctionalConsumer final : Gaudi::Functional::Consumer<void(const colltype& input), BaseClass_t> {

ExampleFunctionalConsumer( const std::string& name, ISvcLocator* svcLoc )
: Consumer( name, svcLoc, KeyValue("InputLocation", "/ExampleInt")) {}
: Consumer( name, svcLoc, KeyValue("InputLocation", "MCParticles")) {}

// This is the function that will be called to transform the data
// Note that the function has to be const, as well as all pointers to collections
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ using colltype = DataWrapper<edm4hep::MCParticleCollection>;
struct ExampleFunctionalProducer final : Gaudi::Functional::Producer<colltype(), BaseClass_t> {

ExampleFunctionalProducer( const std::string& name, ISvcLocator* svcLoc )
: Producer( name, svcLoc, KeyValue( "OutputLocation", "/ExampleInt" ) ) {}
: Producer( name, svcLoc, KeyValue( "OutputLocation", "MCParticles" ) ) {}

// This is the function that will be called to produce the data
colltype operator()() const override {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ struct ExampleFunctionalTransformer final :
Gaudi::Functional::Transformer<colltype_out(const colltype_in&), BaseClass_t> {

ExampleFunctionalTransformer( const std::string& name, ISvcLocator* svcLoc )
: Transformer( name, svcLoc, KeyValue("InputLocation", "/ExampleInt"),
KeyValue( "OutputLocation", "/ExampleDouble" ) ) {}
: Transformer( name, svcLoc, KeyValue("InputLocation", "MCParticles"),
KeyValue( "OutputLocation", "NewMCParticles" ) ) {}

// This is the function that will be called to transform the data
// Note that the function has to be const, as well as all pointers to collections
Expand Down

0 comments on commit 438abb8

Please sign in to comment.