@@ -52,7 +52,8 @@ o2::framework::WorkflowSpec getWorkflow(bool propagateMC,
5252 std::string const & cfgInput,
5353 std::string const & cfgOutput,
5454 bool disableRootInput,
55- bool disableRootOutput)
55+ bool disableRootOutput,
56+ bool disableDecodingErrors)
5657{
5758
5859 const std::unordered_map<std::string, InputType> InputMap{
@@ -240,14 +241,22 @@ o2::framework::WorkflowSpec getWorkflow(bool propagateMC,
240241 std::move (analysisclusterbranch)));
241242 };
242243
243- auto makeWriterSpec_CellsTR = [checkReady](const char * processName, const char * defaultFileName, const char * defaultTreeName,
244- auto && CellsBranch, auto && TriggerRecordBranch, auto && DecoderErrorsBranch) {
244+ auto makeWriterSpec_CellsTR = [disableDecodingErrors, checkReady](const char * processName, const char * defaultFileName, const char * defaultTreeName,
245+ auto && CellsBranch, auto && TriggerRecordBranch, auto && DecoderErrorsBranch) {
245246 return std::move (o2::framework::MakeRootTreeWriterSpec (processName, defaultFileName, defaultTreeName,
246247 o2::framework::MakeRootTreeWriterSpec::TerminationCondition{checkReady},
247248 std::move (CellsBranch),
248249 std::move (TriggerRecordBranch),
249250 std::move (DecoderErrorsBranch)));
250251 };
252+
253+ auto makeWriterSpec_CellsTR_noerrors = [checkReady](const char * processName, const char * defaultFileName, const char * defaultTreeName,
254+ auto && CellsBranch, auto && TriggerRecordBranch) {
255+ return std::move (o2::framework::MakeRootTreeWriterSpec (processName, defaultFileName, defaultTreeName,
256+ o2::framework::MakeRootTreeWriterSpec::TerminationCondition{checkReady},
257+ std::move (CellsBranch),
258+ std::move (TriggerRecordBranch)));
259+ };
251260 /*
252261 // RS getting input digits and outputing them under the same outputspec will create dependency loop when piping the workflows
253262 if (isEnabled(OutputType::Digits) && !disableRootOutput) {
@@ -284,19 +293,32 @@ o2::framework::WorkflowSpec getWorkflow(bool propagateMC,
284293 } else {
285294 using CellsDataType = std::vector<o2::emcal::Cell>;
286295 using TriggerRecordDataType = std::vector<o2::emcal::TriggerRecord>;
287- using DecoderErrorsDataType = std::vector<o2::emcal::ErrorTypeFEE>;
288- specs.push_back (makeWriterSpec_CellsTR (" emcal-cells-writer" ,
289- " emccells.root" ,
290- " o2sim" ,
291- BranchDefinition<CellsDataType>{o2::framework::InputSpec{" data" , " EMC" , " CELLS" , 0 },
292- " EMCALCell" ,
293- " cell-branch-name" },
294- BranchDefinition<TriggerRecordDataType>{o2::framework::InputSpec{" trigger" , " EMC" , " CELLSTRGR" , 0 },
295- " EMCALCellTRGR" ,
296- " celltrigger-branch-name" },
297- BranchDefinition<DecoderErrorsDataType>{o2::framework::InputSpec{" errors" , " EMC" , " DECODERERR" , 0 },
298- " EMCALDECODERERR" ,
299- " decodererror-branch-name" })());
296+ if (disableDecodingErrors) {
297+ specs.push_back (makeWriterSpec_CellsTR_noerrors (" emcal-cells-writer" ,
298+ " emccells.root" ,
299+ " o2sim" ,
300+ BranchDefinition<CellsDataType>{o2::framework::InputSpec{" data" , " EMC" , " CELLS" , 0 },
301+ " EMCALCell" ,
302+ " cell-branch-name" },
303+ BranchDefinition<TriggerRecordDataType>{o2::framework::InputSpec{" trigger" , " EMC" , " CELLSTRGR" , 0 },
304+ " EMCALCellTRGR" ,
305+ " celltrigger-branch-name" })());
306+
307+ } else {
308+ using DecoderErrorsDataType = std::vector<o2::emcal::ErrorTypeFEE>;
309+ specs.push_back (makeWriterSpec_CellsTR (" emcal-cells-writer" ,
310+ " emccells.root" ,
311+ " o2sim" ,
312+ BranchDefinition<CellsDataType>{o2::framework::InputSpec{" data" , " EMC" , " CELLS" , 0 },
313+ " EMCALCell" ,
314+ " cell-branch-name" },
315+ BranchDefinition<TriggerRecordDataType>{o2::framework::InputSpec{" trigger" , " EMC" , " CELLSTRGR" , 0 },
316+ " EMCALCellTRGR" ,
317+ " celltrigger-branch-name" },
318+ BranchDefinition<DecoderErrorsDataType>{o2::framework::InputSpec{" errors" , " EMC" , " DECODERERR" , 0 },
319+ " EMCALDECODERERR" ,
320+ " decodererror-branch-name" })());
321+ }
300322 }
301323 }
302324
0 commit comments