-
Notifications
You must be signed in to change notification settings - Fork 449
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DPL: first step to make workflow definition plugins
This is the first step towards having the workflow definition inside plugins rather than in executables. This will allow accumulating plugins which are needed to instantiate a topology and do the option parsing / topology building only once, simplifying the current case. The end goal is to allow the driver to preload certain common services (e.g. ROOT) and share it among the different tasks (which at the moment it's not allowed because different tasks are in different executables). Moreover this will allow us to coalesce strictly coupled dataprocessors and reduce the number of running processes. For now the plugins are embedded in the executables and behave exactly like before.
- Loading branch information
Showing
4 changed files
with
178 additions
and
85 deletions.
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
56 changes: 56 additions & 0 deletions
56
Framework/Core/include/Framework/WorkflowDefinitionContext.h
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,56 @@ | ||
// Copyright 2019-2025 CERN and copyright holders of ALICE O2. | ||
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. | ||
// All rights not expressly granted are reserved. | ||
// | ||
// This software is distributed under the terms of the GNU General Public | ||
// License v3 (GPL Version 3), copied verbatim in the file "COPYING". | ||
// | ||
// In applying this license 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. | ||
#ifndef O2_FRAMEWORK_WORKFLOWDEFINITIONCONTEXT_H_ | ||
#define O2_FRAMEWORK_WORKFLOWDEFINITIONCONTEXT_H_ | ||
|
||
#include "Framework/ConfigParamSpec.h" | ||
#include "Framework/CompletionPolicy.h" | ||
#include "Framework/DispatchPolicy.h" | ||
#include "Framework/ResourcePolicy.h" | ||
#include "Framework/CallbacksPolicy.h" | ||
#include "Framework/SendingPolicy.h" | ||
#include "Framework/WorkflowSpec.h" | ||
#include "Framework/ChannelConfigurationPolicy.h" | ||
#include <vector> | ||
|
||
namespace o2::framework | ||
{ | ||
|
||
struct WorkflowDefinitionContext { | ||
std::vector<ConfigParamSpec> workflowOptions; | ||
std::vector<CompletionPolicy> completionPolicies; | ||
std::vector<DispatchPolicy> dispatchPolicies; | ||
std::vector<ResourcePolicy> resourcePolicies; | ||
std::vector<CallbacksPolicy> callbacksPolicies; | ||
std::vector<SendingPolicy> sendingPolicies; | ||
std::vector<ConfigParamSpec> extraOptions; | ||
std::vector<ChannelConfigurationPolicy> channelPolicies; | ||
std::unique_ptr<ConfigContext> configContext; | ||
|
||
// For the moment, let's put them here. We should | ||
// probably move them to a different place, since these are not really part | ||
// of the workflow definition but will be there also at runtine. | ||
std::unique_ptr<ServiceRegistry> configRegistry{nullptr}; | ||
std::unique_ptr<ConfigParamRegistry> workflowOptionsRegistry{nullptr}; | ||
|
||
o2::framework::WorkflowSpec specs; | ||
}; | ||
|
||
struct WorkflowDefinition { | ||
std::function<o2::framework::WorkflowDefinitionContext(int argc, char** argv)> defineWorkflow; | ||
}; | ||
|
||
struct WorkflowPlugin { | ||
virtual o2::framework::WorkflowDefinition* create() = 0; | ||
}; | ||
|
||
} // namespace o2::framework | ||
#endif // O2_FRAMEWORK_WORKFLOWDEFINITIONCONTEXT_H_ |
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.