Skip to content

Commit bec22ff

Browse files
authored
AOD: Introduce CreatedBy MetaData field (#14351)
* AOD: Introduce CreatedBy MetaData field Allows to know who created this AOD, which in turn might be used to lookup further MetaData from CCDB or just to know whom to contact.
1 parent bf081c9 commit bec22ff

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Detectors/AOD/include/AODProducerWorkflow/AODProducerWorkflowSpec.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ class AODProducerWorkflowDPL : public Task
271271
TString mAnchorPass{""};
272272
TString mAnchorProd{""};
273273
TString mRecoPass{""};
274+
TString mUser{"aliprod"}; // who created this AOD (aliprod, alidaq, individual users)
274275
TStopwatch mTimer;
275276
bool mEMCselectLeading{false};
276277
uint64_t mEMCALTrgClassMask = 0;

Detectors/AOD/src/AODProducerWorkflowSpec.cxx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1675,6 +1675,7 @@ void AODProducerWorkflowDPL::init(InitContext& ic)
16751675
mLPMProdTag = ic.options().get<string>("lpmp-prod-tag");
16761676
mAnchorPass = ic.options().get<string>("anchor-pass");
16771677
mAnchorProd = ic.options().get<string>("anchor-prod");
1678+
mUser = ic.options().get<string>("created-by");
16781679
mRecoPass = ic.options().get<string>("reco-pass");
16791680
mTFNumber = ic.options().get<int64_t>("aod-timeframe-id");
16801681
mRecoOnly = ic.options().get<int>("reco-mctracks-only");
@@ -2398,8 +2399,8 @@ void AODProducerWorkflowDPL::run(ProcessingContext& pc)
23982399
TString dataType = mUseMC ? "MC" : "RAW";
23992400
TString O2Version = o2::fullVersion();
24002401
TString ROOTVersion = ROOT_RELEASE;
2401-
mMetaDataKeys = {"DataType", "Run", "O2Version", "ROOTVersion", "RecoPassName", "AnchorProduction", "AnchorPassName", "LPMProductionTag"};
2402-
mMetaDataVals = {dataType, "3", O2Version, ROOTVersion, mRecoPass, mAnchorProd, mAnchorPass, mLPMProdTag};
2402+
mMetaDataKeys = {"DataType", "Run", "O2Version", "ROOTVersion", "RecoPassName", "AnchorProduction", "AnchorPassName", "LPMProductionTag", "CreatedBy"};
2403+
mMetaDataVals = {dataType, "3", O2Version, ROOTVersion, mRecoPass, mAnchorProd, mAnchorPass, mLPMProdTag, mUser};
24032404
pc.outputs().snapshot(Output{"AMD", "AODMetadataKeys", 0}, mMetaDataKeys);
24042405
pc.outputs().snapshot(Output{"AMD", "AODMetadataVals", 0}, mMetaDataVals);
24052406

@@ -3256,6 +3257,7 @@ DataProcessorSpec getAODProducerWorkflowSpec(GID::mask_t src, bool enableSV, boo
32563257
ConfigParamSpec{"anchor-pass", VariantType::String, "", {"AnchorPassName"}},
32573258
ConfigParamSpec{"anchor-prod", VariantType::String, "", {"AnchorProduction"}},
32583259
ConfigParamSpec{"reco-pass", VariantType::String, "", {"RecoPassName"}},
3260+
ConfigParamSpec{"created-by", VariantType::String, "", {"Who created this AO2D"}},
32593261
ConfigParamSpec{"nthreads", VariantType::Int, std::max(1, int(std::thread::hardware_concurrency() / 2)), {"Number of threads"}},
32603262
ConfigParamSpec{"reco-mctracks-only", VariantType::Int, 0, {"Store only reconstructed MC tracks and their mothers/daughters. 0 -- off, != 0 -- on"}},
32613263
ConfigParamSpec{"ctpreadout-create", VariantType::Int, 0, {"Create CTP digits from detector readout and CTP inputs. !=1 -- off, 1 -- on"}},

0 commit comments

Comments
 (0)