Skip to content

Commit d5f1c18

Browse files
authored
Enhance defineDataProcessing with metadata checks
Added metadata initialization and validation for MC workflow.
1 parent 1b21307 commit d5f1c18

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Common/TableProducer/ft0CorrectedTable.cxx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
// or submit itself to any jurisdiction.
1111

1212
#include "Common/Core/CollisionTypeHelper.h"
13+
#include "Common/Core/MetadataHelper.h"
1314
#include "Common/DataModel/EventSelection.h"
1415
#include "Common/DataModel/FT0Corrected.h"
1516

@@ -102,4 +103,12 @@ struct ft0CorrectedTable {
102103
}
103104
};
104105

105-
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { return WorkflowSpec{adaptAnalysisTask<ft0CorrectedTable>(cfgc)}; }
106+
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
107+
{
108+
o2::common::core::MetadataHelper metadataInfo;
109+
metadataInfo.initMetadata(cfgc);
110+
if (metadataInfo.isMC() && !metadataInfo.isCommitInSoftwareTag("63bc2e3893851ef0f849bb4c98c65eae1ba21e47")) {
111+
LOG(fatal) << "This workflow should not be used with this AO2D. Use the MC override instead";
112+
}
113+
return WorkflowSpec{adaptAnalysisTask<ft0CorrectedTable>(cfgc)};
114+
}

0 commit comments

Comments
 (0)