From 5763a4c8eea701f1f54031076b897e7f9d32f36a Mon Sep 17 00:00:00 2001 From: Giulio Eulisse Date: Wed, 29 May 2019 15:26:11 +0200 Subject: [PATCH] Cleanups (#172) * Add FrameworkFoundation * Fix a few warnings. * fix indentation and prevent clang-format from destroying it again --- Framework/src/TaskRunner.cxx | 2 +- Framework/src/runMergerTest.cxx | 12 ++++++------ cmake/FindAliceO2.cmake | 1 + 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Framework/src/TaskRunner.cxx b/Framework/src/TaskRunner.cxx index 6c3fe1bd13..a02508a194 100644 --- a/Framework/src/TaskRunner.cxx +++ b/Framework/src/TaskRunner.cxx @@ -202,7 +202,7 @@ void TaskRunner::populateConfig(std::string taskName) dataSourceTree.get("binding"), origin, description, - subSpec }); + static_cast(subSpec) }); } else { std::string message = std::string("Configuration error : dataSource type unknown : ") + type; // TODO pass this message to the exception diff --git a/Framework/src/runMergerTest.cxx b/Framework/src/runMergerTest.cxx index 256423ecfd..7b9f19c706 100644 --- a/Framework/src/runMergerTest.cxx +++ b/Framework/src/runMergerTest.cxx @@ -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; @@ -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(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); @@ -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(p + 1) }, array); } } }; @@ -84,7 +84,6 @@ WorkflowSpec defineDataProcessing(ConfigContext const&) }; specs.push_back(mergerSpec); - DataProcessorSpec printer{ "printer", Inputs{ @@ -114,3 +113,4 @@ WorkflowSpec defineDataProcessing(ConfigContext const&) return specs; } +// clang-format on diff --git a/cmake/FindAliceO2.cmake b/cmake/FindAliceO2.cmake index 011bf3800c..287dc5852b 100644 --- a/cmake/FindAliceO2.cmake +++ b/cmake/FindAliceO2.cmake @@ -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