Skip to content

Commit

Permalink
Improve info message, return an empty collection
Browse files Browse the repository at this point in the history
which is enough for this example
  • Loading branch information
jmcarcell committed Sep 27, 2024
1 parent 833bf55 commit 0aeb3fb
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions k4ProjectTemplate/src/components/ExampleTransformer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
* limitations under the License.
*/

#include "edm4hep/MCParticleCollection.h"
#include "k4FWCore/Transformer.h"

#include "edm4hep/MCParticleCollection.h"

#include <string>

struct ExampleTransformer final
Expand All @@ -29,12 +30,8 @@ struct ExampleTransformer final
{KeyValues("ExampleTransformerOutputLocation", {"/OutputExampleInt"})}) {}

edm4hep::MCParticleCollection operator()(const edm4hep::MCParticleCollection& input) const override {
info() << "ExampleInt = " << input << endmsg;
auto out = edm4hep::MCParticleCollection();
for (const auto& mc : input) {
out.push_back(mc);
}
return out;
info() << input << endmsg;
return edm4hep::MCParticleCollection();
}
};

Expand Down

0 comments on commit 0aeb3fb

Please sign in to comment.