Replies: 1 comment 1 reply
-
I don't remember what's in A general rule in Python is that anything that starts with an underscore is an internal detail, equivalent to So the important question is whether Also, it would help if code snippets in GitHub are surrounded by triple-backticks, since this formats them as code. Particularly in Python, the meaning of the code depends on indentation, and without the formatting, the indentation is removed! |
Beta Was this translation helpful? Give feedback.
-
Hi, I started to work with uproot and I have a weird effect;
if after opening a root file and reading an histo [1], I try to read the _values/_errors arrays [2], I only empty arrays returned.
If before reading I use a statement such as :
values_1 = hist_1_4.values()
errors_1 = hist_1_4.errors()
then, I can have access to the _values/_errors arrays as in point [2].
Is this way correct and known ?
Arnaud
[1] : fileName1 = rootFilesPath + '/' + "DQM_V0001_R000000001__RelValZEE_14__CMSSW_12_1_0_pre2-121X_mcRun3_2021_realistic_v1-v1__DQMIO.root"
histoPath = "DQMData/Run 1/EgammaV/Run summary/ElectronMcSignalValidator"
datasets = ['h_ele_PhiMnPhiTrueVsEta_pfx']
rootFile = up4.open(fileName1)
root_tree_1_4 = rootFile[histoPath]
hist_1_4 = root_tree_1_4[dataset]
[2] : for n1, v1 in hist_1_4.dict.items():
if n1.startswith("_values"):
allValues_1 = v1
elif n1.startswith("_errors"):
allErrors_1 = v1
Beta Was this translation helpful? Give feedback.
All reactions