HI,
I have a problem working with the RDataSetSpec and RSample. At lxplus, both lxplus7 and lxplus9, I Always get the following error when running my RDF:
RDataFrame::Run: event loop was interrupted
Traceback (most recent call last):
File "/afs/cern.ch/user/j/jdegens/private/dihiggs/HHARD/analyses/bbttManager.py", line 81, in <module>
analysis_manager.run_analyses_local() # runs all rdf simultaneously
File "/afs/cern.ch/user/j/jdegens/private/dihiggs/HHARD/python/AnalysisManager.py", line 27, in timeit_wrapper
result = func(*args, **kwargs)
File "/afs/cern.ch/user/j/jdegens/private/dihiggs/HHARD/python/AnalysisManager.py", line 127, in run_analyses_local
R.RDF.RunGraphs(dfs)
cppyy.gbl.std.logic_error: void ROOT::RDF::RunGraphs(vector<ROOT::RDF::RResultHandle>) =>
logic_error: RSampleInfo: sample data was requested but no samples are available.
in my code I define a like this:
self.meta = R.RDF.Experimental.RMetaData()
self.get_number_of_events()
self.meta.Add("name", f"{self.name}")
self.meta.Add("isMC", f"{self.isMC}")
self.meta.Add("totalEventsWeighted", float(self.totalEventsWeighted))
self.meta.Add("CrossSection", float(self.dsid_metadata['CrossSection']))
self.meta.Add("genFiltEff", float(self.dsid_metadata['genFiltEff']))
self.meta.Add("kFactor", float(self.dsid_metadata['kFactor']))
self.meta.Add("RunPeriod", self.run_period)
lumi = self.get_lumi(self.run_period)
self.meta.Add("lumi", float(lumi))
R.RDF.Experimental.RSample(f"{self.name}", self.ntuple, self.files, self.meta)
later in the code I use the DefinePerSample method to access them.
self.dfs[dfname] = self.dfs[dfname].DefinePerSample("totalEventsWeighted", 'rdfsampleinfo_.GetD("totalEventsWeighted")')
The same code works on my local cluster running centos. I in principle use the same cvfms compiled version of root and I dont see any reason why it doesn’t work on lxplus. Removing the DefinePerSample call seems to “make it work”, so it must be something going wrong here
I can access the samples and their metadata directly in the code via:
x = self.datasetspec.rdatasetspec.GetMetaData()
print(x[0].Dump("lumi"))
print(self.datasetspec.rdatasetspec.GetSampleNames())
which gives me the expected results
36646.74
{ "HH_bbtt_top_mc_20a" }
Do you have any idea why this is happening?
thanks a lot,
Jordy