I want to add a branch to the tree as a column of identical numbers (in my case, this number is 562). Then subtract another branch from one, thereby creating another branch. How can this be implemented?
The best way to handle depends on ‘why’ you want to do this and how you will end up using the result (for example, the solution might be to use aliases).
I have a file that has two main trees. Each tree has several branches that contain data from certain detectors. The data is presented as a dependence of the voltage amplitude on time (in nanoseconds). About 10,000 points in each branch. Depending on the branch name, I need to shift the time values by a certain delay time (for example, by 562 nanoseconds). To do this, I decided to create a new file and create two trees in it, in which there will be branches with columns containing the desired delay time values. Then I want to copy two trees from the source file and subtract new columns from the original columns. Eventually, time-shifted histograms should be obtained (by calling rootbrowse in the terminal).
tom = ROOT.RDataFrame(“FADCData 882”, “/home/erg/po_1_event/Oct__13070311.root”).Redefine(“Channel0”, “Channel0 - 562”).Snapshot(“FData882”, “/home/erg/po_1_event/Oct_13070311.root”, {“trench0”})
TypeError: Template method resolution failed:
none of the 3 overloaded methods succeeded.
TypeError: could not convert argument 3
Failed to instantiate “Snapshot(std::string,std::string,set)”