-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Gaudi::Functional, add examples and adapt PodioInput to use Gaudi::Functional #129
Merged
Merged
Changes from all commits
Commits
Show all changes
68 commits
Select commit
Hold shift + click to select a range
dbc4808
Add example producer
jmcarcell dbfe999
Up
jmcarcell 3c40628
Up
jmcarcell f74c865
Up
jmcarcell 28a35c1
Update the example producer
jmcarcell bdbcf73
Change to Functional Producer
jmcarcell ae4f679
Add a consumer, producer and transformer
jmcarcell 3d88081
Remove deleted file
jmcarcell 26e08e8
Add some information in the README about Gaudi::Functional
jmcarcell b2b50da
Add the functional code and tests
jmcarcell 40a9af3
Add comments and cleanup to the functional algorithms
jmcarcell a03296a
Rename some some files
jmcarcell 66b454e
Rename to ExampleFunctional
jmcarcell a3d616d
Update the option files and a producer with multiple outputs
jmcarcell a9b050f
Rename also in CMakeLists.txt
jmcarcell 2db8c79
Add missing include
jmcarcell a8ef480
Add more information in the README
jmcarcell 673044a
Fix ExampleFunctionalTransformer
jmcarcell 30578ab
Add a constructor for unique_ptrs and change getData to const
jmcarcell 6f8910e
Move PodioInput to use Gaudi::Functional
jmcarcell 5d7fa0c
Allow not being the owner in DataWrapper.h
jmcarcell 4ce096c
Fix some collection names
jmcarcell 31e5855
Rename the collections
jmcarcell 38cb3b1
Remove cout
jmcarcell ac42a85
Change to dynamic_cast
jmcarcell 06b611d
Improve slightly the interface for reading
jmcarcell 1fc6d10
Rename a couple of variables
jmcarcell 45a2080
Add a Consumer with multiple inputs
jmcarcell f703cc8
Rename output keys
jmcarcell 4861d11
Fix the ExampleFunctionalTransformer test
jmcarcell 69d1bf2
Improve the FunctionalConsumerMultiple test
jmcarcell a7235df
Change from asserts to ifs
jmcarcell f462c8c
Add a functional test from many to many
jmcarcell 3774a90
Rename handlers
jmcarcell acf7d53
Add an options file to run the TransformerMultiple
jmcarcell 26d8281
Fix tests in parallel and fix the transformer multiple test
jmcarcell e86829d
Improve documentation and rename the input and output collections
jmcarcell fe718e7
Run clang-format
jmcarcell d6d0331
Run clang-format
jmcarcell 64df3c1
Run clang-format
jmcarcell 65a2573
Add root files to the gitignore
jmcarcell 545a75b
Fix gitignore
jmcarcell 80f48c8
Improve the interface for producers
jmcarcell 638f7e5
Fix name
jmcarcell cb6139f
Fix the producers
jmcarcell 57f7c2b
Fix tests
jmcarcell da2107e
Fix the consumer tests
jmcarcell 5294aab
Fix tests
jmcarcell 51890e0
Add registering template, simplify input interfaces for functional algs
jmcarcell f58bc21
Rename FunctionalUtils.h to BaseClass.h
jmcarcell 5b0d022
Don't include the datawrappers
jmcarcell 9e79c83
Reorganize imports
jmcarcell 8ae87a3
Remove CollName from the arguments of maybeRead
jmcarcell b5840e8
Produce an empty MCParticleCollection in the exampleFunctionalProduce…
jmcarcell 89b29ee
Fix a maybeRead call since type was removed in a previous commit
jmcarcell f5a5040
Fix the tests after the producer multiple outputs two MCParticleColle…
jmcarcell f185ca3
Add a comment explaining a test dependency
jmcarcell 4e3ee36
Remove the podio/CollectionBase.h include
jmcarcell cbf9987
Adress comments from PR
jmcarcell 716c5c4
Add header explaining each functional test
jmcarcell 6849e50
Add tests chaining functional algorithms and mixing them with the old…
jmcarcell 8baed4b
Remove some unneeded includes
jmcarcell 39d560c
Fix the wrong name of a test
jmcarcell b80a6cb
Run clang-format
jmcarcell bda0c3c
Fix licenses
jmcarcell 86750a4
Fix remaining licenses
jmcarcell 550d7c8
Fix typedef style
jmcarcell 4d03256
Emphasize message in the README
jmcarcell File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Copyright (c) 2014-2023 Key4hep-Project. | ||
* | ||
* This file is part of Key4hep. | ||
* See https://key4hep.github.io/key4hep-doc/ for further info. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#ifndef K4FWCORE_FUNCTIONALUTILS_H | ||
#define K4FWCORE_FUNCTIONALUTILS_H | ||
|
||
#include "GaudiAlg/GaudiAlgorithm.h" | ||
#include "GaudiKernel/DataObjectHandle.h" | ||
#include "k4FWCore/DataWrapper.h" | ||
|
||
// Base class used for the Traits template argument of the | ||
// Gaudi::Functional algorithms | ||
struct BaseClass_t { | ||
template <typename T> using InputHandle = DataObjectReadHandle<DataWrapper<T>>; | ||
template <typename T> using OutputHandle = DataObjectWriteHandle<DataWrapper<T>>; | ||
|
||
using BaseClass = Gaudi::Algorithm; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a badly chosen name - and not even name spaced. Do you have something more prescriptive what the purpose is?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here the idea is that the Gaudi examples always use a
BaseClass_t
that is defined to be typicallyGaudi::Algorithm
so by having this the changes are minimal. See for example https://gitlab.cern.ch/gaudi/Gaudi/-/blob/master/GaudiExamples/src/FunctionalAlgorithms/MakeAndConsume.cpp#L60 and a few lines below; In k4FWCore we don't need line 60 but we need instead#include "BaseClass.h"
and the rest is exactly the same as in the Gaudi examples. We could also name it differently and have it namespaced but I thought for consistency it would be simpler this way.