Replies: 5 comments
-
I think that combining the functionality of I have to ask, why is it important for so much of the analysis to be done in a one-line function call? I don't know of a real reason to use |
Beta Was this translation helpful? Give feedback.
-
Hi @jpivarski, Thanks a lot for the quick reply. You make a fair point about the confusion. I’m not entirely sure how regex processing is taking place in Uproot backend, but I would have thought the use of the syntax The reason I was looking into this is because we are writing a framework which will parse from a configuration file, so the exact expressions are unknown until runtime. I can’t think of a straight-forward way (that doesn’t involve writing up an interpreter) to breakdown the expression from the config, call the branches individually then perform the calculation on them. There is also the |
Beta Was this translation helpful? Give feedback.
-
Yes, the slashes at the beginning and end of the string ( with but if you need the calculation to go in stages, first a regex, then a computation, that would get messy. Should there be two strings? Should characters like And even then, the So back to the direction I think you're going in: if you're defining a configuration file language, you can add knobs and dials that generate Python code as easily as it could generate Uproot It happens here: There's some manipulation of the Python AST to recognize I should mention that there's an ongoing project to add TTree::Draw as a language for |
Beta Was this translation helpful? Give feedback.
-
Hi @jpivarski Thanks a lot for your reply. I will like into your suggestions. I wasn't looking for anything particularly complicated -- the goal was simply allow a user to specify something like |
Beta Was this translation helpful? Give feedback.
-
I think I kept this open to be informative, but we can do that with Discussions now, so I'll convert this Issue into a Discussion. |
Beta Was this translation helpful? Give feedback.
-
I am trying to develop code which will parse a series of branches and use uproot to read those branches. The branches could be passed as a regex pattern or as an exact name or as an expression.
I am looking to combine all the requested branches into an array and passing them in one go to uproot. The TBranch argument
filter_name
fails to match the expressions and the expressions list fails to process regex patterns. Even if I group expressions together and filters together,exoressions
always overrides thefilter_name
argument. Is it possible to allow thefilter_name
argument to process an expression or for theexpression
argument to process regex patterns?Beta Was this translation helpful? Give feedback.
All reactions