Skip to content

Commit

Permalink
Cleanups (#172)
Browse files Browse the repository at this point in the history
* Add FrameworkFoundation

* Fix a few warnings.

* fix indentation and prevent clang-format from destroying it again
  • Loading branch information
ktf authored and knopers8 committed May 29, 2019
1 parent 13872b9 commit 5763a4c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Framework/src/TaskRunner.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ void TaskRunner::populateConfig(std::string taskName)
dataSourceTree.get<std::string>("binding"),
origin,
description,
subSpec });
static_cast<framework::DataAllocator::SubSpecificationType>(subSpec) });

} else {
std::string message = std::string("Configuration error : dataSource type unknown : ") + type; // TODO pass this message to the exception
Expand Down
12 changes: 6 additions & 6 deletions Framework/src/runMergerTest.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ using namespace o2::quality_control::core;
using namespace o2::quality_control::checker;
using namespace std::chrono;

// clang-format off
WorkflowSpec defineDataProcessing(ConfigContext const&)
{
WorkflowSpec specs;
Expand All @@ -50,15 +51,14 @@ WorkflowSpec defineDataProcessing(ConfigContext const&)
"producer" + std::to_string(p),
Inputs{},
Outputs{
{ {"mo"}, "TST", "HISTO", p + 1, Lifetime::Timeframe }
},
{ { "mo" }, "TST", "HISTO", static_cast<o2::framework::DataAllocator::SubSpecificationType>(p + 1), Lifetime::Timeframe } },
AlgorithmSpec{
(AlgorithmSpec::ProcessCallback) [p, producersAmount](ProcessingContext& processingContext) mutable {
(AlgorithmSpec::ProcessCallback)[p, producersAmount](ProcessingContext & processingContext) mutable {

usleep(100000);

TH1F* histo = new TH1F("gauss", "gauss", producersAmount, 0, 1);
histo->Fill(p/(double)producersAmount);
histo->Fill(p / (double)producersAmount);

MonitorObject* mo = new MonitorObject(histo, "histo-task");
mo->setIsOwner(true);
Expand All @@ -67,7 +67,7 @@ WorkflowSpec defineDataProcessing(ConfigContext const&)
array->SetOwner(true);
array->Add(mo);

processingContext.outputs().adopt(Output{"TST", "HISTO", p + 1}, array);
processingContext.outputs().adopt(Output{ "TST", "HISTO", static_cast<o2::framework::DataAllocator::SubSpecificationType>(p + 1) }, array);
}
}
};
Expand All @@ -84,7 +84,6 @@ WorkflowSpec defineDataProcessing(ConfigContext const&)
};
specs.push_back(mergerSpec);


DataProcessorSpec printer{
"printer",
Inputs{
Expand Down Expand Up @@ -114,3 +113,4 @@ WorkflowSpec defineDataProcessing(ConfigContext const&)

return specs;
}
// clang-format on
1 change: 1 addition & 0 deletions cmake/FindAliceO2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ list(APPEND AliceO2_INCLUDE_DIRS ${MS_GSL_INCLUDE_DIR})
# find libraries
# TODO SEARCH *ALL* LIBRARIES --> AliceO2 should ideally provide the list !!!
set(O2_LIBRARIES_NAMES
FrameworkFoundation
Framework
Headers
CCDB
Expand Down

0 comments on commit 5763a4c

Please sign in to comment.