|
17 | 17 |
|
18 | 18 | #include "Algorithm/RangeTokenizer.h" |
19 | 19 | #include "DPLUtils/MakeRootTreeWriterSpec.h" |
20 | | -#include "DataFormatsEMCAL/EMCALBlockHeader.h" |
21 | 20 | #include "DataFormatsEMCAL/Cell.h" |
22 | 21 | #include "DataFormatsEMCAL/Digit.h" |
23 | 22 | #include "DataFormatsEMCAL/Cluster.h" |
@@ -187,75 +186,50 @@ o2::framework::WorkflowSpec getWorkflow(bool propagateMC, |
187 | 186 | specs.emplace_back(o2::emcal::reco_workflow::getAnalysisClusterSpec(inputType == InputType::Digits)); |
188 | 187 | } |
189 | 188 |
|
190 | | - // check if the process is ready to quit |
191 | | - // this is decided upon the meta information in the EMCAL block header, the operation is set |
192 | | - // value kNoPayload in case of no data or no operation |
193 | | - // see also PublisherSpec.cxx |
194 | | - // in this workflow, the EOD is sent after the last real data, and all inputs will receive EOD, |
195 | | - // so it is enough to check on the first occurence |
196 | | - // FIXME: this will be changed once DPL can propagate control events like EOD |
197 | | - auto checkReady = [](o2::framework::DataRef const& ref) { |
198 | | - auto const* emcalheader = o2::framework::DataRefUtils::getHeader<o2::emcal::EMCALBlockHeader*>(ref); |
199 | | - // sector number -1 indicates end-of-data |
200 | | - if (emcalheader != nullptr) { |
201 | | - // indicate normal processing if not ready and skip if ready |
202 | | - if (!emcalheader->mHasPayload) { |
203 | | - return std::make_tuple(o2::framework::MakeRootTreeWriterSpec::TerminationCondition::Action::SkipProcessing, true); |
204 | | - } |
205 | | - } |
206 | | - return std::make_tuple(o2::framework::MakeRootTreeWriterSpec::TerminationCondition::Action::DoProcessing, false); |
207 | | - }; |
208 | | - |
209 | | - auto makeWriterSpec = [propagateMC, checkReady](const char* processName, const char* defaultFileName, const char* defaultTreeName, |
210 | | - auto&& databranch, auto&& triggerbranch, auto&& mcbranch) { |
| 189 | + auto makeWriterSpec = [propagateMC](const char* processName, const char* defaultFileName, const char* defaultTreeName, |
| 190 | + auto&& databranch, auto&& triggerbranch, auto&& mcbranch) { |
211 | 191 | // depending on the MC propagation flag, the RootTreeWriter spec is created with two |
212 | 192 | // or one branch definition |
213 | 193 | if (propagateMC) { |
214 | 194 | return std::move(o2::framework::MakeRootTreeWriterSpec(processName, defaultFileName, defaultTreeName, |
215 | | - o2::framework::MakeRootTreeWriterSpec::TerminationCondition{checkReady}, |
216 | 195 | std::move(databranch), |
217 | 196 | std::move(triggerbranch), |
218 | 197 | std::move(mcbranch))); |
219 | 198 | } |
220 | 199 | return std::move(o2::framework::MakeRootTreeWriterSpec(processName, defaultFileName, defaultTreeName, |
221 | | - o2::framework::MakeRootTreeWriterSpec::TerminationCondition{checkReady}, |
222 | 200 | std::move(databranch), |
223 | 201 | std::move(triggerbranch))); |
224 | 202 | }; |
225 | 203 |
|
226 | 204 | // TODO: Write comment in push comment @matthiasrichter |
227 | | - auto makeWriterSpec_Cluster = [checkReady](const char* processName, const char* defaultFileName, const char* defaultTreeName, |
228 | | - auto&& clusterbranch, auto&& digitindicesbranch, auto&& clustertriggerbranch, auto&& indicestriggerbranch) { |
| 205 | + auto makeWriterSpec_Cluster = [](const char* processName, const char* defaultFileName, const char* defaultTreeName, |
| 206 | + auto&& clusterbranch, auto&& digitindicesbranch, auto&& clustertriggerbranch, auto&& indicestriggerbranch) { |
229 | 207 | // RootTreeWriter spec is created with one branch definition |
230 | 208 | return std::move(o2::framework::MakeRootTreeWriterSpec(processName, defaultFileName, defaultTreeName, |
231 | | - o2::framework::MakeRootTreeWriterSpec::TerminationCondition{checkReady}, |
232 | 209 | std::move(clusterbranch), |
233 | 210 | std::move(digitindicesbranch), |
234 | 211 | std::move(clustertriggerbranch), |
235 | 212 | std::move(indicestriggerbranch))); |
236 | 213 | }; |
237 | 214 |
|
238 | | - auto makeWriterSpec_AnalysisCluster = [checkReady](const char* processName, const char* defaultFileName, const char* defaultTreeName, |
239 | | - auto&& analysisclusterbranch) { |
| 215 | + auto makeWriterSpec_AnalysisCluster = [](const char* processName, const char* defaultFileName, const char* defaultTreeName, |
| 216 | + auto&& analysisclusterbranch) { |
240 | 217 | // RootTreeWriter spec is created with one branch definition |
241 | 218 | return std::move(o2::framework::MakeRootTreeWriterSpec(processName, defaultFileName, defaultTreeName, |
242 | | - o2::framework::MakeRootTreeWriterSpec::TerminationCondition{checkReady}, |
243 | 219 | std::move(analysisclusterbranch))); |
244 | 220 | }; |
245 | 221 |
|
246 | | - auto makeWriterSpec_CellsTR = [disableDecodingErrors, checkReady](const char* processName, const char* defaultFileName, const char* defaultTreeName, |
247 | | - auto&& CellsBranch, auto&& TriggerRecordBranch, auto&& DecoderErrorsBranch) { |
| 222 | + auto makeWriterSpec_CellsTR = [disableDecodingErrors](const char* processName, const char* defaultFileName, const char* defaultTreeName, |
| 223 | + auto&& CellsBranch, auto&& TriggerRecordBranch, auto&& DecoderErrorsBranch) { |
248 | 224 | return std::move(o2::framework::MakeRootTreeWriterSpec(processName, defaultFileName, defaultTreeName, |
249 | | - o2::framework::MakeRootTreeWriterSpec::TerminationCondition{checkReady}, |
250 | 225 | std::move(CellsBranch), |
251 | 226 | std::move(TriggerRecordBranch), |
252 | 227 | std::move(DecoderErrorsBranch))); |
253 | 228 | }; |
254 | 229 |
|
255 | | - auto makeWriterSpec_CellsTR_noerrors = [checkReady](const char* processName, const char* defaultFileName, const char* defaultTreeName, |
256 | | - auto&& CellsBranch, auto&& TriggerRecordBranch) { |
| 230 | + auto makeWriterSpec_CellsTR_noerrors = [](const char* processName, const char* defaultFileName, const char* defaultTreeName, |
| 231 | + auto&& CellsBranch, auto&& TriggerRecordBranch) { |
257 | 232 | return std::move(o2::framework::MakeRootTreeWriterSpec(processName, defaultFileName, defaultTreeName, |
258 | | - o2::framework::MakeRootTreeWriterSpec::TerminationCondition{checkReady}, |
259 | 233 | std::move(CellsBranch), |
260 | 234 | std::move(TriggerRecordBranch))); |
261 | 235 | }; |
|
0 commit comments