Adding makeDiffWorkflow using path to local or alien workflow.config + treeFastCache.C+treeFastCacheND.C #1964
Conversation
|
REQUEST FOR PRODUCTION RELEASES: This will add The following labels are available |
|
Hello @shahor02, @chiarazampolli, @swenzel, @matthias-kleiner, @wiechula, and all, While waiting on the main pull request, I’ve added a utility for fast caching and querying of TTree content — especially useful for cross-correlation, time series, and QA workflows. This code originated in the private TPC repository, but I’ve now generalized and documented it properly, moving it to The immediate motivation is to support the QA/QC group with interactive queries on time-dependent data, e.g., retrieving smoothed or reference values via 🧭 Interface SummaryFunction: int registerMapND(name, tree, exactDims, nearestDim, valueVar, selection);
Alias setup: setNearestNDAlias(tree, aliasName, name, nearestDimExpr, exactDimExprs);
🧪 Example: ND Lookup (e.g. HV scan QA)void exampleND() {
TTree* tree = new TTree("tree", "demo");
int mapID = registerMapND("test_map", tree, {"CRU", "iTF"}, "time", "val", "subentry==127");
setNearestNDAlias(tree, "val_interp", "test_map", "time", {"CRU", "iTF"});
tree->Draw("val:val_interp", "val!=0", "colz");
}🕒 Example: Time-Series QA Overlayvoid exampleTimeSeries() {
TFile *f = TFile::Open("timeSeries10000_apass5.root");
TTree *tree = (TTree*)f->Get("timeSeries");
int mapID = registerMapND("dcar_vs_time", tree, {"subentry"}, "time", "mTSITSTPC.mDCAr_A_NTracks_median", "1");
setNearestNDAlias(tree, "mDCAr_A_NTracks_median_interp", "dcar_vs_time", "time", {"subentry"});
tree->Draw("mTSITSTPC.mDCAr_A_NTracks_median:mDCAr_A_NTracks_median_interp", "indexType==1", "", 10000);
}📄 For a more detailed explanation and API overview, see: Let me know if you'd like more examples or integration into compiled O2 code. Best regards, |
|
Hallo @sawenzel @pzhristov @davidrohr @shahor02, @chiarazampolli Could one of you please approve this MR? Thanks! |
🛠️
makeDiffWorkflowUtility Function – New Tool for O2 Workflow ComparisonThis PR introduces the
makeDiffWorkflowshell function, designed to streamline comparison of twoworkflowconfig.logfiles — whether local or from Alien.✅ Function Highlights:
diffalien://pathsmakeParsegpu)less -Rwith color for readability🧪 Example Usage
If no arguments are provided:
Output:
📄 Full Example – Side-by-Side Diff of GPU Workflows
makeDiffWorkflow alien:///alice/data/2023/LHC23zzk/544515/apass5/1140/o2_ctf_run00544515_orbit0221337280_tf0000047516_epn242/workflowconfig.log alien:///alice/data/2023/LHC23zzk/544515/apass4/1140/o2_ctf_run00544515_orbit0221337280_tf0000047516_epn242/workflowconfig.log 1 o2-gpu | lessOutput:
This tool will save time when debugging config diffs in apass productions or other complex workflows. Let me know if you'd like to adapt it to other use cases like
o2-dpl,hlt, etc.