Skip to content

Commit 1b21307

Browse files
authored
Implement metadata check in defineDataProcessing
Added metadata check to prevent workflow usage with specific AO2D.
1 parent b926505 commit 1b21307

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Common/TableProducer/ft0CorrectedTableMcOverride.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

@@ -168,4 +169,12 @@ struct ft0CorrectedTableMcOverride {
168169
}
169170
};
170171

171-
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { return WorkflowSpec{adaptAnalysisTask<ft0CorrectedTableMcOverride>(cfgc)}; }
172+
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
173+
{
174+
o2::common::core::MetadataHelper metadataInfo;
175+
metadataInfo.initMetadata(cfgc);
176+
if (metadataInfo.isCommitInSoftwareTag("63bc2e3893851ef0f849bb4c98c65eae1ba21e47")) {
177+
LOG(fatal) << "This workflow should not be used with this AO2D.";
178+
}
179+
return WorkflowSpec{adaptAnalysisTask<ft0CorrectedTableMcOverride>(cfgc)};
180+
}

0 commit comments

Comments
 (0)