From a5243c44d124781e7a77eb43825a91f2e30b8acf Mon Sep 17 00:00:00 2001 From: Jonas Rembser Date: Wed, 2 Oct 2024 21:35:25 +0200 Subject: [PATCH] Use RooDataSet constructor that takes `RooFit::WeightVar` argument The constructor that just takes a string is deprecated and will be removed in ROOT 6.34. --- python/ShapeTools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ShapeTools.py b/python/ShapeTools.py index baf48adb251..d28696cc3b6 100644 --- a/python/ShapeTools.py +++ b/python/ShapeTools.py @@ -1224,7 +1224,7 @@ def shape2Data(self, shape, channel, process, _cache={}): _cache[name] = rdh else: obs.add(self.out.var("CMS_fakeWeight")) - rds = ROOT.RooDataSet(name, name, obs, "CMS_fakeWeight") + rds = ROOT.RooDataSet(name, name, obs, ROOT.RooFit.WeightVar("CMS_fakeWeight")) obs.setRealValue("CMS_fakeWeight", self.DC.obs[channel]) rds.add(obs, self.DC.obs[channel]) _cache[name] = rds