Skip to content

Commit df381a6

Browse files
committed
DPL: pass plugin to WorfklowInfo
1 parent 3318c83 commit df381a6

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Framework/Core/src/runDataProcessing.cxx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ char* getIdString(int argc, char** argv)
190190
return nullptr;
191191
}
192192

193-
int doMain(int argc, char** argv, o2::framework::WorkflowDefinitionContext& workflowContext);
193+
int doMain(int argc, char** argv, std::string pluginName, o2::framework::WorkflowDefinitionContext& workflowContext);
194194

195195
int callMain(int argc, char** argv, char const* pluginSpec)
196196
{
@@ -211,7 +211,7 @@ int callMain(int argc, char** argv, char const* pluginSpec)
211211
o2::framework::WorkflowDefinitionContext workflowContext = availableWorkflows.back().defineWorkflow(argc, argv);
212212
if (noCatch) {
213213
try {
214-
result = doMain(argc, argv, workflowContext);
214+
result = doMain(argc, argv, pluginSpec, workflowContext);
215215
} catch (o2::framework::RuntimeErrorRef& ref) {
216216
doDPLException(ref, argv[0]);
217217
throw;
@@ -222,7 +222,7 @@ int callMain(int argc, char** argv, char const* pluginSpec)
222222
// SFINAE expression above fit better the version which invokes user code over
223223
// the default one.
224224
// The default policy is a catch all pub/sub setup to be consistent with the past.
225-
result = doMain(argc, argv, workflowContext);
225+
result = doMain(argc, argv, pluginSpec, workflowContext);
226226
} catch (boost::exception& e) {
227227
doBoostException(e, argv[0]);
228228
throw;
@@ -251,7 +251,6 @@ void getChildData(int infd, DeviceInfo& outinfo)
251251
int bytes_read;
252252
// NOTE: do not quite understand read ends up blocking if I read more than
253253
// once. Oh well... Good enough for now.
254-
int64_t total_bytes_read = 0;
255254
int64_t count = 0;
256255
bool once = false;
257256
while (true) {
@@ -1146,6 +1145,7 @@ int doChild(int argc, char** argv, ServiceRegistry& serviceRegistry,
11461145

11471146
struct WorkflowInfo {
11481147
std::string executable;
1148+
std::string plugin;
11491149
std::vector<std::string> args;
11501150
std::vector<ConfigParamSpec> options;
11511151
};
@@ -2877,7 +2877,7 @@ std::unique_ptr<o2::framework::ServiceRegistry> createRegistry()
28772877
// killing them all on ctrl-c).
28782878
// - Child, pick the data-processor ID and start a O2DataProcessorDevice for
28792879
// each DataProcessorSpec
2880-
int doMain(int argc, char** argv, o2::framework::WorkflowDefinitionContext& workflowContext)
2880+
int doMain(int argc, char** argv, std::string pluginName, o2::framework::WorkflowDefinitionContext& workflowContext)
28812881
{
28822882
// Peek very early in the driver options and look for
28832883
// signposts, so the we can enable it without going through the whole dance
@@ -2895,6 +2895,7 @@ int doMain(int argc, char** argv, o2::framework::WorkflowDefinitionContext& work
28952895

28962896
WorkflowInfo currentWorkflow{
28972897
.executable = argv[0],
2898+
.plugin = pluginName,
28982899
.args = currentArgs,
28992900
.options = workflowContext.workflowOptions};
29002901

0 commit comments

Comments
 (0)