Skip to content

Commit 2341058

Browse files
knopers8Barthelemy
authored andcommitted
Reformat runBasic.cxx (#212)
1 parent ec1b807 commit 2341058

1 file changed

Lines changed: 29 additions & 30 deletions

File tree

Framework/src/runBasic.cxx

Lines changed: 29 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ using namespace o2::framework;
7676
using namespace o2::quality_control::checker;
7777
using namespace std::chrono;
7878

79+
// clang-format off
7980
WorkflowSpec defineDataProcessing(const ConfigContext& config)
8081
{
8182
WorkflowSpec specs;
@@ -89,45 +90,43 @@ WorkflowSpec defineDataProcessing(const ConfigContext& config)
8990
AlgorithmSpec{
9091
(AlgorithmSpec::InitCallback)[](InitContext&){
9192
std::default_random_engine generator(11);
92-
return (AlgorithmSpec::ProcessCallback)[generator](ProcessingContext & processingContext) mutable
93-
{
94-
usleep(100000);
95-
size_t length = generator() % 10000;
96-
auto data = processingContext.outputs().make<char>(Output{ "ITS", "RAWDATA", 0, Lifetime::Timeframe },
97-
length);
98-
for (auto&& item : data) {
99-
item = static_cast<char>(generator());
93+
return (AlgorithmSpec::ProcessCallback)[generator](ProcessingContext& processingContext) mutable {
94+
usleep(100000);
95+
size_t length = generator() % 10000;
96+
auto data = processingContext.outputs().make<char>(Output{ "ITS", "RAWDATA", 0, Lifetime::Timeframe }, length);
97+
for (auto&& item : data) {
98+
item = static_cast<char>(generator());
99+
}
100+
};
101+
}
100102
}
101103
};
102-
}
103-
}
104-
}
105-
;
106104

107-
specs.push_back(producer);
105+
specs.push_back(producer);
108106

109-
// Path to the config file
110-
std::string qcConfigurationSource = getConfigPath(config);
111-
LOG(INFO) << "Using config file '" << qcConfigurationSource << "'";
107+
// Path to the config file
108+
std::string qcConfigurationSource = getConfigPath(config);
109+
LOG(INFO) << "Using config file '" << qcConfigurationSource << "'";
112110

113-
// Generation of Data Sampling infrastructure
114-
DataSampling::GenerateInfrastructure(specs, qcConfigurationSource);
111+
// Generation of Data Sampling infrastructure
112+
DataSampling::GenerateInfrastructure(specs, qcConfigurationSource);
115113

116-
// Generation of the QC topology (one task, one checker in this case)
117-
quality_control::generateRemoteInfrastructure(specs, qcConfigurationSource);
114+
// Generation of the QC topology (one task, one checker in this case)
115+
quality_control::generateRemoteInfrastructure(specs, qcConfigurationSource);
118116

119-
// Finally the printer
120-
DataProcessorSpec printer{
121-
"printer",
122-
Inputs{
123-
{ "checked-mo", "QC", Checker::createCheckerDataDescription(getFirstTaskName(qcConfigurationSource)), 0 } },
124-
Outputs{},
125-
adaptFromTask<o2::quality_control::example::ExamplePrinterSpec>()
126-
};
127-
specs.push_back(printer);
117+
// Finally the printer
118+
DataProcessorSpec printer{
119+
"printer",
120+
Inputs{
121+
{ "checked-mo", "QC", Checker::createCheckerDataDescription(getFirstTaskName(qcConfigurationSource)), 0 } },
122+
Outputs{},
123+
adaptFromTask<o2::quality_control::example::ExamplePrinterSpec>()
124+
};
125+
specs.push_back(printer);
128126

129-
return specs;
127+
return specs;
130128
}
129+
// clang-format on
131130

132131
// TODO merge this with the one from runReadout.cxx
133132
std::string getConfigPath(const ConfigContext& config)

0 commit comments

Comments
 (0)